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
74880ce6
Commit
74880ce6
authored
Aug 09, 2021
by
linwenqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:授权手机号:1、授权手机号一次以后再授权失败,2、安卓手机点设备返回键提示微信自带的英文提示
parent
42e8efbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
22 deletions
+21
-22
info.vue
src/pages/mine/info.vue
+21
-22
No files found.
src/pages/mine/info.vue
View file @
74880ce6
...
...
@@ -36,7 +36,7 @@
</view>
</u-cell-item>
<u-cell-item
title=
"手机号"
>
<view
slot=
"right-icon"
>
<view
slot=
"right-icon"
@
click
.
capture=
"refleshCode"
>
<button
open-type=
"getPhoneNumber"
@
getphonenumber=
"getPhonenumber"
...
...
@@ -118,7 +118,6 @@ export default {
},
onLoad
()
{
getApp
().
trackPage
(
'我的信息'
)
this
.
refleshCode
()
this
.
$u
.
api
.
getQiNiuToken
({
bucketName
:
'wsy-exam'
}).
then
((
res
)
=>
{
this
.
qiToken
=
res
getApp
().
globalData
.
qiNiuToken
=
res
...
...
@@ -150,7 +149,11 @@ export default {
let
params
=
{}
if
(
e
&&
e
.
detail
)
{
if
(
e
.
detail
.
errMsg
.
indexOf
(
'user deny'
)
>
-
1
)
{
//拒绝授权
this
.
$refs
.
uToast
.
show
({
title
:
'用户拒绝授权'
,
type
:
'warning'
,
duration
:
2000
,
})
return
}
else
if
(
e
.
detail
.
encryptedData
&&
e
.
detail
.
iv
)
{
//允许授权-解析-更新手机号
...
...
@@ -160,8 +163,8 @@ export default {
}
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
e
.
detail
.
errMsg
,
type
:
'
error
'
,
title
:
'用户取消授权'
,
type
:
'
warning
'
,
duration
:
2000
,
})
return
...
...
@@ -169,7 +172,7 @@ export default {
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
'授权失败,请重新授权'
,
type
:
'
error
'
,
type
:
'
warning
'
,
duration
:
2000
,
})
return
...
...
@@ -195,11 +198,7 @@ export default {
},
fail
()
{
// session_key 已经失效,需要重新执行登录流程
setTimeout
(()
=>
{
uni
.
navigateTo
({
url
:
'pages/login/index'
,
})
},
800
)
that
.
toLogin
()
},
})
},
...
...
@@ -233,17 +232,7 @@ export default {
})
})
.
catch
((
err
)
=>
{
this
.
$refs
.
uToast
.
show
({
title
:
'请登录后再绑定'
,
type
:
'warning'
,
duration
:
2000
,
})
this
.
$u
.
route
({
url
:
'pages/login/index'
,
params
:
{
path
:
'pages/mine/info'
,
},
})
this
.
toLogin
()
})
},
changeHead
()
{
...
...
@@ -279,6 +268,13 @@ export default {
this
.
$u
.
api
.
updateUserInfo
(
params
)
})
},
userRefuseTip
()
{
this
.
$refs
.
uToast
.
show
({
title
:
'用户拒绝授权'
,
type
:
'warning'
,
duration
:
2000
,
})
},
toLogin
()
{
this
.
$refs
.
uToast
.
show
({
title
:
'登录信息已失效,请重新登录'
,
...
...
@@ -288,6 +284,9 @@ export default {
setTimeout
(()
=>
{
uni
.
navigateTo
({
url
:
'pages/login/index'
,
params
:
{
path
:
'pages/mine/info'
,
},
})
},
800
)
},
...
...
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