Commit 3eb4cd32 authored by 肖健's avatar 肖健

Merge remote-tracking branch 'origin/dev_cd' into dev_jd

parents dcb8ab50 8c8c8b8e
// const baseUrl = 'https://r.ucaret.cn/test-api'; // 开发地址 // const baseUrl = 'https://r.ucaret.cn/test-api'; // 开发地址
const baseUrl = 'https://jduniapp.uzosp.com'; // 线上地址 const baseUrl = 'http://4v7u6z.natappfree.cc'; // 开发地址
// const baseUrl = 'https://jduniapp.uzosp.com'; // 线上地址
const httpRequest = (opts, data) => { const httpRequest = (opts, data) => {
let httpDefaultOpts = { let httpDefaultOpts = {
url: baseUrl + opts.url, url: baseUrl + opts.url,
......
...@@ -57,6 +57,9 @@ ...@@ -57,6 +57,9 @@
<view class="pooup-get-coupon" v-if="pooupCoupon"> <view class="pooup-get-coupon" v-if="pooupCoupon">
<view class="coupon-box"> <view class="coupon-box">
<image src="../../../static/index/coupon3.png"></image> <image src="../../../static/index/coupon3.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;">
您无优惠券可用 您无优惠券可用
...@@ -89,7 +92,9 @@ ...@@ -89,7 +92,9 @@
carList:[], // 爱车列表 carList:[], // 爱车列表
pooupCoupon:false, pooupCoupon:false,
timerNum:3, timerNum:3,
timer:null timer:null,
clickState:false
}; };
}, },
methods: { methods: {
...@@ -101,9 +106,16 @@ ...@@ -101,9 +106,16 @@
}) })
}, },
getPrice() { getPrice() {
if(this.clickState == false){
uni.showLoading({
title:"加载中"
})
this.clickState = true
let that = this let that = this
let token = uni.getStorageSync('userToken'); let token = uni.getStorageSync('userToken');
if (!token) { if (!token) {
uni.hideLoading()
this.clickState = false
uni.showModal({ uni.showModal({
title: "未绑定账号", title: "未绑定账号",
content: "您没有绑定京东账号,请绑定后再领取", content: "您没有绑定京东账号,请绑定后再领取",
...@@ -125,8 +137,8 @@ ...@@ -125,8 +137,8 @@
} }
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.showToast({ // uni.showToast({
// title: "您的免费领取次数已用完", // title: "您的免费领取次数已用完",
...@@ -143,6 +155,7 @@ ...@@ -143,6 +155,7 @@
}else{ }else{
this.pooupCoupon = false this.pooupCoupon = 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', // 目标小程序的页面路径
...@@ -161,16 +174,32 @@ ...@@ -161,16 +174,32 @@
// uni.navigateTo({ // uni.navigateTo({
// url: '/pagesA/pages/index/getPrice?orderId=' + this.freeCode.id // url: '/pagesA/pages/index/getPrice?orderId=' + this.freeCode.id
// }); // });
uni.showLoading({ // uni.showLoading({
title: '加载中' // title: '加载中'
}); // });
this.getCarList() this.getCarList()
} }
}else{
uni.hideLoading()
uni.showToast({
title: res.data.msg,
icon: "error",
});
} }
}) })
}
},
closeCoupon(){
this.pooupCoupon = false
this.timerNum = 3
this.clickState = false
clearInterval(this.timer)
}, },
// 已领取优惠券按钮 // 已领取优惠券按钮
goBuy(){ goBuy(){
this.timerNum = 3
this.clickState = false
clearInterval(this.timer)
uni.navigateToMiniProgram({ uni.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id
path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径 path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径
...@@ -180,13 +209,9 @@ ...@@ -180,13 +209,9 @@
success:(res)=> { success:(res)=> {
// 打开成功 // 打开成功
this.pooupCoupon = false this.pooupCoupon = false
this.timerNum = 3
clearInterval(this.timer)
}, },
fail:()=>{ fail:()=>{
this.pooupCoupon = false this.pooupCoupon = false
this.timerNum = 3
clearInterval(this.timer)
} }
}) })
}, },
...@@ -475,6 +500,11 @@ ...@@ -475,6 +500,11 @@
width:100%;height:100%; width:100%;height:100%;
z-index:-11; z-index:-11;
} }
.close{
font-size:32rpx;
position: absolute;
top:20rpx;right:30rpx;
}
.title{ .title{
width:100%; width:100%;
position: absolute; position: absolute;
......
...@@ -110,6 +110,11 @@ ...@@ -110,6 +110,11 @@
} else { } else {
that.gotoBindMoveCar(scene) that.gotoBindMoveCar(scene)
} }
}else{
uni.showToast({
title: res.data.msg,
icon: 'none',
});
} }
}) })
} else { } else {
...@@ -124,6 +129,11 @@ ...@@ -124,6 +129,11 @@
icon: 'none', icon: 'none',
}) })
} }
}else{
uni.showToast({
title: res.data.msg,
icon: 'none',
});
} }
}) })
} }
...@@ -319,6 +329,12 @@ ...@@ -319,6 +329,12 @@
}) })
} }
}else{
uni.hideLoading()
uni.showToast({
title: res.data.msg,
icon: "error",
});
} }
}) })
} }
......
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
], ],
items: [{ items: [{
title: '待发货', title: '待发货',
icon: require('@/static/my/my2.png'), icon: require('@/static/my/my2.jpg'),
page: 0 page: 0
}, },
{ {
......
...@@ -97,6 +97,11 @@ ...@@ -97,6 +97,11 @@
}) })
} }
}); });
}else{
uni.showToast({
title: res.data.msg,
icon: 'none',
});
} }
}) })
// uni.showToast({ // uni.showToast({
......
This diff is collapsed.
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