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
f695305c
Commit
f695305c
authored
May 30, 2022
by
lijiongliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
4d686bce
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
127 additions
and
100 deletions
+127
-100
main.vue
pages/main.vue
+65
-55
moveCar.vue
pages/moveCar.vue
+50
-38
loveCar.vue
pagesB/pages/move-car/loveCar.vue
+3
-2
scan.vue
pagesB/pages/move-car/scan.vue
+9
-5
No files found.
pages/main.vue
View file @
f695305c
...
...
@@ -37,6 +37,7 @@
tab
:
"index"
,
page
:
1
,
scene
:
null
,
// 二维码携带参数
scanClick
:
true
,
//扫一扫节流
}
},
computed
:
{
...
...
@@ -78,66 +79,75 @@
case
2
:
let
token
=
uni
.
getStorageSync
(
'userToken'
);
if
(
token
)
{
uni
.
scanCode
({
success
:
function
(
res
)
{
let
path
=
res
.
path
if
(
this
.
scanClick
){
this
.
scanClick
=
false
setTimeout
(()
=>
{
uni
.
scanCode
({
success
:
(
res
)
=>
{
this
.
scanClick
=
true
let
path
=
res
.
path
let
opts
=
{
url
:
'/app/user/info'
,
method
:
'get'
}
that
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
let
xcxIndexPath
=
res
.
data
.
data
.
xcxIndexPath
console
.
log
(
xcxIndexPath
,
path
,
'扫一扫进入'
)
if
(
xcxIndexPath
)
{
xcxIndexPath
=
path
.
replace
(
xcxIndexPath
,
''
).
replace
(
"?"
,
''
)
if
(
xcxIndexPath
.
indexOf
(
'scene'
)
>=
0
)
{
let
scene
=
xcxIndexPath
.
replace
(
'scene='
,
''
)
let
param
=
{
code
:
scene
}
let
opts
=
{
url
:
'/app/user/check/move/code'
,
method
:
'post'
}
that
.
http
.
httpTokenRequest
(
opts
,
param
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
bindFlag
)
{
that
.
gotoMoveCar
(
scene
)
}
else
{
that
.
gotoBindMoveCar
(
scene
)
}
}
else
{
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
'none'
,
});
let
opts
=
{
url
:
'/app/user/info'
,
method
:
'get'
}
that
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
let
xcxIndexPath
=
res
.
data
.
data
.
xcxIndexPath
console
.
log
(
xcxIndexPath
,
path
,
'扫一扫进入'
)
if
(
xcxIndexPath
)
{
xcxIndexPath
=
path
.
replace
(
xcxIndexPath
,
''
).
replace
(
"?"
,
''
)
if
(
xcxIndexPath
.
indexOf
(
'scene'
)
>=
0
)
{
let
scene
=
xcxIndexPath
.
replace
(
'scene='
,
''
)
let
param
=
{
code
:
scene
}
let
opts
=
{
url
:
'/app/user/check/move/code'
,
method
:
'post'
}
that
.
http
.
httpTokenRequest
(
opts
,
param
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
bindFlag
)
{
that
.
gotoMoveCar
(
scene
)
}
else
{
that
.
gotoBindMoveCar
(
scene
)
}
}
else
{
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
'none'
,
});
}
})
}
else
{
uni
.
showToast
({
title
:
'扫码失败'
,
icon
:
'none'
,
})
}
}
else
{
uni
.
showToast
({
title
:
'扫码失败'
,
icon
:
'none'
,
})
}
else
{
}
}
else
{
uni
.
showToast
({
title
:
'扫码失败'
,
title
:
res
.
data
.
msg
,
icon
:
'none'
,
})
})
;
}
}
else
{
uni
.
showToast
({
title
:
'扫码失败'
,
icon
:
'none'
,
})
}
}
else
{
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
'none'
,
});
})
},
fail
:
()
=>
{
this
.
scanClick
=
true
}
})
}
}
);
})
;
}
,
300
)
}
}
else
{
let
returnPage
=
'/pages/main'
;
let
pageType
=
"reLaunch"
...
...
@@ -235,7 +245,6 @@
}
},
onLoad
(
option
)
{
console
.
log
(
option
,
888888888
)
// 静默授权获取openid
let
openid
=
uni
.
getStorageSync
(
'openid'
);
if
(
!
openid
)
{
...
...
@@ -261,7 +270,8 @@
let
ptKey
=
plugin
.
getPtKey
();
if
(
ptKey
)
{
uni
.
showLoading
({
title
:
'登录中'
title
:
'登录中'
,
mask
:
true
});
plugin
.
isvObfuscator
({
url
:
'https://wxapplogin2.m.jd.com/cgi-bin/login/isv/isvObfuscator'
...
...
pages/moveCar.vue
View file @
f695305c
...
...
@@ -53,7 +53,8 @@ export default {
url
:
"/pagesB/pages/move-car/myRecord"
,
title
:
"我的挪车记录"
},
]
],
scanClick
:
true
,
//扫一扫节流
}
},
methods
:
{
...
...
@@ -79,43 +80,54 @@ export default {
// url: vo.url
// })
//扫码
uni
.
scanCode
({
success
:
function
(
res
)
{
let
path
=
res
.
path
if
(
path
)
{
let
xcxIndexPath
=
uni
.
getStorageSync
(
'xcxIndexPath'
)
if
(
xcxIndexPath
)
{
xcxIndexPath
=
path
.
replace
(
xcxIndexPath
,
''
).
replace
(
"?"
,
''
)
if
(
xcxIndexPath
.
indexOf
(
'scene'
)
>=
0
)
{
let
scene
=
xcxIndexPath
.
replace
(
'scene='
,
''
)
let
param
=
{
code
:
scene
}
let
opts
=
{
url
:
'/app/user/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
(
scene
)
}
else
{
that
.
gotoBindMoveCar
(
scene
)
}
}
})
}
}
}
else
{
uni
.
showToast
({
title
:
'扫码失败'
,
icon
:
'none'
,
})
}
}
});
if
(
this
.
scanClick
){
this
.
scanClick
=
false
;
setTimeout
(()
=>
{
uni
.
scanCode
({
success
:(
res
)
=>
{
this
.
scanClick
=
true
let
path
=
res
.
path
if
(
path
)
{
let
paths
=
path
.
split
(
'?'
)[
1
]
let
scene
=
paths
.
split
(
"="
)[
1
]
let
param
=
{
code
:
scene
}
let
opts
=
{
url
:
'/app/user/check/move/code'
,
method
:
'post'
}
that
.
http
.
httpTokenRequest
(
opts
,
param
).
then
(
res
=>
{
console
.
log
(
res
,
"扫码通知车主"
)
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
bindFlag
)
{
that
.
gotoMoveCar
(
scene
)
}
else
{
that
.
gotoBindMoveCar
(
scene
)
}
}
else
{
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
'none'
,
icon
:
'error'
,
})
}
})
}
else
{
uni
.
showToast
({
title
:
"扫码失败!"
,
icon
:
'error'
,
})
}
},
fail
:
()
=>
{
this
.
scanClick
=
true
}
});
},
300
)
}
}
},
//跳转到挪车页面
...
...
pagesB/pages/move-car/loveCar.vue
View file @
f695305c
...
...
@@ -15,7 +15,7 @@
</div>
<div
class=
"item__title"
@
click=
"goGetPrice(vo.id)"
>
<view
class=
"title"
>
{{
vo
.
brand
}}
{{
vo
.
brand
+
"-"
+
item
.
seriesName
}}
</view>
<view
class=
"type"
>
{{
vo
.
carModel
}}
...
...
@@ -107,7 +107,8 @@ export default {
},
getCarList
(){
uni
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
,
mask
:
true
});
let
opts
=
{
url
:
'/app/vehicleAdmin/list'
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
...
...
pagesB/pages/move-car/scan.vue
View file @
f695305c
...
...
@@ -270,7 +270,8 @@ export default {
// 获取爱车列表
getCarList
(){
uni
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
,
mask
:
true
});
let
opts
=
{
url
:
'/app/vehicleAdmin/list'
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
...
...
@@ -298,7 +299,8 @@ export default {
return
;
}
uni
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
,
mask
:
true
});
let
opts
=
{
url
:
'/app/smsCode/binding/'
,
method
:
'post'
};
this
.
http
.
httpTokenRequest
(
opts
,{
phone
:
this
.
model1
.
userMobile
}).
then
(
res
=>
{
...
...
@@ -344,7 +346,8 @@ export default {
return
;
}
uni
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
,
mask
:
true
});
let
opts
=
{
url
:
'/app/moveCode/binding/'
,
...
...
@@ -374,7 +377,8 @@ export default {
getCarInfo
()
{
if
(
this
.
carId
)
{
uni
.
showLoading
({
title
:
"加载中"
title
:
"加载中"
,
mask
:
true
})
let
opts
=
{
url
:
'/app/vehicleAdmin/'
+
this
.
carId
,
...
...
@@ -638,7 +642,7 @@ export default {
width
:
100%
;
background-color
:
#fff
;
text-align
:
center
;
padding
:
30rpx
;
padding
:
30rpx
0
;
.title
{
font-size
:
28rpx
;
color
:
#666
;
...
...
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