Commit 8d45765f authored by lijiongliang's avatar lijiongliang

样式修改

parent 8c8c8b8e
......@@ -59,7 +59,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wx8fd4dc1c4b9f6f41",
"appid" : "wx237e45bea2220a37",
"setting" : {
"urlCheck" : false,
"minified" : true,
......
......@@ -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%;
......
......@@ -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"
})
......
......@@ -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',
......
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