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 @@
"quickapp"
:
{},
/*
小程序特有相关
*/
"mp-weixin"
:
{
"appid"
:
"wx
8fd4dc1c4b9f6f41
"
,
"appid"
:
"wx
237e45bea2220a37
"
,
"setting"
:
{
"urlCheck"
:
false
,
"minified"
:
true
,
...
...
pages/home.vue
View file @
8d45765f
...
...
@@ -93,8 +93,7 @@
pooupCoupon
:
false
,
timerNum
:
3
,
timer
:
null
,
clickState
:
false
clickState
:
false
,
// 立即领取 防抖
};
},
methods
:
{
...
...
@@ -177,7 +176,9 @@
// uni.showLoading({
// title: '加载中'
// });
this
.
getCarList
()
this
.
timer
=
setTimeout
(()
=>
{
this
.
getCarList
()
},
500
)
}
}
else
{
uni
.
hideLoading
()
...
...
@@ -263,9 +264,11 @@
getCarList
(){
let
opts
=
{
url
:
'/app/vehicleAdmin/list'
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
clearInterval
(
this
.
timer
)
uni
.
hideLoading
()
if
(
res
.
statusCode
==
200
)
{
this
.
carList
=
res
.
data
uni
.
hideLoading
()
this
.
clickState
=
false
if
(
res
.
data
.
length
==
0
){
uni
.
navigateTo
({
url
:
'/pages/transitionPage'
...
...
@@ -501,9 +504,10 @@
z-index
:
-11
;
}
.close
{
padding
:
20rpx
30rpx
;
font-size
:
32rpx
;
position
:
absolute
;
top
:
20rpx
;
right
:
30rpx
;
top
:
0
;
right
:
0
;
}
.title
{
width
:
100%
;
...
...
pages/main.vue
View file @
8d45765f
...
...
@@ -270,8 +270,8 @@
token
,
message
}
=
res
;
console
.
log
(
res
,
"pin_key失效"
)
if
(
!
token
)
{
console
.
log
(
res
,
"pin_key失效"
)
uni
.
navigateTo
({
url
:
"/pages/login/index/index"
})
...
...
pagesA/pages/index/getCoupon.vue
View file @
8d45765f
...
...
@@ -47,63 +47,79 @@
return
{
pooupSuccess
:
false
,
timerNum
:
3
,
timer
:
null
timer
:
null
,
clickState
:
false
}
},
methods
:
{
getCoupon
()
{
let
opts
=
{
url
:
'/app/user/send/coupon'
,
method
:
'post'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
console
.
log
(
res
.
data
,
1111111
)
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
)
{
// 打开成功
if
(
!
this
.
clickState
){
uni
.
showLoading
({
title
:
"加载中"
,
mask
:
true
})
this
.
clickState
=
true
let
opts
=
{
url
:
'/app/user/send/coupon'
,
method
:
'post'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
console
.
log
(
res
.
data
,
1111111
)
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
uni
.
showToast
({
title
:
"领取成功!"
,
icon
:
'none'
,
});
this
.
pooupSuccess
=
true
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
timerNum
>
0
)
{
this
.
timerNum
--
}
else
{
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
)
}
},
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
)
{
// 打开成功
}
})
}
});
}
else
{
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
'none'
,
});
}
})
});
}
else
{
this
.
clickState
=
false
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
'none'
,
});
}
})
}
// uni.showToast({
// title: "领取成功!",
// 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