Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jd-vx-app
Project
Project
Details
Activity
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
Administrator
jd-vx-app
Commits
4be25f2d
Commit
4be25f2d
authored
Apr 25, 2022
by
肖健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
扫一扫联系车主完善
parent
99025b29
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
17 deletions
+28
-17
index.vue
pages/binding/index.vue
+28
-17
No files found.
pages/binding/index.vue
View file @
4be25f2d
...
@@ -92,7 +92,7 @@ export default {
...
@@ -92,7 +92,7 @@ export default {
}
}
})
})
},
},
async
wechatLogin
()
{
wechatLogin
()
{
wx
.
login
({
wx
.
login
({
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
this
.
code
=
res
.
code
this
.
code
=
res
.
code
...
@@ -141,13 +141,13 @@ export default {
...
@@ -141,13 +141,13 @@ export default {
title
:
'授权成功'
,
title
:
'授权成功'
,
duration
:
1500
duration
:
1500
})
})
uni
.
setStorageSync
(
'xcxIndexPath'
,
res
.
data
.
data
.
xcxIndexPath
);
uni
.
setStorageSync
(
"userToken"
,
res
.
data
.
data
.
token
)
uni
.
setStorageSync
(
"userToken"
,
res
.
data
.
data
.
token
)
if
(
this
.
scene
)
{
if
(
this
.
scene
)
{
let
param
=
{
code
:
this
.
scene
}
let
param
=
{
code
:
this
.
scene
}
opts
=
{
url
:
'/app/index/check/move/code'
,
method
:
'post'
}
opts
=
{
url
:
'/app/index/check/move/code'
,
method
:
'post'
}
that
.
http
.
httpTokenRequest
(
opts
,
param
).
then
(
res
=>
{
that
.
http
.
httpTokenRequest
(
opts
,
param
).
then
(
res
=>
{
console
.
info
(
res
);
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
bindFlag
)
{
if
(
res
.
data
.
data
.
bindFlag
)
{
that
.
gotoMoveCar
();
that
.
gotoMoveCar
();
...
@@ -200,23 +200,33 @@ export default {
...
@@ -200,23 +200,33 @@ export default {
},
},
},
},
onLoad
(
e
)
{
//默认加载
onLoad
(
e
)
{
//默认加载
// #ifdef MP-WEIXIN
if
(
e
.
query
)
{
//获取二维码携带的参数
//扫码后得到的参数
let
scene
=
decodeURIComponent
(
e
.
query
.
scene
)
// scene = scene.split('&')
// let data = {
// //场景值
// scene: e.scene
// }
this
.
scene
=
scene
;
}
this
.
wechatLogin
()
this
.
wechatLogin
()
var
pages
=
getCurrentPages
();
var
page
=
pages
[
pages
.
length
-
1
];
const
res
=
decodeURIComponent
(
page
.
options
);
console
.
log
(
res
.
scene
);
uni
.
showToast
({
title
:
'授权123'
+
res
.
scene
,
icon
:
'none'
,
})
// #ifdef MP-WEIXIN
if
(
e
.
query
)
{
//获取二维码携带的参数
//扫码后得到的参数
let
scene
=
decodeURIComponent
(
e
.
query
)
// scene = scene.split('&')
// let data = {
// //场景值
// scene: e.scene
// }
this
.
scene
=
scene
;
}
let
userToken
=
uni
.
getStorageSync
(
'userToken'
)
let
userToken
=
uni
.
getStorageSync
(
'userToken'
)
if
(
userToken
)
{
if
(
userToken
)
{
...
@@ -225,6 +235,7 @@ export default {
...
@@ -225,6 +235,7 @@ export default {
that
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
that
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
uni
.
setStorageSync
(
'xcxIndexPath'
,
res
.
data
.
data
.
xcxIndexPath
);
if
(
that
.
scene
)
{
if
(
that
.
scene
)
{
let
param
=
{
code
:
this
.
scene
}
let
param
=
{
code
:
this
.
scene
}
opts
=
{
url
:
'/app/index/check/move/code'
,
method
:
'post'
}
opts
=
{
url
:
'/app/index/check/move/code'
,
method
:
'post'
}
...
...
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