Commit 7f7af804 by chenyu

update: style

parent 443a7ab7
......@@ -80,10 +80,9 @@
<div class="bottom">
<p class="amount-line">支付方式:</p>
<div class="right">
<p class="cash"><span>现金</span>¥{{payInfo.cash|fomatFloat}}
</p>
<p class="voucher">
<span>抵金券</span>¥{{payInfo.voucher|fomatFloat}}
<p v-for="pay in payInfo" :key="pay"
:class="[pay.name==='抵金券'?'voucher':'']">
<span>{{pay.name}}</span>¥{{pay.value|fomatFloat}}
</p>
</div>
</div>
......@@ -191,7 +190,7 @@ export default {
orderType: -1,
orderLoading: false,
orderInfo: {},
payInfo: {},
payInfo: [],
page: {
currentPage: 1,
pageSize: 20,
......@@ -310,22 +309,10 @@ export default {
})
.then(res => {
if (res.data.errorCode === 0) {
let orderInfo = {};
let payInfo = {};
let orderInfo = { payInfo: [] };
orderInfo = res.data.result.orderInfo;
if (orderInfo.payInfo) {
let list = JSON.parse(orderInfo.payInfo) || [];
list.map(el => {
switch (el.name) {
case '现金': payInfo.cash = el.value; break;
case '抵金券': payInfo.voucher = el.value; break;
default:
break;
}
});
}
this.orderInfo = Object.assign({}, orderInfo);
this.payInfo = Object.assign({}, payInfo);
this.payInfo = JSON.parse(orderInfo.payInfo) || [];
} else {
checkFalse(res.data.message);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment