Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Damon
study
Commits
de3f032c
Commit
de3f032c
authored
Jul 27, 2021
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-v1.0.0' of
https://git.banshouhui.com/wuzhenzhe/study
into dev-v1.0.0
parents
c8be89c0
4aa2743b
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
170 additions
and
74 deletions
+170
-74
common.js
src/api/common.js
+2
-2
upload.js
src/common/upload.js
+2
-2
index.vue
src/components/swiper-limited-load/index.vue
+7
-8
detail.vue
src/pages/cert/detail.vue
+4
-1
detailLearn.vue
src/pages/cert/detailLearn.vue
+3
-3
cert.vue
src/pages/index/cert.vue
+41
-13
mine.vue
src/pages/index/mine.vue
+3
-3
answer.vue
src/pages/learn/answer.vue
+36
-25
certify.vue
src/pages/mine/certify.vue
+1
-0
company.vue
src/pages/mine/company.vue
+10
-0
info.vue
src/pages/mine/info.vue
+34
-16
setting.vue
src/pages/mine/setting.vue
+22
-0
detail.vue
src/pages/search/detail.vue
+5
-1
No files found.
src/api/common.js
View file @
de3f032c
let
commonApiFun
=
function
(
vm
)
{
let
commonApiFun
=
function
(
vm
)
{
const
globalUrl
=
process
.
uniEnv
||
{}
const
globalUrl
=
process
.
uniEnv
||
{}
let
uCenterApiUrl
=
globalUrl
.
uCenter
Url
let
apiUrl
=
globalUrl
.
api
Url
let
loginWechatAuth
=
async
(
params
=
{})
=>
let
loginWechatAuth
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'/wxapp/unify/authorization'
,
params
)
await
vm
.
$u
.
post
(
'/wxapp/unify/authorization'
,
params
)
let
payOrder
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'/pay/order'
,
params
)
let
payOrder
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'/pay/order'
,
params
)
let
payQuery
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/pay/query'
,
params
)
let
payQuery
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/pay/query'
,
params
)
let
getQiNiuToken
=
async
(
params
=
{})
=>
let
getQiNiuToken
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
uCenterApiUrl
+
'v1/tokens
'
,
params
)
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/file/token/get
'
,
params
)
const
commonApi
=
{
const
commonApi
=
{
loginWechatAuth
,
loginWechatAuth
,
payOrder
,
payOrder
,
...
...
src/common/upload.js
View file @
de3f032c
...
@@ -46,7 +46,7 @@ function getPhoto(type, token) {
...
@@ -46,7 +46,7 @@ function getPhoto(type, token) {
}
}
let
sourceType
=
type
==
1
?
[
'album'
]
:
[
'album'
,
'camera'
]
let
sourceType
=
type
==
1
?
[
'album'
]
:
[
'album'
,
'camera'
]
uni
.
chooseImage
({
uni
.
chooseImage
({
count
:
6
,
//默认9
count
:
1
,
//默认9
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sourceType
:
sourceType
,
//从相册选择
sourceType
:
sourceType
,
//从相册选择
success
:
function
(
res
)
{
success
:
function
(
res
)
{
...
@@ -87,7 +87,7 @@ function upload(filePath, token) {
...
@@ -87,7 +87,7 @@ function upload(filePath, token) {
},
},
complete
:
(
res
)
=>
{
complete
:
(
res
)
=>
{
if
(
res
.
statusCode
===
200
)
{
if
(
res
.
statusCode
===
200
)
{
resolve
(
JSON
.
parse
(
res
.
data
).
key
)
resolve
(
JSON
.
parse
(
res
.
data
).
key
||
JSON
.
parse
(
res
.
data
).
src
)
}
else
{
}
else
{
reject
(
res
.
errMsg
)
reject
(
res
.
errMsg
)
}
}
...
...
src/components/swiper-limited-load/index.vue
View file @
de3f032c
...
@@ -7,9 +7,9 @@
...
@@ -7,9 +7,9 @@
@
change=
"swiperChange"
@
change=
"swiperChange"
circular
circular
>
>
<swiper-item
v-for=
"(item, i
ndex) in swiperList"
:key=
"index
"
>
<swiper-item
v-for=
"(item, i
) in swiperList"
:key=
"i
"
>
<view
class=
"u-flex subject"
>
<view
class=
"u-flex subject"
>
<view
class=
"title"
v-if=
"item.title"
><text>
{{
titleType
[
item
.
type
-
1
]
}}
</text>
{{
item
.
title
}}
</view>
<view
class=
"title"
v-if=
"item.title"
><text
class=
"title-type"
>
{{
titleType
[
item
.
type
-
1
]
}}
</text>
{{
item
.
title
}}
</view>
<view
class=
"content"
>
<view
class=
"content"
>
<answer-sheet
<answer-sheet
ref=
"answerSheet"
ref=
"answerSheet"
...
@@ -70,7 +70,7 @@ export default {
...
@@ -70,7 +70,7 @@ export default {
// 值为0禁止切换动画
// 值为0禁止切换动画
swiperDuration
:
{
swiperDuration
:
{
type
:
String
,
type
:
String
,
default
:
"250"
default
:
'250'
},
},
// 分页需要传此数据
// 分页需要传此数据
total
:
{
total
:
{
...
@@ -86,7 +86,7 @@ export default {
...
@@ -86,7 +86,7 @@ export default {
// 此值控制swiper的位置
// 此值控制swiper的位置
swiperCurrent
:
0
,
swiperCurrent
:
0
,
// 当前swiper渲染的items
// 当前swiper渲染的items
swiperList
:
[],
swiperList
:
[
1
,
2
,
3
],
}
}
},
},
watch
:
{
watch
:
{
...
@@ -216,7 +216,6 @@ export default {
...
@@ -216,7 +216,6 @@ export default {
swiperList
[
current
]
=
currentItem
swiperList
[
current
]
=
currentItem
swiperList
[
this
.
getLastSwiperChangeIndex
(
current
)]
=
this
.
getLastSwiperNeedItem
(
currentItem
,
list
)
swiperList
[
this
.
getLastSwiperChangeIndex
(
current
)]
=
this
.
getLastSwiperNeedItem
(
currentItem
,
list
)
swiperList
[
this
.
getNextSwiperChangeIndex
(
current
)]
=
this
.
getNextSwiperNeedItem
(
currentItem
,
list
)
swiperList
[
this
.
getNextSwiperChangeIndex
(
current
)]
=
this
.
getNextSwiperNeedItem
(
currentItem
,
list
)
console
.
log
(
"swiperList"
,
swiperList
)
return
swiperList
;
return
swiperList
;
},
},
/**
/**
...
@@ -262,7 +261,7 @@ export default {
...
@@ -262,7 +261,7 @@ export default {
height
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
swiper-item
{
.swiper-items
{
overflow
:
auto
;
overflow
:
auto
;
}
}
.subject
{
.subject
{
...
@@ -280,7 +279,7 @@ export default {
...
@@ -280,7 +279,7 @@ export default {
font-weight
:
bold
;
font-weight
:
bold
;
width
:
100%
;
width
:
100%
;
text-align
:
left
;
text-align
:
left
;
text
{
.title-type
{
background
:
#9EA5BB
;
background
:
#9EA5BB
;
color
:
#fff
;
color
:
#fff
;
padding
:
8rpx
20rpx
;
padding
:
8rpx
20rpx
;
...
...
src/pages/cert/detail.vue
View file @
de3f032c
...
@@ -235,7 +235,10 @@ export default {
...
@@ -235,7 +235,10 @@ export default {
}
}
.
u-tr
:
:
v-deep
.
u-td
{
.
u-tr
:
:
v-deep
.
u-td
{
font-size
:
22rpx
!
important
;
font-size
:
22rpx
!
important
;
height
:
70rpx
;
height
:
80rpx
;
}
.
u-tr
:
:
v-deep
.
u-td
.
u-td
{
padding
:
5rpx
0
!
important
;
}
}
}
}
</
style
>
</
style
>
src/pages/cert/detailLearn.vue
View file @
de3f032c
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
</view>
</view>
</view>
</view>
<view
class=
"foot"
>
<view
class=
"foot"
>
<text>
证书机构:
中华人民共和国应急管理部
</text>
<text>
证书机构:
模考大师
</text>
<text
style=
"padding-top: 28rpx;"
>
更新时间:
{{
nowDate
}}
</text>
<text
style=
"padding-top: 28rpx;"
>
更新时间:
{{
nowDate
}}
</text>
</view>
</view>
</view>
</view>
...
@@ -98,7 +98,7 @@ export default {
...
@@ -98,7 +98,7 @@ export default {
return
(
Today
.
getFullYear
()
+
'.'
+
(
m
.
length
>
1
?
m
:
'0'
+
m
)
+
'.'
+
(
d
.
length
>
1
?
d
:
'0'
+
d
))
return
(
Today
.
getFullYear
()
+
'.'
+
(
m
.
length
>
1
?
m
:
'0'
+
m
)
+
'.'
+
(
d
.
length
>
1
?
d
:
'0'
+
d
))
},
},
headPhoto
(){
headPhoto
(){
return
this
.
learnData
.
photo
||
process
.
uniEnv
.
qn_base_url
+
'xueshitoubu@2x.png'
return
this
.
learnData
.
photo
||
(
process
.
uniEnv
.
qn_base_url
+
'xitongtouxiang.png'
)
},
},
startDate
()
{
startDate
()
{
return
this
.
learnData
.
startDate
||
' '
return
this
.
learnData
.
startDate
||
' '
...
@@ -119,7 +119,7 @@ export default {
...
@@ -119,7 +119,7 @@ export default {
return
this
.
learnData
.
subjectName
||
' '
return
this
.
learnData
.
subjectName
||
' '
},
},
institutionName
()
{
institutionName
()
{
return
this
.
learnData
.
institutionName
||
'
'
return
this
.
learnData
.
institutionName
||
'
模考大师
'
},
},
maxpoint
()
{
maxpoint
()
{
return
this
.
learnData
.
maxPoint
||
0
return
this
.
learnData
.
maxPoint
||
0
...
...
src/pages/index/cert.vue
View file @
de3f032c
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
</view>
</view>
</view>
</view>
<scroll-view
scroll-y
style=
"width:
100%
;"
>
<scroll-view
scroll-y
style=
"width:
702rpx;padding: 0 24rpx
;"
>
<view
class=
" form"
>
<view
class=
" form"
>
<view
class=
"item"
>
<view
class=
"item"
>
<text
class=
"title"
>
选择查询证书类型
</text>
<text
class=
"title"
>
选择查询证书类型
</text>
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
<swiper-item
@
touchmove
.
stop
.
prevent=
"stopTouchMove"
>
<swiper-item
@
touchmove
.
stop
.
prevent=
"stopTouchMove"
>
<scroll-view
<scroll-view
scroll-y
scroll-y
style=
"
height:100%;width:100%
;"
style=
"
width: 702rpx;padding: 0 24rpx
;"
@
scrolltolower=
"onreachBottom"
@
scrolltolower=
"onreachBottom"
scroll-y=
"true"
scroll-y=
"true"
refresher-enabled=
"true"
refresher-enabled=
"true"
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
@
refresherrestore=
"onRestore"
@
refresherrestore=
"onRestore"
@
refresherabort=
"onAbort"
@
refresherabort=
"onAbort"
>
>
<view
class=
"list-view"
>
<view
v-if=
"hasData"
class=
"list-view"
>
<view
class=
"item"
v-for=
"(item, key) in countryCertList"
:key=
"key"
@
tap=
"goDetail(item)"
>
<view
class=
"item"
v-for=
"(item, key) in countryCertList"
:key=
"key"
@
tap=
"goDetail(item)"
>
<u-image
:src=
"item.bgImage"
width=
"100%"
height=
"100%"
class=
"bg-image"
></u-image>
<u-image
:src=
"item.bgImage"
width=
"100%"
height=
"100%"
class=
"bg-image"
></u-image>
<view
class=
"name"
>
<view
class=
"name"
>
...
@@ -104,6 +104,17 @@
...
@@ -104,6 +104,17 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
v-else
class=
"list-view empty-value"
>
<u-image
width=
"374rpx"
height=
"322rpx"
:src=
"nothing"
style=
"margin-top: 100rpx;"
></u-image>
<text
style=
"margin-top: 20rpx;font-size: 28rpx;color: #9EA5BB;"
>
当前暂无证书内容
</text
>
</view>
</scroll-view>
</scroll-view>
</swiper-item>
</swiper-item>
</swiper>
</swiper>
...
@@ -127,6 +138,7 @@ export default {
...
@@ -127,6 +138,7 @@ export default {
learnCertList
:
[],
learnCertList
:
[],
countryCertImage
:
process
.
uniEnv
.
qn_base_url
+
'zhengshubeijing@2x.png'
,
countryCertImage
:
process
.
uniEnv
.
qn_base_url
+
'zhengshubeijing@2x.png'
,
learnCertImage
:
process
.
uniEnv
.
qn_base_url
+
'xueshizhengmingbeijing@2x.png'
,
learnCertImage
:
process
.
uniEnv
.
qn_base_url
+
'xueshizhengmingbeijing@2x.png'
,
nothing
:
process
.
uniEnv
.
qn_base_url
+
'zanwucuoti@3x.png'
,
isEmptyList
:
true
,
//学时证和国家证都为空显示空
isEmptyList
:
true
,
//学时证和国家证都为空显示空
value
:
''
,
value
:
''
,
type
:
'select'
,
type
:
'select'
,
...
@@ -160,7 +172,17 @@ export default {
...
@@ -160,7 +172,17 @@ export default {
_freshing
:
false
,
_freshing
:
false
,
}
}
},
},
computed
:
{},
computed
:
{
hasData
(){
if
(
this
.
countryCertList
&&
this
.
countryCertList
.
length
>
0
){
return
true
}
else
if
(
this
.
learnCertList
&&
this
.
learnCertList
.
length
>
0
){
return
true
}
else
{
return
false
}
}
},
onLoad
()
{
onLoad
()
{
this
.
checkType
=
'特种作业操作证查询'
this
.
checkType
=
'特种作业操作证查询'
},
},
...
@@ -390,7 +412,7 @@ export default {
...
@@ -390,7 +412,7 @@ export default {
console
.
log
(
'goto param'
,
param
)
console
.
log
(
'goto param'
,
param
)
if
(
param
.
type
==
'learn'
){
if
(
param
.
type
==
'learn'
){
console
.
log
(
'点击学时证,请求详情,组装参数再传过去'
)
console
.
log
(
'点击学时证,请求详情,组装参数再传过去'
)
//
this.$u.api.getlearnCertDetail(param.id).then((res)=>{
this
.
$u
.
api
.
getlearnCertDetail
(
param
.
id
).
then
((
res
)
=>
{
// let res = {
// let res = {
// photo: "https://thirdwx.qlogo.cn/mmopen/vi_32/c20Wk8HTurnNnKJMmnAnib9CUtqicwKKIMCvzViaBn0icNnpmeOQbSiaRklWCcfUOlW7oqj2o7u65d6F3ZwmZtLVZaw/132",//头像,
// photo: "https://thirdwx.qlogo.cn/mmopen/vi_32/c20Wk8HTurnNnKJMmnAnib9CUtqicwKKIMCvzViaBn0icNnpmeOQbSiaRklWCcfUOlW7oqj2o7u65d6F3ZwmZtLVZaw/132",//头像,
// name: "阿三哥",//名字,
// name: "阿三哥",//名字,
...
@@ -409,9 +431,9 @@ export default {
...
@@ -409,9 +431,9 @@ export default {
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/cert/detailLearn'
,
url
:
'pages/cert/detailLearn'
,
})
})
//
}).catch(err => {
}).
catch
(
err
=>
{
//
console.log(err)
console
.
log
(
err
)
//
})
})
}
else
{
}
else
{
console
.
log
(
'点击国家证,直接参数带过去'
,
param
)
console
.
log
(
'点击国家证,直接参数带过去'
,
param
)
getApp
().
globalData
.
certItemData
=
param
getApp
().
globalData
.
certItemData
=
param
...
@@ -463,8 +485,6 @@ export default {
...
@@ -463,8 +485,6 @@ export default {
case
1
:
case
1
:
let
lifeData
=
uni
.
getStorageSync
(
'lifeData'
)
let
lifeData
=
uni
.
getStorageSync
(
'lifeData'
)
if
(
lifeData
.
vuex_token
){
if
(
lifeData
.
vuex_token
){
let
token
=
lifeData
.
vuex_token
;
this
.
$u
.
vuex
(
'vuex_token'
,
'Bearer test'
)
this
.
getCountryCert
()
this
.
getCountryCert
()
this
.
getLearnCert
()
this
.
getLearnCert
()
}
}
...
@@ -509,7 +529,7 @@ page {
...
@@ -509,7 +529,7 @@ page {
.study
{
.study
{
height
:
100vh
;
height
:
100vh
;
background
:
none
;
background
:
none
;
padding
:
0rpx
24rpx
;
/* padding: 0rpx 24rpx; */
}
}
.form
{
.form
{
display
:
flex
;
display
:
flex
;
...
@@ -522,7 +542,7 @@ page {
...
@@ -522,7 +542,7 @@ page {
height
:
100%
;
height
:
100%
;
}
}
.tips-top
{
.tips-top
{
width
:
702rpx
;
width
:
100%
;
height
:
72rpx
;
height
:
72rpx
;
line-height
:
72rpx
;
line-height
:
72rpx
;
font-size
:
24rpx
;
font-size
:
24rpx
;
...
@@ -580,7 +600,7 @@ page {
...
@@ -580,7 +600,7 @@ page {
}
}
.list-view
{
.list-view
{
width
:
100%
;
width
:
100%
;
margin-bottom
:
500rpx
;
/* margin-bottom: 500rpx; */
.item
{
.item
{
width
:
100%
;
width
:
100%
;
height
:
444rpx
;
height
:
444rpx
;
...
@@ -612,4 +632,12 @@ page {
...
@@ -612,4 +632,12 @@ page {
}
}
}
}
}
}
.empty-value
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
padding
:
30rpx
;
text-align
:
center
;
}
</
style
>
</
style
>
src/pages/index/mine.vue
View file @
de3f032c
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<u-image
<u-image
slot=
"icon"
slot=
"icon"
width=
"36rpx"
width=
"36rpx"
height=
"4
0
rpx"
height=
"4
2
rpx"
:src=
"questionIcon"
:src=
"questionIcon"
></u-image>
></u-image>
</u-cell-item>
</u-cell-item>
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
<u-image
<u-image
slot=
"icon"
slot=
"icon"
width=
"36rpx"
width=
"36rpx"
height=
"
40
rpx"
height=
"
36
rpx"
:src=
"serviceIcon"
:src=
"serviceIcon"
></u-image>
></u-image>
</u-cell-item>
</u-cell-item>
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
<u-image
<u-image
slot=
"icon"
slot=
"icon"
width=
"36rpx"
width=
"36rpx"
height=
"
40
rpx"
height=
"
34
rpx"
:src=
"settingIcon"
:src=
"settingIcon"
></u-image>
></u-image>
</u-cell-item>
</u-cell-item>
...
...
src/pages/learn/answer.vue
View file @
de3f032c
...
@@ -36,7 +36,6 @@
...
@@ -36,7 +36,6 @@
<view
class=
"swiper"
>
<view
class=
"swiper"
>
<swiper-limited-load
<swiper-limited-load
ref=
"swiper"
ref=
"swiper"
:swiperHeight=
"500"
:swiperDuration=
"swiperDuration"
:swiperDuration=
"swiperDuration"
:list=
"list"
:list=
"list"
:current=
"current"
:current=
"current"
...
@@ -179,7 +178,7 @@ export default {
...
@@ -179,7 +178,7 @@ export default {
current
:
0
,
current
:
0
,
// 仅仅记录swiper的位置
// 仅仅记录swiper的位置
currentIndex
:
0
,
currentIndex
:
0
,
swiperDuration
:
'0'
,
swiperDuration
:
'
100
0'
,
// 分页数据
// 分页数据
currentPage
:
1
,
currentPage
:
1
,
pageSize
:
100
,
pageSize
:
100
,
...
@@ -197,9 +196,9 @@ export default {
...
@@ -197,9 +196,9 @@ export default {
computed
:
{
computed
:
{
defaultImg
()
{
defaultImg
()
{
let
name
=
''
let
name
=
''
if
(
this
.
type
===
4
)
{
if
(
this
.
source
===
5
)
{
name
=
'no-error.png'
name
=
'no-error.png'
}
else
if
(
this
.
type
===
5
)
{
}
else
if
(
this
.
source
===
4
)
{
name
=
'no-collect.png'
name
=
'no-collect.png'
}
}
return
process
.
uniEnv
.
qn_base_url
+
name
return
process
.
uniEnv
.
qn_base_url
+
name
...
@@ -283,6 +282,7 @@ export default {
...
@@ -283,6 +282,7 @@ export default {
// 列表总长度,一定要在第一次请求列表数据前明确该值
// 列表总长度,一定要在第一次请求列表数据前明确该值
// 否则无法知道下一页是否还有数据
// 否则无法知道下一页是否还有数据
let
total
=
parseInt
(
res
)
||
0
let
total
=
parseInt
(
res
)
||
0
if
(
total
>
0
)
{
// 考试
// 考试
if
(
this
.
type
===
2
)
{
if
(
this
.
type
===
2
)
{
this
.
pageSize
=
this
.
totalPoint
this
.
pageSize
=
this
.
totalPoint
...
@@ -297,6 +297,7 @@ export default {
...
@@ -297,6 +297,7 @@ export default {
// 上次答到了第几题
// 上次答到了第几题
let
index
=
this
.
source
===
1
?
(
this
.
lastIndex
[
this
.
questionWarehouseId
]
||
0
)
:
0
let
index
=
this
.
source
===
1
?
(
this
.
lastIndex
[
this
.
questionWarehouseId
]
||
0
)
:
0
this
.
refresh
(
index
)
this
.
refresh
(
index
)
}
})
})
},
},
// 切换
// 切换
...
@@ -439,7 +440,7 @@ export default {
...
@@ -439,7 +440,7 @@ export default {
}
}
}
}
// 如果回答
错误
或者是考试模式,自动进入下一题
// 如果回答
正确
或者是考试模式,自动进入下一题
if
((
status
===
'pass'
&&
this
.
model
!==
2
)
||
this
.
type
===
2
)
{
if
((
status
===
'pass'
&&
this
.
model
!==
2
)
||
this
.
type
===
2
)
{
if
(
this
.
currentIndex
+
1
>
this
.
total
-
1
)
{
// 最后一题回答后
if
(
this
.
currentIndex
+
1
>
this
.
total
-
1
)
{
// 最后一题回答后
if
(
this
.
type
===
2
)
{
// 统计分数,交卷
if
(
this
.
type
===
2
)
{
// 统计分数,交卷
...
@@ -448,9 +449,7 @@ export default {
...
@@ -448,9 +449,7 @@ export default {
}
}
return
return
}
}
this
.
$nextTick
(()
=>
{
this
.
current
=
this
.
currentIndex
+
1
this
.
current
=
this
.
currentIndex
+
1
})
}
}
},
},
// 保存答案
// 保存答案
...
@@ -524,10 +523,17 @@ export default {
...
@@ -524,10 +523,17 @@ export default {
},
},
// 每日一练弹框取消
// 每日一练弹框取消
dailyCancel
()
{
dailyCancel
()
{
if
(
this
.
experience
)
{
this
.
$u
.
route
({
type
:
'tab'
,
url
:
'/pages/index/index'
,
})
}
else
{
this
.
$u
.
route
({
this
.
$u
.
route
({
type
:
'redirect'
,
type
:
'redirect'
,
url
:
'/pages/learn/record'
,
url
:
'/pages/learn/record'
,
})
})
}
},
},
// 收藏
// 收藏
collection
()
{
collection
()
{
...
@@ -536,6 +542,11 @@ export default {
...
@@ -536,6 +542,11 @@ export default {
const
action
=
status
?
'removeCollection'
:
'joinCollection'
const
action
=
status
?
'removeCollection'
:
'joinCollection'
this
.
$u
.
api
[
action
]({
questionId
:
info
.
id
}).
then
(
res
=>
{
this
.
$u
.
api
[
action
]({
questionId
:
info
.
id
}).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
const
msg
=
status
?
'取消收藏成功'
:
'收藏成功'
this
.
$u
.
toast
(
msg
)
if
(
status
&&
this
.
source
===
4
)
{
this
.
current
=
this
.
currentIndex
+
1
}
info
.
collectionFlag
=
!
status
info
.
collectionFlag
=
!
status
if
(
this
.
source
===
1
)
{
//更新缓存数据
if
(
this
.
source
===
1
)
{
//更新缓存数据
this
.
questionList
[
this
.
questionWarehouseId
][
this
.
currentIndex
]
=
info
this
.
questionList
[
this
.
questionWarehouseId
][
this
.
currentIndex
]
=
info
...
...
src/pages/mine/certify.vue
View file @
de3f032c
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
binderror=
""
binderror=
""
bindload=
""
bindload=
""
@
click=
"getBack"
@
click=
"getBack"
style=
"margin-top: 30rpx"
/>
/>
</view>
</view>
</view>
</view>
...
...
src/pages/mine/company.vue
View file @
de3f032c
...
@@ -29,12 +29,21 @@ export default {
...
@@ -29,12 +29,21 @@ export default {
return
{
return
{
student
:
{
student
:
{
workUnit
:
''
,
workUnit
:
''
,
isNotSet
:
null
,
},
},
}
}
},
},
computed
:
{},
computed
:
{},
onLoad
()
{
onLoad
()
{
this
.
student
=
getApp
().
globalData
.
student
this
.
student
=
getApp
().
globalData
.
student
if
(
this
.
student
.
workUnit
==
''
||
!
this
.
student
.
workUnit
)
{
this
.
isNotSet
=
true
}
},
onUnload
()
{
if
(
this
.
isNotSet
)
{
this
.
student
.
workUnit
=
''
}
},
},
methods
:
{
methods
:
{
submit
()
{
submit
()
{
...
@@ -47,6 +56,7 @@ export default {
...
@@ -47,6 +56,7 @@ export default {
workUnit
:
this
.
student
.
workUnit
,
workUnit
:
this
.
student
.
workUnit
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
isNotSet
=
false
this
.
$u
.
toast
(
'保存成功'
)
this
.
$u
.
toast
(
'保存成功'
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$u
.
route
({
this
.
$u
.
route
({
...
...
src/pages/mine/info.vue
View file @
de3f032c
...
@@ -24,7 +24,12 @@
...
@@ -24,7 +24,12 @@
></u-image>
></u-image>
</view>
</view>
</u-cell-item>
</u-cell-item>
<u-cell-item
title=
"证件照"
@
click=
"changeCertPhoto"
>
<u-cell-item
title=
"证件照"
@
click=
"changeCertPhoto"
:arrow=
"false"
:hover-class=
"none"
>
<view
slot=
"right-icon"
>
<view
slot=
"right-icon"
>
<u-image
<u-image
v-if=
"isupLoadCertPhoto"
v-if=
"isupLoadCertPhoto"
...
@@ -32,7 +37,7 @@
...
@@ -32,7 +37,7 @@
height=
"120rpx"
height=
"120rpx"
:src=
"headCertPhoto"
:src=
"headCertPhoto"
></u-image>
></u-image>
<text
v-else
style=
"color:
blue;"
>
未
上传
</text>
<text
v-else
style=
"color:
#2953FF"
>
去
上传
</text>
</view>
</view>
</u-cell-item>
</u-cell-item>
<u-cell-item
title=
"手机号"
:arrow=
"false"
:hover-class=
"none"
>
<u-cell-item
title=
"手机号"
:arrow=
"false"
:hover-class=
"none"
>
...
@@ -43,7 +48,8 @@
...
@@ -43,7 +48,8 @@
open-type=
"getPhoneNumber"
open-type=
"getPhoneNumber"
@
getphonenumber=
"getPhonenumber"
@
getphonenumber=
"getPhonenumber"
>
>
{{
getMobile
}}
<text
v-if=
"getMobile"
>
{{
getMobile
}}
</text>
<text
v-else
class=
"empty-value"
>
去绑定
</text>
</button>
</button>
</view>
</view>
</u-cell-item>
</u-cell-item>
...
@@ -51,12 +57,18 @@
...
@@ -51,12 +57,18 @@
title=
"实名认证"
title=
"实名认证"
title-style=
"
{'font':'bold','font-size':'40rpx'}"
title-style=
"
{'font':'bold','font-size':'40rpx'}"
:value="getCertifyStatus"
:value="getCertifyStatus"
:value-style="{
color: getCertifyStatus == '去认证' ? '#2953FF' : '#191C27',
}"
@click="goCertify"
@click="goCertify"
>
>
</u-cell-item>
</u-cell-item>
<u-cell-item
<u-cell-item
title=
"工作单位"
title=
"工作单位"
:value=
"getCompany"
:value=
"getCompany"
:value-style=
"
{
color: getCompany == '去填写' ? '#2953FF' : '#191C27',
}"
@click="goCompany"
@click="goCompany"
>
</u-cell-item>
>
</u-cell-item>
</u-cell-group>
</u-cell-group>
...
@@ -91,29 +103,32 @@ export default {
...
@@ -91,29 +103,32 @@ export default {
return
(
this
.
student
&&
this
.
student
.
identityNumber
)
||
false
return
(
this
.
student
&&
this
.
student
.
identityNumber
)
||
false
},
},
getMobile
()
{
getMobile
()
{
return
(
this
.
student
&&
this
.
student
.
phoneNumber
)
||
''
return
(
(
this
.
student
&&
this
.
student
.
phoneNumber
&&
this
.
student
.
phoneNumber
.
length
>
5
&&
this
.
student
.
phoneNumber
)
||
false
)
},
},
getCompany
()
{
getCompany
()
{
return
(
this
.
student
&&
this
.
student
.
workUnit
)
||
''
return
(
this
.
student
&&
this
.
student
.
workUnit
)
||
'
去填写
'
},
},
getCertifyStatus
()
{
getCertifyStatus
()
{
return
this
.
student
&&
!
this
.
student
.
isCertify
?
'去认证'
:
'已
认证'
return
this
.
student
&&
this
.
student
.
isCertify
?
'已认证'
:
'去
认证'
},
},
},
},
onLoad
()
{
onLoad
()
{
this
.
$u
.
api
.
getQiNiuToken
({
type
:
'image'
}).
catch
((
data
)
=>
{
this
.
$u
.
api
if
(
data
.
errMsg
==
'request:ok'
)
{
.
getQiNiuToken
({
bucketName
:
'banshou-userprofile'
})
.
then
((
res
)
=>
{
this
.
token
=
data
.
data
.
token
//token为七牛云的token一般由后台接口提供
this
.
token
=
data
.
data
.
token
//token为七牛云的token一般由后台接口提供
getApp
().
globalData
.
qiNiuToken
=
data
.
data
.
token
getApp
().
globalData
.
qiNiuToken
=
data
.
data
.
token
}
else
{
this
.
$u
.
toast
(
'获取token失败'
)
}
})
})
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
if
(
res
&&
res
.
identityNumber
)
{
if
(
res
&&
res
.
identityNumber
)
{
res
.
isCertify
=
true
this
.
student
.
isCertify
=
true
}
}
this
.
student
=
res
this
.
student
=
res
})
})
},
},
...
@@ -268,8 +283,11 @@ page {
...
@@ -268,8 +283,11 @@ page {
.mobile-button
{
.mobile-button
{
width
:
115px
;
width
:
115px
;
height
:
55rpx
;
background
:
none
;
background
:
none
;
font-size
:
28rpx
;
font-size
:
28rpx
;
text-align
:
right
;
padding-right
:
0
;
}
}
button
:
:
after
{
button
:
:
after
{
border
:
none
;
border
:
none
;
...
@@ -290,7 +308,7 @@ button::after {
...
@@ -290,7 +308,7 @@ button::after {
border-top-width
:
0
;
border-top-width
:
0
;
}
}
.
content
:
:
v-deep
.
u-cell__
value
{
.
empty-
value
{
color
:
#
191c27
;
color
:
#
2953ff
;
}
}
</
style
>
</
style
>
src/pages/mine/setting.vue
View file @
de3f032c
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
title=
"版本更新"
title=
"版本更新"
value=
"当前版本v1.1.0"
value=
"当前版本v1.1.0"
:border-bottom=
"false"
:border-bottom=
"false"
@
tap=
"upgrade"
></u-cell-item>
></u-cell-item>
</u-cell-group>
</u-cell-group>
<view
class=
"logout"
@
tap=
"logout"
>
退出登录
</view>
<view
class=
"logout"
@
tap=
"logout"
>
退出登录
</view>
...
@@ -19,6 +20,27 @@ export default {
...
@@ -19,6 +20,27 @@ export default {
computed
:
{},
computed
:
{},
onLoad
()
{},
onLoad
()
{},
methods
:
{
methods
:
{
upgrade
:
function
()
{
wx
.
showToast
({
title
:
'正在更新版本...'
,
icon
:
'loading'
,
})
const
um
=
wx
.
getUpdateManager
()
um
.
onCheckForUpdate
(
function
(
res
)
{
if
(
res
.
hasUpdate
)
{
um
.
onUpdateReady
(
function
()
{
um
.
applyUpdate
()
wx
.
showToast
({
title
:
'更新完成'
,
})
})
}
else
{
wx
.
showToast
({
title
:
'已是最新版本'
,
})
}
})
},
logout
()
{
logout
()
{
this
.
$u
.
vuex
(
'vuex_token'
,
''
)
this
.
$u
.
vuex
(
'vuex_token'
,
''
)
this
.
$u
.
vuex
(
'openId'
,
''
)
this
.
$u
.
vuex
(
'openId'
,
''
)
...
...
src/pages/search/detail.vue
View file @
de3f032c
...
@@ -200,7 +200,11 @@ export default {
...
@@ -200,7 +200,11 @@ export default {
collection
(
item
)
{
collection
(
item
)
{
const
action
=
item
.
collectionFlag
?
'removeCollection'
:
'joinCollection'
const
action
=
item
.
collectionFlag
?
'removeCollection'
:
'joinCollection'
this
.
$u
.
api
[
action
]({
questionId
:
item
.
id
}).
then
(
res
=>
{
this
.
$u
.
api
[
action
]({
questionId
:
item
.
id
}).
then
(
res
=>
{
if
(
res
)
item
.
collectionFlag
=
!
item
.
collectionFlag
if
(
res
)
{
const
msg
=
item
.
collectionFlag
?
'取消收藏成功'
:
'收藏成功'
this
.
$u
.
toast
(
msg
)
item
.
collectionFlag
=
!
item
.
collectionFlag
}
})
})
},
},
arrowUp
(
index
)
{
arrowUp
(
index
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment