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
227de48b
Commit
227de48b
authored
Aug 02, 2021
by
linwenqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:我的信息,认证样式优化
parent
f6cfded1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
49 deletions
+73
-49
cert.vue
src/pages/index/cert.vue
+3
-3
bank.vue
src/pages/mine/bank.vue
+7
-6
certify.vue
src/pages/mine/certify.vue
+10
-8
info.vue
src/pages/mine/info.vue
+53
-32
No files found.
src/pages/index/cert.vue
View file @
227de48b
...
@@ -171,6 +171,9 @@ export default {
...
@@ -171,6 +171,9 @@ export default {
}
}
},
},
onLoad
()
{
onLoad
()
{
this
.
checkType
=
'特种作业操作证查询'
},
onShow
:
function
(
param
)
{
if
(
!
this
.
vuex_token
)
{
if
(
!
this
.
vuex_token
)
{
this
.
$u
.
toast
(
'请先登录'
)
this
.
$u
.
toast
(
'请先登录'
)
let
that
=
this
let
that
=
this
...
@@ -180,9 +183,6 @@ export default {
...
@@ -180,9 +183,6 @@ export default {
})
})
},
1000
)
},
1000
)
}
}
this
.
checkType
=
'特种作业操作证查询'
},
onShow
:
function
(
param
)
{
// try {
// try {
// if (param.tabs) {
// if (param.tabs) {
// this.current = param.tabs
// this.current = param.tabs
...
...
src/pages/mine/bank.vue
View file @
227de48b
...
@@ -45,7 +45,7 @@ export default {
...
@@ -45,7 +45,7 @@ export default {
return
{
return
{
title
:
'我的题库'
,
title
:
'我的题库'
,
nothing
:
process
.
uniEnv
.
qn_base_url
+
'zanwucuoti@3x.png'
,
nothing
:
process
.
uniEnv
.
qn_base_url
+
'zanwucuoti@3x.png'
,
lists
:
null
,
lists
:
[]
,
}
}
},
},
onLoad
()
{
onLoad
()
{
...
@@ -107,18 +107,19 @@ export default {
...
@@ -107,18 +107,19 @@ export default {
case
15
:
case
15
:
status
=
'已失效'
status
=
'已失效'
data
[
i
].
statusStyle
=
{
color
:
'#9EA5BB'
}
data
[
i
].
statusStyle
=
{
color
:
'#9EA5BB'
}
data
[
i
].
subtitle
=
'题库已
失效
'
data
[
i
].
subtitle
=
'题库已
过期
'
break
break
default
:
default
:
break
break
}
}
data
[
i
].
status
=
status
data
[
i
].
status
=
status
this
.
lists
.
push
(
data
[
i
])
}
}
if
(
data
.
length
>
0
)
{
//
if (data.length > 0) {
this
.
lists
=
data
//
this.lists = data
console
.
log
(
'tiku data'
,
data
)
//
console.log('tiku data', data)
}
//
}
})
})
},
},
getTodayDate
()
{
getTodayDate
()
{
...
...
src/pages/mine/certify.vue
View file @
227de48b
...
@@ -15,7 +15,9 @@
...
@@ -15,7 +15,9 @@
<text
class=
"line-1"
<text
class=
"line-1"
>
请上传您的:
<text
class=
"name"
>
身份证
</text>
>
请上传您的:
<text
class=
"name"
>
身份证
</text>
</text>
</text>
<view
style=
"margin: 24rpx 0;"
>
<text
class=
"line-2"
>
请按照下面提示依次点击上传身份证正反面
</text>
<text
class=
"line-2"
>
请按照下面提示依次点击上传身份证正反面
</text>
</view>
<view
class=
"upload-image"
>
<view
class=
"upload-image"
>
<image
<image
class=
"cert-image"
class=
"cert-image"
...
@@ -159,6 +161,8 @@ export default {
...
@@ -159,6 +161,8 @@ export default {
this
.
student
.
identityNumber
=
res
.
number
this
.
student
.
identityNumber
=
res
.
number
})
})
.
catch
((
data
)
=>
{
.
catch
((
data
)
=>
{
this
.
student
.
name
=
''
this
.
student
.
identityNumber
=
''
this
.
$u
.
toast
(
'识别身份证信息错误'
)
this
.
$u
.
toast
(
'识别身份证信息错误'
)
})
})
})
})
...
@@ -176,6 +180,7 @@ export default {
...
@@ -176,6 +180,7 @@ export default {
this
.
student
.
certificateValidityDate
=
res
.
expire
this
.
student
.
certificateValidityDate
=
res
.
expire
})
})
.
catch
((
data
)
=>
{
.
catch
((
data
)
=>
{
this
.
student
.
certificateValidityDate
=
''
this
.
$u
.
toast
(
'识别身份证信息错误'
)
this
.
$u
.
toast
(
'识别身份证信息错误'
)
})
})
})
})
...
@@ -201,17 +206,14 @@ page {
...
@@ -201,17 +206,14 @@ page {
background-color
:
#f7f9fc
;
background-color
:
#f7f9fc
;
background-size
:
100%
920rpx
;
background-size
:
100%
920rpx
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
height
:
120vh
;
height
:
100vh
;
position
:
absolute
;
top
:
0
;
width
:
100%
;
width
:
100%
;
overflow-x
:
hidden
;
}
}
.content
{
.content
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
overflow
:
auto
;
}
}
.upload-image
{
.upload-image
{
padding
:
0
28rpx
;
padding
:
0
28rpx
;
...
...
src/pages/mine/info.vue
View file @
227de48b
...
@@ -150,41 +150,62 @@ export default {
...
@@ -150,41 +150,62 @@ export default {
})
})
},
},
getPhonenumber
(
e
)
{
getPhonenumber
(
e
)
{
var
that
=
this
console
.
log
(
'eeeee'
,
e
)
login
.
appLogin
().
then
((
res
)
=>
{
let
that
=
this
that
.
code
=
res
.
code
let
params
=
{}
var
code
=
that
.
code
if
(
e
&&
e
.
detail
)
{
if
(
e
&&
e
.
detail
)
{
if
(
e
.
detail
.
errMsg
.
indexOf
(
'user deny'
)
>
-
1
)
{
if
(
e
.
detail
.
errMsg
.
indexOf
(
'user deny'
)
>
-
1
)
{
//拒绝授权
//拒绝授权
return
}
else
if
(
e
.
detail
.
encryptedData
&&
e
.
detail
.
iv
)
{
}
else
if
(
e
.
detail
.
encryptedData
&&
e
.
detail
.
iv
)
{
//允许授权-解析-更新手机号
//允许授权-解析-更新手机号
let
params
=
{
params
=
{
encryptedData
:
e
.
detail
.
encryptedData
,
encryptedData
:
e
.
detail
.
encryptedData
,
iv
:
e
.
detail
.
iv
,
iv
:
e
.
detail
.
iv
,
}
}
}
else
{
that
.
$u
.
toast
(
e
.
detail
.
errMsg
)
return
}
}
else
{
that
.
$u
.
toast
(
'授权失败,请重新授权'
)
return
}
if
(
that
.
code
)
{
console
.
log
(
'走的第一个'
)
uni
.
checkSession
({
uni
.
checkSession
({
success
(
ccc
)
{
success
()
{
console
.
log
(
'走的第一个1'
)
//session_key 未过期,并且在本生命周期一直有效
//session_key 未过期,并且在本生命周期一直有效
params
.
code
=
code
params
.
code
=
that
.
code
that
.
$u
.
api
.
loginWechatAuth
(
params
).
then
((
res
)
=>
{
that
.
syncUserinfo
(
params
)
that
.
student
.
phoneNumber
=
res
.
phoneNumber
that
.
$u
.
api
.
updateUserInfo
({
phoneNumber
:
res
.
phoneNumber
,
})
})
},
},
fail
()
{
fail
()
{
console
.
log
(
'走的第一个2'
)
// session_key 已经失效,需要重新执行登录流程
// session_key 已经失效,需要重新执行登录流程
that
.
toLogin
()
that
.
toLogin
()
},
},
})
})
}
else
{
}
else
{
this
.
$u
.
toast
(
e
.
detail
.
errMsg
)
console
.
log
(
'走的第二个'
)
uni
.
login
({
provider
:
'weixin'
,
success
:
(
code_res
)
=>
{
if
(
code_res
.
errMsg
==
'login:ok'
)
{
that
.
code
=
code_res
.
code
params
.
code
=
code_res
.
code
that
.
syncUserinfo
(
params
)
}
}
}
else
{
},
this
.
$u
.
toast
(
'授权失败,请重新授权'
)
}
)
}
}
},
syncUserinfo
(
params
)
{
this
.
$u
.
api
.
loginWechatAuth
(
params
).
then
((
res
)
=>
{
this
.
student
.
phoneNumber
=
res
.
phoneNumber
this
.
$u
.
api
.
updateUserInfo
({
phoneNumber
:
res
.
phoneNumber
,
})
})
})
},
},
toLogin
()
{
toLogin
()
{
...
...
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