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
8fadcda9
Commit
8fadcda9
authored
Apr 20, 2022
by
fwz
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_cd' into dev_cd
parents
cb60584c
64fe94d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
5 deletions
+53
-5
index.vue
pages/binding/index.vue
+39
-5
oneMoveCar.vue
pagesB/pages/move-car/oneMoveCar.vue
+14
-0
No files found.
pages/binding/index.vue
View file @
8fadcda9
...
...
@@ -43,6 +43,7 @@ export default {
isCanUse2
:
false
,
//默认为true
openid
:
''
,
nc_protocol
:
false
,
scene
:
""
,
}
},
methods
:
{
...
...
@@ -103,8 +104,13 @@ export default {
duration
:
1500
})
uni
.
setStorageSync
(
"userToken"
,
res
.
data
.
data
.
token
)
//跳转到绑定页面
this
.
gotoIndex
()
if
(
this
.
scene
)
{
this
.
gotoMoveCar
();
}
else
{
//跳转到绑定页面
this
.
gotoIndex
()
}
}
else
{
uni
.
showToast
({
...
...
@@ -126,10 +132,32 @@ export default {
// url: '/pages/binding/binding'
// });
}
},
//调整到挪车页面
gotoMoveCar
(
scene
)
{
uni
.
navigateTo
({
url
:
'/pagesB/pages/move-car/oneMoveCar?scene='
+
scene
});
},
},
onLoad
()
{
//默认加载
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
()
let
userToken
=
uni
.
getStorageSync
(
'userToken'
)
if
(
userToken
)
{
let
that
=
this
...
...
@@ -137,7 +165,12 @@ export default {
that
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
gotoIndex
()
if
(
this
.
scene
)
{
this
.
gotoMoveCar
();
}
else
{
this
.
gotoIndex
()
}
}
else
{
uni
.
showToast
({
title
:
'授权失败'
,
...
...
@@ -149,6 +182,7 @@ export default {
}
else
{
this
.
isCanUse2
=
true
}
// #endif
}
}
</
script
>
...
...
pagesB/pages/move-car/oneMoveCar.vue
View file @
8fadcda9
...
...
@@ -101,6 +101,20 @@ export default {
})
},
},
onLoad
()
{
if
(
e
.
query
)
{
//获取二维码携带的参数
//扫码后得到的参数
let
scene
=
decodeURIComponent
(
e
.
query
.
scene
)
// scene = scene.split('&')
// let data = {
// //场景值
// scene: e.scene
// }
console
.
log
(
'scene: '
+
scene
);
}
}
}
</
script
>
...
...
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