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
d519adff
Commit
d519adff
authored
May 27, 2022
by
lijiongliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
逻辑修改
parent
13981ac8
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
191 additions
and
135 deletions
+191
-135
api.js
common/api/api.js
+2
-2
manifest.json
manifest.json
+10
-7
pages.json
pages.json
+1
-1
home.vue
pages/home.vue
+19
-25
config.js
pages/login/config.js
+1
-1
main.vue
pages/main.vue
+63
-27
personal.vue
pages/personal.vue
+6
-2
shop.vue
pages/shop.vue
+3
-1
getCoupon.vue
pagesA/pages/index/getCoupon.vue
+64
-68
scan.vue
pagesB/pages/move-car/scan.vue
+22
-1
No files found.
common/api/api.js
View file @
d519adff
const
baseUrl
=
'https://r.ucaret.cn/test-api'
;
// const baseUrl = 'https://r.ucaret.cn/test-api'; // 开发地址
// const baseUrl = 'http://nrucci.natappfree.cc';
const
baseUrl
=
'https://jduniapp.uzosp.com'
;
// 线上地址
const
httpRequest
=
(
opts
,
data
)
=>
{
const
httpRequest
=
(
opts
,
data
)
=>
{
let
httpDefaultOpts
=
{
let
httpDefaultOpts
=
{
url
:
baseUrl
+
opts
.
url
,
url
:
baseUrl
+
opts
.
url
,
...
...
manifest.json
View file @
d519adff
...
@@ -61,7 +61,10 @@
...
@@ -61,7 +61,10 @@
"mp-weixin"
:
{
"mp-weixin"
:
{
"appid"
:
"wx8fd4dc1c4b9f6f41"
,
"appid"
:
"wx8fd4dc1c4b9f6f41"
,
"setting"
:
{
"setting"
:
{
"urlCheck"
:
false
"urlCheck"
:
false
,
"minified"
:
true
,
"es6"
:
true
,
"postcss"
:
false
},
},
"usingComponents"
:
true
,
"usingComponents"
:
true
,
"permission"
:
{
"permission"
:
{
...
@@ -69,10 +72,10 @@
...
@@ -69,10 +72,10 @@
"desc"
:
"你的位置信息将用于定位"
"desc"
:
"你的位置信息将用于定位"
}
}
},
},
"plugins"
:
{
"plugins"
:
{
"loginPlugin"
:
{
"loginPlugin"
:
{
"version"
:
"1.5.4"
,
"version"
:
"1.5.4"
,
"provider"
:
"wxefe655223916819e"
"provider"
:
"wxefe655223916819e"
}
}
}
}
},
},
...
...
pages.json
View file @
d519adff
...
@@ -275,7 +275,7 @@
...
@@ -275,7 +275,7 @@
},
},
"globalStyle"
:
{
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"
首页
"
,
"navigationBarTitleText"
:
""
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"backgroundColor"
:
"#ffffff"
,
"backgroundColor"
:
"#ffffff"
,
"rpxCalcMaxDeviceWidth"
:
750
,
//
rpx
计算所支持的最大设备宽度,单位
px,默认值为
960
"rpxCalcMaxDeviceWidth"
:
750
,
//
rpx
计算所支持的最大设备宽度,单位
px,默认值为
960
...
...
pages/home.vue
View file @
d519adff
...
@@ -95,8 +95,9 @@
...
@@ -95,8 +95,9 @@
methods
:
{
methods
:
{
goJdLogin
(){
goJdLogin
(){
let
returnPage
=
'/pages/main'
;
let
returnPage
=
'/pages/main'
;
let
pageType
=
"reLaunch"
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/login/index/index
"
url
:
"/pages/login/index/index
?returnPage="
+
returnPage
+
'&pageType='
+
pageType
})
})
},
},
getPrice
()
{
getPrice
()
{
...
@@ -136,11 +137,6 @@
...
@@ -136,11 +137,6 @@
// }
// }
// });
// });
this
.
pooupCoupon
=
true
this
.
pooupCoupon
=
true
// util.h5Init(); //
plugin
.
getLoginToken
().
then
((
res
=
{})
=>
{
//res.err_code 0 res.token_key
//tokenB
if
(
res
.
token_key
){
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
timerNum
>
0
){
if
(
this
.
timerNum
>
0
){
this
.
timerNum
--
this
.
timerNum
--
...
@@ -160,8 +156,6 @@
...
@@ -160,8 +156,6 @@
clearInterval
(
this
.
timer
)
clearInterval
(
this
.
timer
)
}
}
},
1000
)
},
1000
)
}
})
}
else
{
}
else
{
//跳转到领取优惠卷页面
//跳转到领取优惠卷页面
// uni.navigateTo({
// uni.navigateTo({
...
...
pages/login/config.js
View file @
d519adff
export
let
config
=
{
export
let
config
=
{
appid
:
1814
,
appid
:
1814
,
returnPage
:
'/pages/main'
,
returnPage
:
'/pages/main'
,
pageType
:
undefined
,
pageType
:
"switchTab"
,
isLogout
:
1
,
isLogout
:
1
,
noWXinfo
:
1
,
noWXinfo
:
1
,
h5path
:
undefined
,
h5path
:
undefined
,
...
...
pages/main.vue
View file @
d519adff
...
@@ -54,30 +54,7 @@
...
@@ -54,30 +54,7 @@
// 领券判断
// 领券判断
let
firstCoupon
=
uni
.
getStorageSync
(
'firstCoupon'
)
||
false
let
firstCoupon
=
uni
.
getStorageSync
(
'firstCoupon'
)
||
false
if
(
firstCoupon
){
if
(
firstCoupon
){
// let opts = { url: '/app/user/send/coupon', method: 'post' };
this
.
getCarList
()
// this.http.httpTokenRequest(opts, {}).then(res => {
// if(res.data.code == 200){
// }
// })
uni
.
removeStorageSync
(
'firstCoupon'
)
uni
.
showToast
({
title
:
"领取成功!"
,
icon
:
'none'
,
});
let
timer
=
setTimeout
(()
=>
{
uni
.
navigateToMiniProgram
({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
path
:
'pages/item/detail/detail?sku=100023585323'
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
success
:(
res
)
=>
{
// 打开成功
clearTimeout
(
timer
)
}
})
},
600
)
}
}
},
},
onReachBottom
()
{
onReachBottom
()
{
...
@@ -152,8 +129,10 @@
...
@@ -152,8 +129,10 @@
}
}
});
});
}
else
{
}
else
{
let
returnPage
=
'/pages/main'
;
let
pageType
=
"reLaunch"
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/login/index/index'
url
:
"/pages/login/index/index?returnPage="
+
returnPage
+
'&pageType='
+
pageType
})
})
}
}
break
;
break
;
...
@@ -204,8 +183,49 @@
...
@@ -204,8 +183,49 @@
}
}
})
})
},
},
// 获取爱车列表
getCarList
(){
uni
.
removeStorageSync
(
'firstCoupon'
)
let
opts
=
{
url
:
'/app/vehicleAdmin/list'
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
statusCode
==
200
)
{
this
.
carList
=
res
.
data
if
(
res
.
data
.
length
>
0
){
let
opts
=
{
url
:
'/app/user/send/coupon'
,
method
:
'post'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
uni
.
showToast
({
title
:
"领取成功!"
,
icon
:
'none'
,
});
let
timer
=
setTimeout
(()
=>
{
uni
.
navigateToMiniProgram
({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
path
:
'pages/item/detail/detail?sku=100023585323'
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
success
:(
res
)
=>
{
// 打开成功
clearTimeout
(
timer
)
}
})
},
600
)
}
})
}
else
{
uni
.
showToast
({
title
:
"请添加爱车后再领取!"
,
icon
:
'none'
,
duration
:
1500
});
}
}
})
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
console
.
log
(
option
,
888888888
)
// 静默授权获取openid
// 静默授权获取openid
let
openid
=
uni
.
getStorageSync
(
'openid'
);
let
openid
=
uni
.
getStorageSync
(
'openid'
);
if
(
!
openid
)
{
if
(
!
openid
)
{
...
@@ -240,7 +260,7 @@
...
@@ -240,7 +260,7 @@
token
,
token
,
message
message
}
=
res
;
}
=
res
;
console
.
log
(
res
,
22222222
)
console
.
log
(
res
,
"pin_key失效"
)
if
(
!
token
)
{
if
(
!
token
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/login/index/index"
url
:
"/pages/login/index/index"
...
@@ -289,6 +309,12 @@
...
@@ -289,6 +309,12 @@
that
.
gotoBindMoveCar
(
that
.
scene
);
that
.
gotoBindMoveCar
(
that
.
scene
);
}
}
uni
.
removeStorageSync
(
'scene'
)
uni
.
removeStorageSync
(
'scene'
)
}
else
{
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
'none'
,
duration
:
2000
});
}
}
})
})
}
}
...
@@ -302,16 +328,20 @@
...
@@ -302,16 +328,20 @@
})
})
}
else
{
}
else
{
// 判断是否扫码进入
// 判断是否扫码进入
console
.
log
(
"扫码进入但是未登录"
)
if
(
option
&&
option
.
scene
)
{
if
(
option
&&
option
.
scene
)
{
uni
.
setStorageSync
(
'scene'
,
decodeURIComponent
(
option
.
scene
))
uni
.
setStorageSync
(
'scene'
,
decodeURIComponent
(
option
.
scene
))
let
returnPage
=
'/pages/main'
;
let
pageType
=
"reLaunch"
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/login/index/index
"
url
:
"/pages/login/index/index
?returnPage="
+
returnPage
+
'&pageType='
+
pageType
})
})
}
}
}
}
}
else
{
}
else
{
// 判断是否扫码进入
// 判断是否扫码进入
if
(
option
&&
option
.
scene
)
{
if
(
option
&&
option
.
scene
)
{
console
.
log
(
option
.
scene
,
"扫码一登录"
)
//获取二维码携带的参数
//获取二维码携带的参数
//扫码后得到的参数
//扫码后得到的参数
that
.
scene
=
decodeURIComponent
(
option
.
scene
)
that
.
scene
=
decodeURIComponent
(
option
.
scene
)
...
@@ -327,6 +357,12 @@
...
@@ -327,6 +357,12 @@
}
else
{
}
else
{
that
.
gotoBindMoveCar
(
that
.
scene
);
that
.
gotoBindMoveCar
(
that
.
scene
);
}
}
}
else
{
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
'none'
,
duration
:
2000
});
}
}
})
})
}
}
...
...
pages/personal.vue
View file @
d519adff
...
@@ -152,8 +152,10 @@ export default {
...
@@ -152,8 +152,10 @@ export default {
// uni.navigateTo({
// uni.navigateTo({
// url: '/pages/binding/index?url=/pages/main&index=4'
// url: '/pages/binding/index?url=/pages/main&index=4'
// })
// })
let
returnPage
=
'/pages/main'
;
let
pageType
=
"reLaunch"
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/login/index/index'
url
:
"/pages/login/index/index?returnPage="
+
returnPage
+
'&pageType='
+
pageType
})
})
return
;
return
;
}
}
...
@@ -167,8 +169,10 @@ export default {
...
@@ -167,8 +169,10 @@ export default {
// uni.navigateTo({
// uni.navigateTo({
// url: '/pages/binding/index?url=/pages/main&index=4'
// url: '/pages/binding/index?url=/pages/main&index=4'
// })
// })
let
returnPage
=
'/pages/main'
;
let
pageType
=
"reLaunch"
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/login/index/index'
url
:
"/pages/login/index/index?returnPage="
+
returnPage
+
'&pageType='
+
pageType
})
})
return
;
return
;
}
}
...
...
pages/shop.vue
View file @
d519adff
...
@@ -157,8 +157,10 @@ export default {
...
@@ -157,8 +157,10 @@ export default {
goDetail
(
id
,
link
)
{
goDetail
(
id
,
link
)
{
let
token
=
uni
.
getStorageSync
(
'userToken'
);
let
token
=
uni
.
getStorageSync
(
'userToken'
);
if
(
!
token
){
if
(
!
token
){
let
returnPage
=
'/pages/main'
;
let
pageType
=
"reLaunch"
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/login/index/index'
url
:
"/pages/login/index/index?returnPage="
+
returnPage
+
'&pageType='
+
pageType
})
})
return
;
return
;
}
}
...
...
pagesA/pages/index/getCoupon.vue
View file @
d519adff
...
@@ -56,18 +56,58 @@
...
@@ -56,18 +56,58 @@
url
:
'/app/user/send/coupon'
,
url
:
'/app/user/send/coupon'
,
method
:
'post'
method
:
'post'
};
};
// this.http.httpTokenRequest(opts, {}).then(res => {
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
// console.log(res.data, 1111111)
console
.
log
(
res
.
data
,
1111111
)
// if (res.data.code == 200) {
if
(
res
.
data
.
code
==
200
)
{
uni
.
showToast
({
title
:
"领取成功!"
,
icon
:
'none'
,
});
this
.
pooupSuccess
=
true
let
timer
=
setInterval
(()
=>
{
if
(
this
.
timerNum
>
0
)
{
this
.
timerNum
--
}
else
{
this
.
pooupSuccess
=
false
this
.
timerNum
=
3
uni
.
navigateToMiniProgram
({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
path
:
'pages/item/detail/detail?sku=100023585323'
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
success
(
res
)
{
// 打开成功
}
})
clearInterval
(
timer
)
}
},
1000
)
}
else
if
(
res
.
data
.
code
==
1000000001
){
uni
.
showToast
({
title
:
"您已领取优惠券!"
,
icon
:
'none'
,
duration
:
1500
,
success
()
{
uni
.
navigateToMiniProgram
({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
path
:
'pages/item/detail/detail?sku=100023585323'
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
success
(
res
)
{
// 打开成功
}
})
}
});
}
})
// uni.showToast({
// uni.showToast({
// title: "领取成功!",
// title: "领取成功!",
// icon: 'none',
// icon: 'none',
// });
// });
// this.pooupSuccess = true
// this.pooupSuccess = true
//
let timer = setInterval(() =>
{
//
let timer = setInterval(()=>
{
//
if (this.timerNum > 0)
{
//
if(this.timerNum > 0)
{
//
this.timerNum
--
//
this.timerNum
--
//
} else
{
//
}else
{
// this.pooupSuccess = false
// this.pooupSuccess = false
// this.timerNum = 3
// this.timerNum = 3
// uni.navigateToMiniProgram({
// uni.navigateToMiniProgram({
...
@@ -82,51 +122,7 @@
...
@@ -82,51 +122,7 @@
// })
// })
// clearInterval(timer)
// clearInterval(timer)
// }
// }
// }, 1000)
// },1000)
// }else if(res.data.code == 1000000001){
// uni.showToast({
// title: "您已领取优惠券!",
// icon: 'none',
// duration:1500,
// success() {
// uni.navigateToMiniProgram({
// appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id
// path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径
// extraData: { // 需要携带的参数
// },
// success(res) {
// // 打开成功
// }
// })
// }
// });
// }
// })
uni
.
showToast
({
title
:
"领取成功!"
,
icon
:
'none'
,
});
this
.
pooupSuccess
=
true
let
timer
=
setInterval
(()
=>
{
if
(
this
.
timerNum
>
0
){
this
.
timerNum
--
}
else
{
this
.
pooupSuccess
=
false
this
.
timerNum
=
3
uni
.
navigateToMiniProgram
({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
path
:
'pages/item/detail/detail?sku=100023585323'
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
success
(
res
)
{
// 打开成功
}
})
clearInterval
(
timer
)
}
},
1000
)
},
},
goUseCoupon
()
{
goUseCoupon
()
{
this
.
timerNum
=
3
;
this
.
timerNum
=
3
;
...
...
pagesB/pages/move-car/scan.vue
View file @
d519adff
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<u-checkbox-group
placement=
"row"
>
<u-checkbox-group
placement=
"row"
>
<u-checkbox
:checked=
'checked'
@
change=
"changeBtn"
></u-checkbox>
<u-checkbox
:checked=
'checked'
@
change=
"changeBtn"
></u-checkbox>
</u-checkbox-group>
</u-checkbox-group>
请先阅读并同意
<span
@
click=
"goArticle"
>
《京东挪车牌隐私权政策》
</span>
请先阅读并同意
<span
@
click=
"goArticle
(2)
"
>
《京东挪车牌隐私权政策》
</span>
</div>
</div>
</div>
</div>
<div
class=
"view__btn view__no__bind"
@
click=
"confirmBinding"
>
<div
class=
"view__btn view__no__bind"
@
click=
"confirmBinding"
>
...
@@ -209,6 +209,27 @@ export default {
...
@@ -209,6 +209,27 @@ export default {
})
})
}
}
},
},
// 跳转协议政策页面
goArticle
(
index
)
{
let
opts
=
{
url
:
''
,
method
:
'get'
};
if
(
index
==
1
)
{
opts
.
url
=
"/app/user/registerAgreement"
}
else
{
opts
.
url
=
"/app/user/ofPrivacy"
}
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
let
data
=
res
.
data
.
msg
uni
.
setStorageSync
(
"articelContent"
,
data
)
uni
.
navigateTo
({
url
:
'/pages/binding/article'
});
}
})
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
moveCode
=
option
.
moveCode
this
.
moveCode
=
option
.
moveCode
...
...
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