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
fe844c9d
Commit
fe844c9d
authored
Aug 10, 2021
by
linwenqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:授权手机号
parent
74880ce6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
info.vue
src/pages/mine/info.vue
+11
-0
No files found.
src/pages/mine/info.vue
View file @
fe844c9d
...
@@ -149,6 +149,7 @@ export default {
...
@@ -149,6 +149,7 @@ export default {
let
params
=
{}
let
params
=
{}
if
(
e
&&
e
.
detail
)
{
if
(
e
&&
e
.
detail
)
{
if
(
e
.
detail
.
errMsg
.
indexOf
(
'user deny'
)
>
-
1
)
{
if
(
e
.
detail
.
errMsg
.
indexOf
(
'user deny'
)
>
-
1
)
{
uni
.
hideLoading
()
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
'用户拒绝授权'
,
title
:
'用户拒绝授权'
,
type
:
'warning'
,
type
:
'warning'
,
...
@@ -162,6 +163,7 @@ export default {
...
@@ -162,6 +163,7 @@ export default {
iv
:
e
.
detail
.
iv
,
iv
:
e
.
detail
.
iv
,
}
}
}
else
{
}
else
{
uni
.
hideLoading
()
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
'用户取消授权'
,
title
:
'用户取消授权'
,
type
:
'warning'
,
type
:
'warning'
,
...
@@ -170,6 +172,7 @@ export default {
...
@@ -170,6 +172,7 @@ export default {
return
return
}
}
}
else
{
}
else
{
uni
.
hideLoading
()
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
'授权失败,请重新授权'
,
title
:
'授权失败,请重新授权'
,
type
:
'warning'
,
type
:
'warning'
,
...
@@ -202,8 +205,14 @@ export default {
...
@@ -202,8 +205,14 @@ export default {
},
},
})
})
},
},
inGetPhone
()
{
uni
.
showLoading
({
title
:
'授权中...'
,
})
},
refleshCode
()
{
refleshCode
()
{
let
that
=
this
let
that
=
this
this
.
inGetPhone
()
uni
.
login
({
uni
.
login
({
provider
:
'weixin'
,
provider
:
'weixin'
,
success
:
(
code_res
)
=>
{
success
:
(
code_res
)
=>
{
...
@@ -219,11 +228,13 @@ export default {
...
@@ -219,11 +228,13 @@ export default {
.
loginWechatAuth
(
params
)
.
loginWechatAuth
(
params
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
student
.
phoneNumber
=
res
.
phoneNumber
this
.
student
.
phoneNumber
=
res
.
phoneNumber
this
.
inGetPhone
()
this
.
$u
.
api
this
.
$u
.
api
.
updateUserInfo
({
.
updateUserInfo
({
phoneNumber
:
res
.
phoneNumber
,
phoneNumber
:
res
.
phoneNumber
,
})
})
.
then
((
ret
)
=>
{
.
then
((
ret
)
=>
{
uni
.
hideLoading
()
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
'绑定成功!'
,
title
:
'绑定成功!'
,
type
:
'success'
,
type
:
'success'
,
...
...
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