Browse Source

Merge branch 'master' of http://git.cc-lotus.info/pointToNetwork/point-app

lrf 2 years ago
parent
commit
5542b8407b
2 changed files with 9 additions and 12 deletions
  1. 1 1
      components/discount/index.vue
  2. 8 11
      pagesHome/order/order.vue

+ 1 - 1
components/discount/index.vue

@@ -32,7 +32,7 @@
 				<view class="r">
 					<button v-if="Style&&Style.btn||false" type="default" size="mini" @click="toDiscount(item)">确认</button>
 					<button v-if="Style&&Style.status||false" type="default" size="mini">{{item.status=='0'?'未使用':item.status=='1'?'已使用':'已过期'}}</button>
-					<button v-if="Style&&Style.receive==true&&item.conGet==true" type="default" size="mini" @click="toReceive(item)">领取</button>
+					<button v-if="Style&&Style.receive==true&&item.canGet==true" type="default" size="mini" @click="toReceive(item)">领取</button>
 				</view>
 			</view>
 		</view>

+ 8 - 11
pagesHome/order/order.vue

@@ -88,7 +88,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">
@@ -118,7 +118,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>
@@ -153,7 +155,6 @@ export default {
       coupon: [],
       // 优惠劵名称
       coupon_name: '',
-      type: '',
     };
   },
   onLoad: async function (e) {
@@ -167,15 +168,13 @@ export default {
       const that = this;
       that.$set(that, 'coupon_name', e.name)
       that.coupon.push(e._id)
-      that.$refs.popup.close();
-      // TODO 修改实付金额的显示
-      this.computedTotal()
+      that.$refs.popup2.close();
+      this.computedTotal();
     },
     // 选择收货地址
     toChoose() {
       const that = this;
       if (that.addressList.length > 0) {
-        that.$set(that, 'type', '0')
         that.$refs.popup.open();
       } else {
         uni.showToast({
@@ -187,9 +186,8 @@ export default {
     // 选择优惠劵
     toCoupon() {
       const that = this;
-      that.$set(that, 'type', '1')
       that.$set(that, 'coupon', [])
-      that.$refs.popup.open();
+      that.$refs.popup2.open();
     },
     // 是否选中
     toCheckbox(e) {
@@ -336,11 +334,10 @@ export default {
         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.computedTotal();
+        this.computedTotal();
         that.$set(that, `couponList`, arr.data.couponList);
       }
     },
-
     async computedTotal() {
       const total_detail = this.total_detail;
       let total = this.$plus(total_detail.freight_total, total_detail.goods_total)