chenrui 4 years ago
parent
commit
72fe371d83

+ 1 - 1
package-lock.json

@@ -1,5 +1,5 @@
 {
-  "name": "zyyc-wxmini",
+  "name": "qbyc-wxmini",
   "version": "1.0.0",
   "lockfileVersion": 1,
   "requires": true,

+ 5 - 1
src/components/OrderCard.vue

@@ -61,7 +61,8 @@ export default {
         'INPA': '支付中',
         'PAED': '已支付',
         'CAEL': '已取消',
-        'SYCA': '已取消'
+        'SYCA': '已取消',
+        'RUND': '已退款'
       };
       return dict[this.options.orderFlag];
     }
@@ -178,6 +179,9 @@ export default {
     .SYCA {
       color: #999999;
     }
+    .RUND {
+      color: red;
+    }
   }
 
   .content {

+ 3 - 2
src/pages/bundleDetail/index.vue

@@ -3,11 +3,12 @@
     <div class=" bundle-detail page--loading" :class="{'page--finished': finished }">
       <b-card :options="options" type="detail" />
       <div class="detail-info">
-        <div class="bundle-detail-desc">
+        <div class="bundle-detail-desc" v-if="options.validityTermType != 'PERMANENT_VALIDITY'">
           <div class="bundle-detail-title">
             <van-icon name="stop" class="detail-title-icon" /> 套餐有效期:
             <div class="detail-text">
-              <span>{{options.expiryDate}} 过期</span>
+              <span v-if="options.validityTermType == 'FIXED_TIME'">{{options.validityTermValue}}过期</span>
+              <span v-if="options.validityTermType == 'FIXED_DAYS'">购买后{{options.validityTermValue}}天过期</span>
             </div>
           </div>
         </div>

+ 6 - 1
src/pages/index/index.vue

@@ -63,7 +63,12 @@ export default {
       const _this = this;
       customerBundleList({}).then(res => {
         if (res.status === '200') {
-          _this.orderList = res.data;
+          _this.orderList = []
+          res.data.map((item, index) => {
+            if(index < 5){
+              _this.orderList.push(item)
+            }
+          })
         } else {
           wx.showToast({
             title: res.message,

+ 6 - 3
src/pages/orderDetail/index.vue

@@ -26,7 +26,7 @@
           <!-- <form @submit="formSubmit" class="formId"  report-submit="true">
             <button form-type="submit"></button>
           </form> -->
-          <van-cell :title="item.itemName" :label="item.expiryDate?'过期时间:'+item.expiryDate:''" v-for="item in customerBundleItemList" :key="item.id" :id='item.id' is-link @click="subscribeMessage">
+          <van-cell :title="item.itemName" :label="expiryDate?'过期时间:'+expiryDate:''" v-for="item in customerBundleItemList" :key="item.id" :id='item.id' is-link @click="subscribeMessage">
             <div class="package-qr">
               <span>剩余{{item.remainTimes}}次</span>
               <van-icon class="icon-qr" size="1.5em" name="qr" color="#ff5500" />
@@ -99,7 +99,8 @@ export default {
       coupon: undefined,
       orderBundle: {},
       customerBundleItemList: [],
-      formId:null
+      formId:null,
+      expiryDate: null
     };
   },
   computed: {
@@ -119,7 +120,8 @@ export default {
         'INPA': '支付中',
         'PAED': '已支付',
         'CAEL': '已取消',
-        'SYCA': '已取消'
+        'SYCA': '已取消',
+        'RUND': '已退款'
       };
       return dict[this.orderBundle.orderFlag];
     }
@@ -195,6 +197,7 @@ export default {
           _this.coupon = res.data.coupon;
           _this.orderBundle = res.data.orderBundle;
           _this.customerBundleItemList = res.data.customerBundleItemList;
+          _this.expiryDate = res.data.expiryDate ? res.data.expiryDate.substr(0,10) : null
         } else {
           wx.showToast({
             title: res.message,