|
@@ -59,6 +59,11 @@
|
|
|
</view>
|
|
|
<view class="other_2" v-else>包邮</view>
|
|
|
</view>
|
|
|
+ <view class="other">
|
|
|
+ <view class="other_1">优惠劵</view>
|
|
|
+ <view class="other_2" @click="toCoupon" v-if="couponList.length">请选择优惠劵</view>
|
|
|
+ <view class="other_2" v-else>暂无优惠劵使用</view>
|
|
|
+ </view>
|
|
|
<view class="other">
|
|
|
<view class="other_1">订单备注</view>
|
|
|
<view class="other_3">
|
|
@@ -82,7 +87,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<uni-popup ref="popup" background-color="#fff" type="bottom">
|
|
|
- <view class="content" v-for="(item,index) in addressList" :key="index">
|
|
|
+ <view class="content" v-if="type=='0'" v-for="(item,index) in addressList" :key="index">
|
|
|
<view class="one">
|
|
|
<view class="one_1">
|
|
|
<view class="name">
|
|
@@ -109,6 +114,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="content" v-else v-for="(item,index) in couponList" :key="index">
|
|
|
+ <view class="one">优惠劵</view>
|
|
|
+ </view>
|
|
|
</uni-popup>
|
|
|
</mobile-frame>
|
|
|
</template>
|
|
@@ -127,6 +135,9 @@
|
|
|
total_detail: {},
|
|
|
// 收货地址
|
|
|
addressList: [],
|
|
|
+ // 优惠劵
|
|
|
+ couponList: [{name:'家庭囤货特惠劵',}],
|
|
|
+ type: ''
|
|
|
};
|
|
|
},
|
|
|
onLoad: async function(e) {
|
|
@@ -139,6 +150,7 @@
|
|
|
toChoose() {
|
|
|
const that = this;
|
|
|
if (that.addressList.length > 0) {
|
|
|
+ that.$set(that, 'type', '0')
|
|
|
that.$refs.popup.open();
|
|
|
} else {
|
|
|
uni.showToast({
|
|
@@ -147,6 +159,12 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ // 选择优惠劵
|
|
|
+ toCoupon() {
|
|
|
+ const that = this;
|
|
|
+ that.$set(that, 'type', '1')
|
|
|
+ that.$refs.popup.open();
|
|
|
+ },
|
|
|
// 是否选中
|
|
|
toCheckbox(e) {
|
|
|
const that = this;
|
|
@@ -292,6 +310,7 @@
|
|
|
that.$set(that, `total_detail`, arr.data.orderTotal);
|
|
|
var total = arr.data.orderTotal.freight_total + arr.data.orderTotal.goods_total
|
|
|
that.$set(that, `goods_total`, total);
|
|
|
+ // that.$set(that, `couponList`, arr.data.couponList);
|
|
|
}
|
|
|
},
|
|
|
}
|