Browse Source

bug修改

wangfei 6 years ago
parent
commit
afb53664e4
2 changed files with 7 additions and 9 deletions
  1. 2
    6
      src/components/myCard/myCard.vue
  2. 5
    3
      src/pages/user/mainPage/coffeeIndex/index.vue

+ 2
- 6
src/components/myCard/myCard.vue View File

@@ -24,11 +24,11 @@
24 24
       </div>
25 25
       <div>
26 26
         <span>用户领取</span>
27
-        <span>{{ismanager?data.SentCount:userGet.length}}</span>
27
+        <span>{{ismanager?data.SentCount:data.CustomerList.length}}</span>
28 28
       </div>
29 29
       <div>
30 30
         <span>用户使用</span>
31
-        <span>{{ismanager?data.UsedCount:userGet.filter(x => x.status===1).length}}</span>
31
+        <span>{{ismanager?data.UsedCount:data.CustomerList.filter(x => x.status===1).length}}</span>
32 32
       </div>
33 33
     </div>
34 34
     <div class="card-bottom" @click.stop="share">
@@ -59,10 +59,6 @@ export default {
59 59
       type: Boolean,
60 60
       default: false
61 61
     },
62
-    userGet: {
63
-      type: Array,
64
-      default: []
65
-    },
66 62
     ismanager: {
67 63
       type: Boolean,
68 64
       default: false

+ 5
- 3
src/pages/user/mainPage/coffeeIndex/index.vue View File

@@ -59,7 +59,7 @@
59 59
                   </div>
60 60
                   <a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
61 61
                 </div>
62
-                <myCard v-for="(item,index) in data[1].list" :ismanager="userInfo.customer.UserTypeId == 'manager'" :userGet="item.CustomerCoupon" :isgrey="checkCanDo()" :key="index" :data='item' @share='shareCard'></myCard>
62
+                <myCard v-for="(item,index) in data[1].list" :ismanager="userInfo.customer.UserTypeId == 'manager'" :isgrey="checkCanDo()" :key="index" :data='item' @share='shareCard'></myCard>
63 63
                 <noMore v-if="data[1].hasPic"></noMore>
64 64
               </div>
65 65
             </li>
@@ -74,7 +74,7 @@
74 74
                   </div>
75 75
                   <a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
76 76
                 </div>
77
-                <myCard v-for="(item,index) in data[2].list" :ismanager="userInfo.customer.UserTypeId == 'manager'" :userGet="item.CustomerCard" :isgrey="checkCanDo()" :key="index" :data='item' @share='shareCoupon'></myCard>
77
+                <myCard v-for="(item,index) in data[2].list" :ismanager="userInfo.customer.UserTypeId == 'manager'" :isgrey="checkCanDo()" :key="index" :data='item' @share='shareCoupon'></myCard>
78 78
                 <noMore v-if="data[2].hasPic"></noMore>
79 79
               </div>
80 80
             </li>
@@ -300,6 +300,7 @@ export default {
300 300
                 SentCount: res.list[n].SentCount,
301 301
                 usedCount: res.list[n].UsedCount,
302 302
                 CardId: res.list[n].CouponId,
303
+                CustomerList: res.list[n].CustomerCoupon || []
303 304
               })
304 305
             }
305 306
             var count = 0
@@ -327,7 +328,8 @@ export default {
327 328
                 totalCount: res.list[n].TotalCount,
328 329
                 SentCount: res.list[n].SentCount,
329 330
                 usedCount: res.list[n].UsedCount,
330
-                CardId: res.list[n].CardId
331
+                CardId: res.list[n].CardId,
332
+                CustomerList: res.list[n].CustomerCard || []
331 333
               })
332 334
             }
333 335
             var count = 0