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
e939e66a
Commit
e939e66a
authored
May 27, 2022
by
lijiongliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券逻辑修改
parent
f0fe0ab6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
70 deletions
+71
-70
main.vue
pages/main.vue
+4
-3
getCoupon.vue
pagesA/pages/index/getCoupon.vue
+67
-67
No files found.
pages/main.vue
View file @
e939e66a
...
...
@@ -36,7 +36,7 @@
return
{
tab
:
"index"
,
page
:
1
,
scene
:
null
// 二维码携带参数
scene
:
null
,
// 二维码携带参数
}
},
computed
:
{
...
...
@@ -65,15 +65,16 @@
title
:
"领取成功!"
,
icon
:
'none'
,
});
setTimeout
(()
=>
{
let
timer
=
setTimeout
(()
=>
{
uni
.
navigateToMiniProgram
({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
path
:
'pages/item/detail/detail?sku=100023585323'
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
success
(
res
)
{
success
:(
res
)
=>
{
// 打开成功
clearTimeout
(
timer
)
}
})
},
600
)
...
...
pagesA/pages/index/getCoupon.vue
View file @
e939e66a
...
...
@@ -56,14 +56,14 @@
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
//
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--
...
...
@@ -83,7 +83,7 @@
// clearInterval(timer)
// }
// }, 1000)
}
else
{
// }else if(res.data.code == 1000000001)
{
// uni.showToast({
// title: "您已领取优惠券!",
// icon: 'none',
...
...
@@ -101,32 +101,32 @@
// })
// }
// });
}
})
// 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)
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
()
{
uni
.
navigateToMiniProgram
({
...
...
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