优化代码

This commit is contained in:
java110 2020-11-13 19:19:03 +08:00
parent 0953681a16
commit cba06d54b4
2 changed files with 15 additions and 2 deletions

View File

@ -77,7 +77,7 @@
<tr v-for="order in storeOrderCartManageInfo.orderCarts">
<td class="text-center">{{order.cartId}}</td>
<td class="text-center">{{order.prodName}}</td>
<td class="text-center">{{order.createTime}}</td>
<td class="text-center">{{order.specValue}}</td>
<td class="text-center">{{order.personName}}</td>
<td class="text-center">{{order.payPrice}}</td>
<td class="text-center">{{order.stateName}}</td>

View File

@ -41,7 +41,20 @@
var _storeOrderCartManageInfo=JSON.parse(json);
vc.component.storeOrderCartManageInfo.total = _storeOrderCartManageInfo.total;
vc.component.storeOrderCartManageInfo.records = _storeOrderCartManageInfo.records;
vc.component.storeOrderCartManageInfo.orderCarts = _storeOrderCartManageInfo.data;
$that.storeOrderCartManageInfo.orderCarts = _storeOrderCartManageInfo.data;
let _orderCarts = $that.storeOrderCartManageInfo.orderCarts;
_orderCarts.forEach(item => {
let _productSpecDetails = item.productSpecDetails;
let _specValue = '';
_productSpecDetails.forEach(detail => {
_specValue += (detail.detailValue+"/");
});
item.specValue = _specValue;
});
vc.emit('pagination','init',{
total:vc.component.storeOrderCartManageInfo.records,
currentPage:_page