Authored by lea guo

订单操作刷新

... ... @@ -123,6 +123,7 @@ export default {
pageBackName = 'OrderList';
if (isDetail) {
this.hasAction = true;
price = priceInfo.realPayPrice;
pageBackName = 'buyOrderDetail';
}
... ... @@ -135,7 +136,7 @@ export default {
name: pageBackName,
params: {
owner,
orderCode,
code: orderCode,
},
},
reportType: 'buy',
... ... @@ -148,6 +149,7 @@ export default {
// 是否是求购
const isAskForBuy = status === 7;
this.hasAction = true;
this.$createOrderPayType({
orderCode,
price: parseFloat(bidDepositInfo.depositAmount).toFixed(2),
... ...
<template>
<div>
<layout-app
:title="'\u200E'"
class="buyer-order-detail-wrapper"
>
<layout-app :title="'\u200E'" class="buyer-order-detail-wrapper">
<div class="order-detail-wrapper">
<div class="content">
<!-- 状态信息 -->
... ... @@ -175,7 +172,9 @@ export default {
if (this.from.name === "OrderPay" || this.hasAction) {
to.params.isRefetch = true;
}
this.hasAction = false;
if (to.name === "OrderList" || to.name === "InSaleOrderList") {
this.hasAction = false;
}
next();
},
computed: {
... ...
... ... @@ -157,6 +157,7 @@ export default {
case UserType.sell: {
this.$router.replace({
name: 'InSaleOrderList',
isRefetch: true
});
break;
}
... ... @@ -164,7 +165,8 @@ export default {
this.$router.replace({
name: 'OrderList',
params: {
owner: UserType.buy
owner: UserType.buy,
isRefetch: true
}
});
break;
... ... @@ -173,7 +175,8 @@ export default {
this.$router.replace({
name: 'OrderList',
params: {
owner: UserType.buy
owner: UserType.buy,
isRefetch: true
}
});
break;
... ...
... ... @@ -34,7 +34,7 @@ export default function() {
* }
*/
async fetchOrderDetail({ commit }, { owner, code } = {}) {
const res = await this.$api.post('/api/order/detail', {
const res = await this.$api.get('/api/order/detail', {
tabType: owner,
orderCode: +code,
});
... ...
... ... @@ -14,6 +14,7 @@ function initialOrderState() {
// scroll 组件参数,是否触发上拉事件
pullUpLoad: true,
isShowEmpty: false,
hasAction: false
};
}
... ...