Browse Source

提交订单选择优惠券,没有优惠券时界面优化(暂无数据)

chenrui 4 years ago
parent
commit
152ba2d4ff
2 changed files with 20 additions and 1 deletions
  1. 20 1
      src/pages/placeOrder/index.vue
  2. BIN
      static/img/empty-icon.png

+ 20 - 1
src/pages/placeOrder/index.vue

@@ -51,6 +51,10 @@
               <div class="coupon-item" v-for="item in couponList.canUse" :key="item.id">
                 <v-coupon :options="item" @use="useCoupon" :canUse="true" />
               </div>
+              <div class="noData-con" v-if="couponList.canUse.length==0">
+                <img class="logo-img" src="/static/img/empty-icon.png">
+                <p>暂无数据</p>
+              </div>
             </scroll-view>
           </van-tab>
           <van-tab title="不可用优惠券">
@@ -58,6 +62,10 @@
               <div class="coupon-item" v-for="item in couponList.notUse" :key="item.id">
                 <v-coupon :options="item" @use="useCoupon" :status="false" />
               </div>
+              <div class="noData-con" v-if="couponList.notUse.length==0">
+                <img class="logo-img" src="/static/img/empty-icon.png">
+                <p>暂无数据</p>
+              </div>
             </scroll-view>
           </van-tab>
         </van-tabs>
@@ -372,8 +380,19 @@ export default {
     width: 100vw;
     overflow: auto;
     box-sizing: border-box;
-  }
 
+  }
+  .noData-con{
+    margin-top: 70rpx;
+    text-align center;
+    font-size: 26rpx;
+    img{
+      display: inline-block;
+      width: 196rpx;
+      height: 128rpx;
+      margin: 20rpx 0 10rpx;
+    }
+  }
   .select-coupon-tab {
     height: 60vh;
   }

BIN
static/img/empty-icon.png