Commit b9e47d2b authored by lijiongliang's avatar lijiongliang

样式修改

parent 8d45765f
...@@ -107,7 +107,8 @@ ...@@ -107,7 +107,8 @@
getPrice() { getPrice() {
if(this.clickState == false){ if(this.clickState == false){
uni.showLoading({ uni.showLoading({
title:"加载中" title:"加载中",
mask:true
}) })
this.clickState = true this.clickState = true
let that = this let that = this
...@@ -136,9 +137,9 @@ ...@@ -136,9 +137,9 @@
} }
that.http.httpTokenRequest(opts, {}).then(res => { that.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
uni.hideLoading()
let freeMoveFlag = res.data.data.freeMoveFlag let freeMoveFlag = res.data.data.freeMoveFlag
if (freeMoveFlag) { if (freeMoveFlag) {
uni.hideLoading()
// uni.showToast({ // uni.showToast({
// title: "您的免费领取次数已用完", // title: "您的免费领取次数已用完",
// icon: 'none', // icon: 'none',
...@@ -176,7 +177,7 @@ ...@@ -176,7 +177,7 @@
// uni.showLoading({ // uni.showLoading({
// title: '加载中' // title: '加载中'
// }); // });
this.timer = setTimeout(()=>{ setTimeout(()=>{
this.getCarList() this.getCarList()
},500) },500)
} }
...@@ -264,14 +265,15 @@ ...@@ -264,14 +265,15 @@
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() uni.hideLoading()
if (res.statusCode == 200) { if (res.statusCode == 200) {
this.carList = res.data this.carList = res.data
this.clickState = false
if(res.data.length == 0){ if(res.data.length == 0){
uni.navigateTo({ uni.navigateTo({
url: '/pages/transitionPage' url: '/pages/transitionPage',
success:()=>{
this.clickState = false
}
}); });
uni.setStorageSync('firstCoupon',true) uni.setStorageSync('firstCoupon',true)
// let url = "car.m.jd.com/h5/list.html?final-action=closewebview&source=licenseprocedure" // let url = "car.m.jd.com/h5/list.html?final-action=closewebview&source=licenseprocedure"
...@@ -281,9 +283,14 @@ ...@@ -281,9 +283,14 @@
// url: '/pagesA/pages/index/getPrice?orderId=' + this.freeCode.id // url: '/pagesA/pages/index/getPrice?orderId=' + this.freeCode.id
// }); // });
uni.navigateTo({ uni.navigateTo({
url: '/pagesA/pages/index/getCoupon' url: '/pagesA/pages/index/getCoupon',
success:()=>{
this.clickState = false
}
}); });
} }
}else{
this.clickState = false
} }
}) })
}, },
......
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
<view class="pooup-success" v-if="pooupSuccess"> <view class="pooup-success" v-if="pooupSuccess">
<view class="success-box"> <view class="success-box">
<image src="../../../static/index/coupon2.png"></image> <image src="../../../static/index/coupon2.png"></image>
<view class="close" @click="closeCoupon">
X
</view>
<view class="title"> <view class="title">
<view style="margin-bottom:10rpx;font-weight: bold;"> <view style="margin-bottom:10rpx;font-weight: bold;">
优惠券领取成功 优惠券领取成功
...@@ -45,10 +48,10 @@ ...@@ -45,10 +48,10 @@
export default { export default {
data() { data() {
return { return {
pooupSuccess: false, pooupSuccess: true,
timerNum: 3, timerNum: 3,
timer:null, timer:null,
clickState:false clickState:false, //节流
} }
}, },
methods: { methods: {
...@@ -63,13 +66,13 @@ ...@@ -63,13 +66,13 @@
url: '/app/user/send/coupon', url: '/app/user/send/coupon',
method: 'post' method: 'post'
}; };
let time = setTimeout(()=>{
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
console.log(res.data, 1111111)
uni.hideLoading() uni.hideLoading()
if (res.data.code == 200) { if (res.data.code == 200) {
uni.showToast({ uni.showToast({
title: "领取成功!", title: "领取成功!",
icon: 'none', icon: 'success',
}); });
this.pooupSuccess = true this.pooupSuccess = true
this.timer = setInterval(() => { this.timer = setInterval(() => {
...@@ -78,13 +81,16 @@ ...@@ -78,13 +81,16 @@
} else { } else {
this.pooupSuccess = false this.pooupSuccess = false
this.timerNum = 3 this.timerNum = 3
this.clickState = false
uni.navigateToMiniProgram({ uni.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id
path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径 path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径
extraData: { // 需要携带的参数 extraData: { // 需要携带的参数
}, },
success(res) {// 打开成功 success:(res)=> {// 打开成功
this.clickState = false
},
fail:()=>{
this.clickState = false
} }
}) })
clearInterval(this.timer) clearInterval(this.timer)
...@@ -93,24 +99,23 @@ ...@@ -93,24 +99,23 @@
}else if(res.data.code == 1000000001){ }else if(res.data.code == 1000000001){
uni.showToast({ uni.showToast({
title: "您已领取优惠券!", title: "您已领取优惠券!",
icon: 'none', icon: 'error',
duration:1500, duration:1500,
success:()=> { success:()=> {
this.timer = setTimeout(()=>{
this.clickState = false
uni.navigateToMiniProgram({ uni.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id
path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径 path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径
extraData: { // 需要携带的参数 extraData: { // 需要携带的参数
}, },
success(res) {// 打开成功 success:()=> {// 打开成功
this.clickState = false
},
fail:()=>{
this.clickState = false
} }
}) })
clearTimeout(this.timer)
},500)
} }
}); });
}else{ }else{
this.clickState = false this.clickState = false
uni.showToast({ uni.showToast({
...@@ -119,6 +124,8 @@ ...@@ -119,6 +124,8 @@
}); });
} }
}) })
},500)
} }
// uni.showToast({ // uni.showToast({
// title: "领取成功!", // title: "领取成功!",
...@@ -147,6 +154,7 @@ ...@@ -147,6 +154,7 @@
}, },
goUseCoupon() { goUseCoupon() {
this.timerNum = 3; this.timerNum = 3;
this.clickState = false
clearInterval(this.timer); clearInterval(this.timer);
uni.navigateToMiniProgram({ uni.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id
...@@ -163,7 +171,13 @@ ...@@ -163,7 +171,13 @@
} }
}) })
} },
closeCoupon(){
this.pooupSuccess = false
this.timerNum = 3
this.clickState = false
clearInterval(this.timer)
},
} }
} }
</script> </script>
...@@ -249,6 +263,14 @@ ...@@ -249,6 +263,14 @@
z-index: -11; z-index: -11;
} }
.close{
padding:20rpx 30rpx;
font-size:32rpx;
position: absolute;
top:0;right:0;
color: #fff;
}
.title { .title {
width: 100%; width: 100%;
color: #fff; color: #fff;
......
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