|
@@ -92,7 +92,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<uni-popup ref="popup" background-color="#fff" type="bottom">
|
|
|
- <view class="content">
|
|
|
+ <view class="popup" v-if="popup.type=='1'">
|
|
|
<scroll-view scroll-y="true" class="scroll-view">
|
|
|
<view class="list" v-for="(item,index) in addressList" :key="index">
|
|
|
<view class="one">
|
|
@@ -125,9 +125,7 @@
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
- </uni-popup>
|
|
|
- <uni-popup ref="popup2" background-color="#fff" type="bottom">
|
|
|
- <view class="content">
|
|
|
+ <view class="popup" v-else-if="popup.type=='2'">
|
|
|
<scroll-view scroll-y="true" class="scroll-view">
|
|
|
<discount :Style="Style" :couponList="couponList" @toDiscount="toDiscount"></discount>
|
|
|
</scroll-view>
|
|
@@ -144,6 +142,9 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ popup: {
|
|
|
+ type: '1'
|
|
|
+ },
|
|
|
Style: {
|
|
|
btn: true
|
|
|
},
|
|
@@ -180,13 +181,14 @@
|
|
|
const that = this;
|
|
|
that.$set(that, 'coupon_name', e.name)
|
|
|
that.coupon.push(e._id)
|
|
|
- that.$refs.popup2.close();
|
|
|
+ that.$refs.popup.close();
|
|
|
this.computedTotal();
|
|
|
},
|
|
|
// 选择收货地址
|
|
|
toChoose() {
|
|
|
const that = this;
|
|
|
if (that.addressList.length > 0) {
|
|
|
+ that.$set(that.popup, 'type', '1')
|
|
|
that.$refs.popup.open();
|
|
|
} else {
|
|
|
uni.showToast({
|
|
@@ -198,8 +200,9 @@
|
|
|
// 选择优惠劵
|
|
|
toCoupon() {
|
|
|
const that = this;
|
|
|
+ that.$set(that.popup, 'type', '2')
|
|
|
that.$set(that, 'coupon', [])
|
|
|
- that.$refs.popup2.open();
|
|
|
+ that.$refs.popup.open();
|
|
|
},
|
|
|
// 是否选中
|
|
|
toCheckbox(e) {
|
|
@@ -620,7 +623,7 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .content {
|
|
|
+ .popup {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
height: 100vw;
|