|
@@ -89,7 +89,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<uni-popup ref="popup" background-color="#fff" type="bottom">
|
|
|
- <view class="content" v-if="type=='0'" v-for="(item,index) in addressList" :key="index">
|
|
|
+ <view class="content" v-for="(item,index) in addressList" :key="index">
|
|
|
<scroll-view scroll-y="true" class="scroll-view">
|
|
|
<view class="one">
|
|
|
<view class="one_1">
|
|
@@ -119,7 +119,9 @@
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
- <view class="content" v-else-if="type=='1'">
|
|
|
+ </uni-popup>
|
|
|
+ <uni-popup ref="popup2" background-color="#fff" type="bottom">
|
|
|
+ <view class="content">
|
|
|
<scroll-view scroll-y="true" class="scroll-view">
|
|
|
<discount :Style="Style" :couponList="couponList" @toDiscount="toDiscount"></discount>
|
|
|
</scroll-view>
|
|
@@ -154,7 +156,6 @@
|
|
|
coupon: [],
|
|
|
// 优惠劵名称
|
|
|
coupon_name: '',
|
|
|
- type: '',
|
|
|
};
|
|
|
},
|
|
|
onLoad: async function(e) {
|
|
@@ -168,13 +169,12 @@
|
|
|
const that = this;
|
|
|
that.$set(that, 'coupon_name', e.name)
|
|
|
that.coupon.push(e._id)
|
|
|
- that.$refs.popup.close();
|
|
|
+ that.$refs.popup2.close();
|
|
|
},
|
|
|
// 选择收货地址
|
|
|
toChoose() {
|
|
|
const that = this;
|
|
|
if (that.addressList.length > 0) {
|
|
|
- that.$set(that, 'type', '0')
|
|
|
that.$refs.popup.open();
|
|
|
} else {
|
|
|
uni.showToast({
|
|
@@ -186,9 +186,8 @@
|
|
|
// 选择优惠劵
|
|
|
toCoupon() {
|
|
|
const that = this;
|
|
|
- that.$set(that, 'type', '1')
|
|
|
that.$set(that, 'coupon', [])
|
|
|
- that.$refs.popup.open();
|
|
|
+ that.$refs.popup2.open();
|
|
|
},
|
|
|
// 是否选中
|
|
|
toCheckbox(e) {
|