Commit 8d45765f authored by lijiongliang's avatar lijiongliang

样式修改

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