|
@@ -106,14 +106,14 @@
|
|
|
立即领取
|
|
立即领取
|
|
|
</view>
|
|
</view>
|
|
|
<view class='wrapper' v-if="!is_gift || is_gift == 1">
|
|
<view class='wrapper' v-if="!is_gift || is_gift == 1">
|
|
|
- <view class='item acea-row row-between-wrapper' @tap='couponTap'
|
|
|
|
|
- v-if="!pinkId && !BargainId && !combinationId && !seckillId&& !noCoupon && !discountId && !advanceId">
|
|
|
|
|
- <view>{{$t(`优惠券`)}}</view>
|
|
|
|
|
- <view class='discount'>
|
|
|
|
|
- {{couponTitle}}
|
|
|
|
|
- <text class='iconfont icon-jiantou'></text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+<!-- <view class='item acea-row row-between-wrapper' @tap='couponTap'-->
|
|
|
|
|
+<!-- v-if="!pinkId && !BargainId && !combinationId && !seckillId&& !noCoupon && !discountId && !advanceId">-->
|
|
|
|
|
+<!-- <view>{{$t(`优惠券`)}}</view>-->
|
|
|
|
|
+<!-- <view class='discount'>-->
|
|
|
|
|
+<!-- {{couponTitle}}-->
|
|
|
|
|
+<!-- <text class='iconfont icon-jiantou'></text>-->
|
|
|
|
|
+<!-- </view>-->
|
|
|
|
|
+<!-- </view>-->
|
|
|
<view class='item acea-row row-between-wrapper'
|
|
<view class='item acea-row row-between-wrapper'
|
|
|
v-if="!pinkId && !BargainId && !combinationId && !seckillId && !advanceId && integral_open">
|
|
v-if="!pinkId && !BargainId && !combinationId && !seckillId && !advanceId && integral_open">
|
|
|
<view>{{$t(`积分抵扣`)}}</view>
|
|
<view>{{$t(`积分抵扣`)}}</view>
|
|
@@ -515,8 +515,8 @@
|
|
|
}, {
|
|
}, {
|
|
|
tab: 3,
|
|
tab: 3,
|
|
|
url: 1
|
|
url: 1
|
|
|
- });
|
|
|
|
|
- if(options.is_gift){
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ if(options.is_gift){
|
|
|
this.is_gift = Number(options.is_gift);
|
|
this.is_gift = Number(options.is_gift);
|
|
|
}
|
|
}
|
|
|
this.couponId = options.couponId || 0;
|
|
this.couponId = options.couponId || 0;
|
|
@@ -542,8 +542,8 @@
|
|
|
// #endif
|
|
// #endif
|
|
|
if (this.isLogin && this.toPay == false && (this.is_gift == 0 || this.is_gift == 1)) {
|
|
if (this.isLogin && this.toPay == false && (this.is_gift == 0 || this.is_gift == 1)) {
|
|
|
this.checkShipping();
|
|
this.checkShipping();
|
|
|
- }else if(this.is_gift && this.isLogin){
|
|
|
|
|
- this.getOrderDetail()
|
|
|
|
|
|
|
+ }else if(this.is_gift && this.isLogin){
|
|
|
|
|
+ this.getOrderDetail()
|
|
|
} else {
|
|
} else {
|
|
|
toLogin();
|
|
toLogin();
|
|
|
}
|
|
}
|
|
@@ -665,7 +665,7 @@
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 授权回调事件
|
|
* 授权回调事件
|
|
|
- *
|
|
|
|
|
|
|
+ *
|
|
|
*/
|
|
*/
|
|
|
onLoadFun: function() {
|
|
onLoadFun: function() {
|
|
|
this.getaddressInfo();
|
|
this.getaddressInfo();
|
|
@@ -768,7 +768,7 @@
|
|
|
this.getList()
|
|
this.getList()
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
- // #endif
|
|
|
|
|
|
|
+ // #endif
|
|
|
uni.getLocation({
|
|
uni.getLocation({
|
|
|
type: 'wgs84',
|
|
type: 'wgs84',
|
|
|
success: (res) => {
|
|
success: (res) => {
|
|
@@ -779,13 +779,13 @@
|
|
|
this.getList()
|
|
this.getList()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- // #ifdef H5
|
|
|
|
|
|
|
+ // #ifdef H5
|
|
|
}
|
|
}
|
|
|
// #endif
|
|
// #endif
|
|
|
};
|
|
};
|
|
|
this.$nextTick(e => {
|
|
this.$nextTick(e => {
|
|
|
- if(!this.is_gift){
|
|
|
|
|
- this.getConfirm();
|
|
|
|
|
|
|
+ if(!this.is_gift){
|
|
|
|
|
+ this.getConfirm();
|
|
|
this.computedPrice();
|
|
this.computedPrice();
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -809,7 +809,7 @@
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 处理点击优惠券后的事件
|
|
* 处理点击优惠券后的事件
|
|
|
- *
|
|
|
|
|
|
|
+ *
|
|
|
*/
|
|
*/
|
|
|
ChangCoupons: function(e) {
|
|
ChangCoupons: function(e) {
|
|
|
// this.usableCoupon = e
|
|
// this.usableCoupon = e
|
|
@@ -858,8 +858,8 @@
|
|
|
this.address.address = false;
|
|
this.address.address = false;
|
|
|
this.getaddressInfo();
|
|
this.getaddressInfo();
|
|
|
if(!this.is_gift){
|
|
if(!this.is_gift){
|
|
|
- this.getConfirm()
|
|
|
|
|
- this.computedPrice();
|
|
|
|
|
|
|
+ this.getConfirm()
|
|
|
|
|
+ this.computedPrice();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
bindHideKeyboard: function(e) {
|
|
bindHideKeyboard: function(e) {
|
|
@@ -868,36 +868,36 @@
|
|
|
getOrderDetail() {
|
|
getOrderDetail() {
|
|
|
getGiftOrderDetail(this.orderId).then(res => {
|
|
getGiftOrderDetail(this.orderId).then(res => {
|
|
|
this.giftData = res.data
|
|
this.giftData = res.data
|
|
|
- this.$set(this, 'cartInfo', res.data.cartInfo);
|
|
|
|
|
- this.virtual_type = res.data.type
|
|
|
|
|
- this.store_self_mention = res.data.store_self_mention
|
|
|
|
|
- if (res.data.type == 0) {
|
|
|
|
|
- this.is_shipping = true;
|
|
|
|
|
- this.shippingType = 0;
|
|
|
|
|
- this.getaddressInfo();
|
|
|
|
|
- this.$nextTick(()=> {
|
|
|
|
|
- this.$refs.addressWindow.getAddressList();
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- if (res.data.type == 1) {
|
|
|
|
|
- this.is_shipping = false;
|
|
|
|
|
- this.shippingType = 0;
|
|
|
|
|
- this.getaddressInfo();
|
|
|
|
|
- this.$nextTick(()=> {
|
|
|
|
|
- this.$refs.addressWindow.getAddressList();
|
|
|
|
|
- })
|
|
|
|
|
- } else if (res.data.type == 2) {
|
|
|
|
|
- this.is_shipping = false;
|
|
|
|
|
- this.shippingType = 1;
|
|
|
|
|
- this.addressType(1)
|
|
|
|
|
- this.getList();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.$set(this, 'cartInfo', res.data.cartInfo);
|
|
|
|
|
+ this.virtual_type = res.data.type
|
|
|
|
|
+ this.store_self_mention = res.data.store_self_mention
|
|
|
|
|
+ if (res.data.type == 0) {
|
|
|
|
|
+ this.is_shipping = true;
|
|
|
|
|
+ this.shippingType = 0;
|
|
|
|
|
+ this.getaddressInfo();
|
|
|
|
|
+ this.$nextTick(()=> {
|
|
|
|
|
+ this.$refs.addressWindow.getAddressList();
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (res.data.type == 1) {
|
|
|
|
|
+ this.is_shipping = false;
|
|
|
|
|
+ this.shippingType = 0;
|
|
|
|
|
+ this.getaddressInfo();
|
|
|
|
|
+ this.$nextTick(()=> {
|
|
|
|
|
+ this.$refs.addressWindow.getAddressList();
|
|
|
|
|
+ })
|
|
|
|
|
+ } else if (res.data.type == 2) {
|
|
|
|
|
+ this.is_shipping = false;
|
|
|
|
|
+ this.shippingType = 1;
|
|
|
|
|
+ this.addressType(1)
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 获取当前订单详细信息
|
|
* 获取当前订单详细信息
|
|
|
- *
|
|
|
|
|
|
|
+ *
|
|
|
*/
|
|
*/
|
|
|
getConfirm: function() {
|
|
getConfirm: function() {
|
|
|
let that = this;
|
|
let that = this;
|
|
@@ -1006,7 +1006,7 @@
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 获取当前金额可用优惠券
|
|
* 获取当前金额可用优惠券
|
|
|
- *
|
|
|
|
|
|
|
+ *
|
|
|
*/
|
|
*/
|
|
|
getCouponList: function() {
|
|
getCouponList: function() {
|
|
|
let shippingType = this.shippingType;
|
|
let shippingType = this.shippingType;
|
|
@@ -1079,11 +1079,11 @@
|
|
|
'&pinkId=' +
|
|
'&pinkId=' +
|
|
|
this.pinkId +
|
|
this.pinkId +
|
|
|
'&couponId=' +
|
|
'&couponId=' +
|
|
|
- this.couponId +
|
|
|
|
|
- '&is_gift=' +
|
|
|
|
|
- that.is_gift +
|
|
|
|
|
|
|
+ this.couponId +
|
|
|
|
|
+ '&is_gift=' +
|
|
|
|
|
+ that.is_gift +
|
|
|
'&order_id=' + that.orderId
|
|
'&order_id=' + that.orderId
|
|
|
- } else {
|
|
|
|
|
|
|
+ } else {
|
|
|
let url = '/pages/users/user_address/index?cartId=' + this.cartId + '&pinkId=' + this
|
|
let url = '/pages/users/user_address/index?cartId=' + this.cartId + '&pinkId=' + this
|
|
|
.pinkId +
|
|
.pinkId +
|
|
|
'&couponId=' + this.couponId + '&new=' + this.news + '&is_gift=' + that.is_gift + '&order_id=' + that.orderId
|
|
'&couponId=' + this.couponId + '&new=' + this.news + '&is_gift=' + that.is_gift + '&order_id=' + that.orderId
|
|
@@ -1319,7 +1319,7 @@
|
|
|
address: `${e.address}-${e.detailed_address}`,
|
|
address: `${e.address}-${e.detailed_address}`,
|
|
|
}).then(res => {})
|
|
}).then(res => {})
|
|
|
} else {
|
|
} else {
|
|
|
- // #endif
|
|
|
|
|
|
|
+ // #endif
|
|
|
uni.openLocation({
|
|
uni.openLocation({
|
|
|
latitude: Number(e.latitude),
|
|
latitude: Number(e.latitude),
|
|
|
longitude: Number(e.longitude),
|
|
longitude: Number(e.longitude),
|
|
@@ -1329,7 +1329,7 @@
|
|
|
Number
|
|
Number
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- // #ifdef H5
|
|
|
|
|
|
|
+ // #ifdef H5
|
|
|
}
|
|
}
|
|
|
// #endif
|
|
// #endif
|
|
|
},
|
|
},
|
|
@@ -1842,4 +1842,4 @@
|
|
|
.fontC {
|
|
.fontC {
|
|
|
color: grey;
|
|
color: grey;
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|