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