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
8c8c8b8e
Commit
8c8c8b8e
authored
May 30, 2022
by
lijiongliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
样式修改
parent
e01ff94e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
105 additions
and
69 deletions
+105
-69
home.vue
pages/home.vue
+90
-67
main.vue
pages/main.vue
+6
-0
scan.vue
pagesB/pages/move-car/scan.vue
+9
-2
No files found.
pages/home.vue
View file @
8c8c8b8e
...
...
@@ -57,7 +57,7 @@
<view
class=
"pooup-get-coupon"
v-if=
"pooupCoupon"
>
<view
class=
"coupon-box"
>
<image
src=
"../../../static/index/coupon3.png"
></image>
<view
class=
"close"
@
click=
"
pooupCoupon = false
"
>
<view
class=
"close"
@
click=
"
closeCoupon
"
>
X
</view>
<view
class=
"title"
>
...
...
@@ -92,7 +92,9 @@
carList
:[],
// 爱车列表
pooupCoupon
:
false
,
timerNum
:
3
,
timer
:
null
timer
:
null
,
clickState
:
false
};
},
methods
:
{
...
...
@@ -104,77 +106,99 @@
})
},
getPrice
()
{
let
that
=
this
let
token
=
uni
.
getStorageSync
(
'userToken'
);
if
(
!
token
)
{
uni
.
showModal
({
title
:
"未绑定账号"
,
content
:
"您没有绑定京东账号,请绑定后再领取"
,
success
:
function
(
res
){
if
(
res
.
confirm
)
{
that
.
goJdLogin
()
}
}
});
// uni.navigateTo({
// url: '/pages/binding/index?url=/pages/main&index=0'
// })
return
;
}
let
opts
=
{
url
:
'/app/user/info'
,
method
:
'get'
}
that
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
let
freeMoveFlag
=
res
.
data
.
data
.
freeMoveFlag
if
(
freeMoveFlag
)
{
// uni.showToast({
// title: "您的免费领取次数已用完",
// icon: 'none',
// duration: 2000,
// success:function(){
// }
// });
this
.
pooupCoupon
=
true
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
timerNum
>
0
){
this
.
timerNum
--
}
else
{
this
.
pooupCoupon
=
false
this
.
timerNum
=
3
uni
.
navigateToMiniProgram
({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
path
:
'pages/item/detail/detail?sku=100023585323'
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
success
(
res
)
{
// 打开成功
}
})
clearInterval
(
this
.
timer
)
if
(
this
.
clickState
==
false
){
uni
.
showLoading
({
title
:
"加载中"
})
this
.
clickState
=
true
let
that
=
this
let
token
=
uni
.
getStorageSync
(
'userToken'
);
if
(
!
token
)
{
uni
.
hideLoading
()
this
.
clickState
=
false
uni
.
showModal
({
title
:
"未绑定账号"
,
content
:
"您没有绑定京东账号,请绑定后再领取"
,
success
:
function
(
res
){
if
(
res
.
confirm
)
{
that
.
goJdLogin
()
}
},
1000
)
}
else
{
//跳转到领取优惠卷页面
// uni.navigateTo({
// url: '/pagesA/pages/index/getPrice?orderId=' + this.freeCode.id
// });
uni
.
showLoading
({
title
:
'加载中'
}
});
// uni.navigateTo({
// url: '/pages/binding/index?url=/pages/main&index=0'
// })
return
;
}
let
opts
=
{
url
:
'/app/user/info'
,
method
:
'get'
}
that
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
uni
.
hideLoading
()
let
freeMoveFlag
=
res
.
data
.
data
.
freeMoveFlag
if
(
freeMoveFlag
)
{
// uni.showToast({
// title: "您的免费领取次数已用完",
// icon: 'none',
// duration: 2000,
// success:function(){
// }
// });
this
.
pooupCoupon
=
true
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
timerNum
>
0
){
this
.
timerNum
--
}
else
{
this
.
pooupCoupon
=
false
this
.
timerNum
=
3
this
.
clickState
=
false
uni
.
navigateToMiniProgram
({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
path
:
'pages/item/detail/detail?sku=100023585323'
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
success
(
res
)
{
// 打开成功
}
})
clearInterval
(
this
.
timer
)
}
},
1000
)
}
else
{
//跳转到领取优惠卷页面
// uni.navigateTo({
// url: '/pagesA/pages/index/getPrice?orderId=' + this.freeCode.id
// });
// uni.showLoading({
// title: '加载中'
// });
this
.
getCarList
()
}
}
else
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"error"
,
});
this
.
getCarList
()
}
}
})
})
}
},
closeCoupon
(){
this
.
pooupCoupon
=
false
this
.
timerNum
=
3
this
.
clickState
=
false
clearInterval
(
this
.
timer
)
},
// 已领取优惠券按钮
goBuy
(){
this
.
timerNum
=
3
this
.
clickState
=
false
clearInterval
(
this
.
timer
)
uni
.
navigateToMiniProgram
({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
...
...
@@ -185,7 +209,6 @@
success
:(
res
)
=>
{
// 打开成功
this
.
pooupCoupon
=
false
},
fail
:()
=>
{
this
.
pooupCoupon
=
false
...
...
pages/main.vue
View file @
8c8c8b8e
...
...
@@ -329,6 +329,12 @@
})
}
}
else
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"error"
,
});
}
})
}
...
...
pagesB/pages/move-car/scan.vue
View file @
8c8c8b8e
...
...
@@ -134,7 +134,7 @@
</view>
</view>
</view>
<view
class=
"text-center"
style=
"padding-top:140rpx
;"
v-else
>
<view
style=
"padding-top:140rpx;text-align: center
;"
v-else
>
暂时没有车辆,请添加!
</view>
</view>
...
...
@@ -363,6 +363,7 @@ export default {
})
}
else
{
//绑定失败,展示失败信息
uni
.
hideLoading
()
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"error"
,
...
...
@@ -390,7 +391,13 @@ export default {
e
.
rules
.
value
=
this
.
model1
.
carInfo
.
carModel
}
})
}
}
else
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"error"
,
});
}
})
}
},
...
...
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