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
f11d622a
Commit
f11d622a
authored
Apr 24, 2022
by
肖健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接扫码跳转逻辑
parent
516f5268
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
22 deletions
+60
-22
index.vue
pages/binding/index.vue
+43
-9
oneMoveCar.vue
pagesB/pages/move-car/oneMoveCar.vue
+17
-13
No files found.
pages/binding/index.vue
View file @
f11d622a
...
@@ -111,10 +111,21 @@ export default {
...
@@ -111,10 +111,21 @@ export default {
uni
.
setStorageSync
(
"userToken"
,
res
.
data
.
data
.
token
)
uni
.
setStorageSync
(
"userToken"
,
res
.
data
.
data
.
token
)
if
(
this
.
scene
)
{
if
(
this
.
scene
)
{
this
.
gotoMoveCar
();
let
param
=
{
code
:
this
.
scene
}
opts
=
{
url
:
'/app/index/check/move/code'
,
method
:
'post'
}
that
.
http
.
httpTokenRequest
(
opts
,
param
).
then
(
res
=>
{
console
.
info
(
res
);
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
bindFlag
)
{
that
.
gotoMoveCar
();
}
else
{
that
.
gotoBindMoveCar
();
}
}
})
}
else
{
}
else
{
//跳转到绑定页面
that
.
gotoIndex
()
this
.
gotoIndex
()
}
}
}
else
{
}
else
{
...
@@ -130,7 +141,9 @@ export default {
...
@@ -130,7 +141,9 @@ export default {
gotoIndex
()
{
gotoIndex
()
{
//跳转到绑定页面
//跳转到绑定页面
uni
.
reLaunch
({
//信息更新成功后跳转到小程序首页
uni
.
reLaunch
({
//信息更新成功后跳转到小程序首页
url
:
'/pages/binding/binding'
//todo 京东账号绑定界面暂缓
//url: '/pages/binding/binding'
url
:
'/pagesA/pages/index/index'
})
})
// uni.navigateTo({
// uni.navigateTo({
...
@@ -138,10 +151,18 @@ export default {
...
@@ -138,10 +151,18 @@ export default {
// });
// });
},
},
//调整到挪车页面
//跳转到挪车页面
gotoMoveCar
(
scene
)
{
gotoMoveCar
()
{
let
that
=
this
;
uni
.
navigateTo
({
url
:
'/pagesB/pages/move-car/oneMoveCar?scene='
+
that
.
scene
});
},
//跳转到绑定页面
gotoBindMoveCar
()
{
let
that
=
this
;
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pagesB/pages/move-car/
oneMoveCar?scene='
+
scene
url
:
'/pagesB/pages/move-car/
scan?moveCode='
+
that
.
scene
});
});
},
},
},
},
...
@@ -161,6 +182,7 @@ export default {
...
@@ -161,6 +182,7 @@ export default {
}
}
this
.
wechatLogin
()
this
.
wechatLogin
()
let
userToken
=
uni
.
getStorageSync
(
'userToken'
)
let
userToken
=
uni
.
getStorageSync
(
'userToken'
)
...
@@ -170,8 +192,20 @@ export default {
...
@@ -170,8 +192,20 @@ export default {
that
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
that
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
if
(
this
.
scene
)
{
if
(
that
.
scene
)
{
this
.
gotoMoveCar
();
let
param
=
{
code
:
this
.
scene
}
opts
=
{
url
:
'/app/index/check/move/code'
,
method
:
'post'
}
that
.
http
.
httpTokenRequest
(
opts
,
param
).
then
(
res
=>
{
console
.
info
(
res
);
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
bindFlag
)
{
that
.
gotoMoveCar
();
}
else
{
that
.
gotoBindMoveCar
();
}
}
})
}
else
{
}
else
{
this
.
gotoIndex
()
this
.
gotoIndex
()
}
}
...
...
pagesB/pages/move-car/oneMoveCar.vue
View file @
f11d622a
...
@@ -15,10 +15,11 @@
...
@@ -15,10 +15,11 @@
当前位置:
当前位置:
</div>
</div>
<div
class=
"item__value"
>
<div
class=
"item__value"
>
北京市朝阳区爱琴海停车场
<!-- //todo 这个滚动通知有一个padding的设置项,导致高度增加不少,需要解决 -->
<div
class=
"item__icon"
>
<u-notice-bar
:text=
"appBo.detailInfo"
icon=
" "
single=
"true"
color=
"#333333"
height=
"35"
bgColor=
"#ffffff"
fontSize=
"30rpx"
></u-notice-bar>
<image
src=
"@/static/move-car/move-car-code1.png"
/>
<div
class=
"item__icon"
>
</div>
<image
src=
"@/static/move-car/move-car-code1.png"
/>
</div>
</div>
</div>
</div>
</div>
<div
class=
"car_item__three"
>
<div
class=
"car_item__three"
>
...
@@ -216,7 +217,7 @@ export default {
...
@@ -216,7 +217,7 @@ export default {
// 2)需要当前地理位置的经纬度
// 2)需要当前地理位置的经纬度
// 3)小程序的key值
// 3)小程序的key值
loadCity
(
longitude
,
latitude
)
{
loadCity
(
longitude
,
latitude
)
{
const
_this
=
this
const
that
=
this
uni
.
request
({
uni
.
request
({
header
:
{
header
:
{
'Content-Type'
:
'application/text'
,
'Content-Type'
:
'application/text'
,
...
@@ -233,19 +234,19 @@ export default {
...
@@ -233,19 +234,19 @@ export default {
if
(
res
.
data
.
status
===
'1'
)
{
if
(
res
.
data
.
status
===
'1'
)
{
let
addressInfo
=
res
.
data
let
addressInfo
=
res
.
data
//详细地址
//详细地址
_this
.
detailInfo
=
addressInfo
.
regeocode
.
formatted_address
that
.
appBo
.
detailInfo
=
addressInfo
.
regeocode
.
formatted_address
//省
//省
_this
.
provinceName
=
addressInfo
.
regeocode
.
addressComponent
.
province
that
.
appBo
.
provinceName
=
addressInfo
.
regeocode
.
addressComponent
.
province
//市,直辖市有可能为空数组
//市,直辖市有可能为空数组
_this
.
cityName
=
addressInfo
.
regeocode
.
addressComponent
.
city
that
.
appBo
.
cityName
=
addressInfo
.
regeocode
.
addressComponent
.
city
//为数组的时候设置为空
//为数组的时候设置为空
if
(
Array
.
isArray
(
cityName
))
{
if
(
Array
.
isArray
(
that
.
appBo
.
cityName
))
{
_this
.
cityName
=
''
that
.
appBo
.
cityName
=
''
}
}
//区
//区
_this
.
countyName
=
addressInfo
.
regeocode
.
addressComponent
.
district
that
.
appBo
.
countyName
=
addressInfo
.
regeocode
.
addressComponent
.
district
console
.
log
(
"当前位置: "
+
_this
.
detailInfo
+
" "
+
_this
.
provinceName
+
" "
+
" "
+
_this
.
cityName
+
" "
+
_this
.
countyName
)
console
.
log
(
"当前位置: "
+
that
.
appBo
.
detailInfo
+
" "
+
that
.
appBo
.
provinceName
+
" "
+
" "
+
that
.
appBo
.
cityName
+
" "
+
that
.
appBo
.
countyName
)
}
}
}
else
{
}
else
{
console
.
log
(
'获取信息失败,请重试!'
)
console
.
log
(
'获取信息失败,请重试!'
)
...
@@ -254,7 +255,7 @@ export default {
...
@@ -254,7 +255,7 @@ export default {
})
})
}
}
},
},
onLoad
()
{
onLoad
(
e
)
{
// 在页面加载的时候去判断用户有没有授权地理位置,没授权的话引导用户去设置页手动授权
// 在页面加载的时候去判断用户有没有授权地理位置,没授权的话引导用户去设置页手动授权
this
.
getAuthorize
()
this
.
getAuthorize
()
if
(
e
.
query
)
{
if
(
e
.
query
)
{
...
@@ -276,6 +277,9 @@ export default {
...
@@ -276,6 +277,9 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.u-notice-bar
{
padding
:
0
!
important
;
}
.oneMoveCar
{
.oneMoveCar
{
.u-checkbox-group
{
.u-checkbox-group
{
...
...
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