Commit e939e66a authored by lijiongliang's avatar lijiongliang

优惠券逻辑修改

parent f0fe0ab6
......@@ -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)
......
......@@ -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({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment