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
8d45765f
Commit
8d45765f
authored
May 30, 2022
by
lijiongliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
样式修改
parent
8c8c8b8e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
59 deletions
+79
-59
manifest.json
manifest.json
+1
-1
home.vue
pages/home.vue
+9
-5
main.vue
pages/main.vue
+1
-1
getCoupon.vue
pagesA/pages/index/getCoupon.vue
+68
-52
No files found.
manifest.json
View file @
8d45765f
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
"quickapp"
:
{},
"quickapp"
:
{},
/*
小程序特有相关
*/
/*
小程序特有相关
*/
"mp-weixin"
:
{
"mp-weixin"
:
{
"appid"
:
"wx
8fd4dc1c4b9f6f41
"
,
"appid"
:
"wx
237e45bea2220a37
"
,
"setting"
:
{
"setting"
:
{
"urlCheck"
:
false
,
"urlCheck"
:
false
,
"minified"
:
true
,
"minified"
:
true
,
...
...
pages/home.vue
View file @
8d45765f
...
@@ -93,8 +93,7 @@
...
@@ -93,8 +93,7 @@
pooupCoupon
:
false
,
pooupCoupon
:
false
,
timerNum
:
3
,
timerNum
:
3
,
timer
:
null
,
timer
:
null
,
clickState
:
false
clickState
:
false
,
// 立即领取 防抖
};
};
},
},
methods
:
{
methods
:
{
...
@@ -177,7 +176,9 @@
...
@@ -177,7 +176,9 @@
// uni.showLoading({
// uni.showLoading({
// title: '加载中'
// title: '加载中'
// });
// });
this
.
getCarList
()
this
.
timer
=
setTimeout
(()
=>
{
this
.
getCarList
()
},
500
)
}
}
}
else
{
}
else
{
uni
.
hideLoading
()
uni
.
hideLoading
()
...
@@ -263,9 +264,11 @@
...
@@ -263,9 +264,11 @@
getCarList
(){
getCarList
(){
let
opts
=
{
url
:
'/app/vehicleAdmin/list'
,
method
:
'get'
};
let
opts
=
{
url
:
'/app/vehicleAdmin/list'
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
clearInterval
(
this
.
timer
)
uni
.
hideLoading
()
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
statusCode
==
200
)
{
this
.
carList
=
res
.
data
this
.
carList
=
res
.
data
uni
.
hideLoading
()
this
.
clickState
=
false
if
(
res
.
data
.
length
==
0
){
if
(
res
.
data
.
length
==
0
){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/transitionPage'
url
:
'/pages/transitionPage'
...
@@ -501,9 +504,10 @@
...
@@ -501,9 +504,10 @@
z-index
:
-11
;
z-index
:
-11
;
}
}
.close
{
.close
{
padding
:
20rpx
30rpx
;
font-size
:
32rpx
;
font-size
:
32rpx
;
position
:
absolute
;
position
:
absolute
;
top
:
20rpx
;
right
:
30rpx
;
top
:
0
;
right
:
0
;
}
}
.title
{
.title
{
width
:
100%
;
width
:
100%
;
...
...
pages/main.vue
View file @
8d45765f
...
@@ -270,8 +270,8 @@
...
@@ -270,8 +270,8 @@
token
,
token
,
message
message
}
=
res
;
}
=
res
;
console
.
log
(
res
,
"pin_key失效"
)
if
(
!
token
)
{
if
(
!
token
)
{
console
.
log
(
res
,
"pin_key失效"
)
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/login/index/index"
url
:
"/pages/login/index/index"
})
})
...
...
pagesA/pages/index/getCoupon.vue
View file @
8d45765f
...
@@ -47,63 +47,79 @@
...
@@ -47,63 +47,79 @@
return
{
return
{
pooupSuccess
:
false
,
pooupSuccess
:
false
,
timerNum
:
3
,
timerNum
:
3
,
timer
:
null
timer
:
null
,
clickState
:
false
}
}
},
},
methods
:
{
methods
:
{
getCoupon
()
{
getCoupon
()
{
let
opts
=
{
if
(
!
this
.
clickState
){
url
:
'/app/user/send/coupon'
,
uni
.
showLoading
({
method
:
'post'
title
:
"加载中"
,
};
mask
:
true
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
})
console
.
log
(
res
.
data
,
1111111
)
this
.
clickState
=
true
if
(
res
.
data
.
code
==
200
)
{
let
opts
=
{
uni
.
showToast
({
url
:
'/app/user/send/coupon'
,
title
:
"领取成功!"
,
method
:
'post'
icon
:
'none'
,
};
});
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
this
.
pooupSuccess
=
true
console
.
log
(
res
.
data
,
1111111
)
let
timer
=
setInterval
(()
=>
{
uni
.
hideLoading
()
if
(
this
.
timerNum
>
0
)
{
if
(
res
.
data
.
code
==
200
)
{
this
.
timerNum
--
uni
.
showToast
({
}
else
{
title
:
"领取成功!"
,
this
.
pooupSuccess
=
false
icon
:
'none'
,
this
.
timerNum
=
3
});
uni
.
navigateToMiniProgram
({
this
.
pooupSuccess
=
true
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
this
.
timer
=
setInterval
(()
=>
{
path
:
'pages/item/detail/detail?sku=100023585323'
,
// 目标小程序的页面路径
if
(
this
.
timerNum
>
0
)
{
extraData
:
{
// 需要携带的参数
this
.
timerNum
--
},
}
else
{
success
(
res
)
{
// 打开成功
this
.
pooupSuccess
=
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
if
(
res
.
data
.
code
==
1000000001
){
uni
.
showToast
({
title
:
"您已领取优惠券!"
,
icon
:
'none'
,
duration
:
1500
,
success
:()
=>
{
this
.
timer
=
setTimeout
(()
=>
{
this
.
clickState
=
false
uni
.
navigateToMiniProgram
({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
path
:
'pages/item/detail/detail?sku=100023585323'
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
success
(
res
)
{
// 打开成功
}
})
clearTimeout
(
this
.
timer
)
},
500
)
}
}
})
});
clearInterval
(
timer
)
}
}
else
{
},
1000
)
this
.
clickState
=
false
}
else
if
(
res
.
data
.
code
==
1000000001
){
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
data
.
msg
,
title
:
"您已领取优惠券!"
,
icon
:
'none'
,
icon
:
'none'
,
});
duration
:
1500
,
}
success
()
{
})
uni
.
navigateToMiniProgram
({
}
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
path
:
'pages/item/detail/detail?sku=100023585323'
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
success
(
res
)
{
// 打开成功
}
})
}
});
}
else
{
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
'none'
,
});
}
})
// uni.showToast({
// uni.showToast({
// title: "领取成功!",
// title: "领取成功!",
// icon: 'none',
// icon: 'none',
...
...
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