Authored by 沈志敏

fix bug 630,631

@@ -104,10 +104,10 @@ @@ -104,10 +104,10 @@
104 if (result.data.orderList.length > 0) { 104 if (result.data.orderList.length > 0) {
105 this.$set('orderList', _that.orderList.concat(result.data.orderList)); 105 this.$set('orderList', _that.orderList.concat(result.data.orderList));
106 _that.pageTotal = result.data.pageTotal; 106 _that.pageTotal = result.data.pageTotal;
107 - } else {  
108 - _that.emptybox = '';  
109 } 107 }
110 - } else { 108 + }
  109 +
  110 + if (_that.orderList.length === 0) {
111 _that.emptybox = ''; 111 _that.emptybox = '';
112 } 112 }
113 }).fail(() => { 113 }).fail(() => {
@@ -37,6 +37,11 @@ @@ -37,6 +37,11 @@
37 </div> 37 </div>
38 </li> 38 </li>
39 </ul> 39 </ul>
  40 + <div class="order-empty {{emptybox}}">
  41 + <p>您暂时还没有订单</p>
  42 + <p>Your do not have an order <br>for the time being</p>
  43 + <a href="/new">随便逛逛</a>
  44 + </div>
40 </template> 45 </template>
41 <script> 46 <script>
42 'use strict'; 47 'use strict';
@@ -51,6 +56,7 @@ @@ -51,6 +56,7 @@
51 pageTotal: 1, 56 pageTotal: 1,
52 orderList: [], 57 orderList: [],
53 busy: false, 58 busy: false,
  59 + emptybox: 'hide'
54 }; 60 };
55 }, 61 },
56 62
@@ -78,6 +84,10 @@ @@ -78,6 +84,10 @@
78 this.$set('orderList', _that.orderList.concat(result.data.list)); 84 this.$set('orderList', _that.orderList.concat(result.data.list));
79 _that.pageTotal = result.data.totalPage; 85 _that.pageTotal = result.data.totalPage;
80 } 86 }
  87 +
  88 + if (_that.orderList.length === 0) {
  89 + _that.emptybox = '';
  90 + }
81 }).fail(() => { 91 }).fail(() => {
82 tip('网络错误'); 92 tip('网络错误');
83 }); 93 });