Authored by yyq

Merge branch 'develop' of git.yoho.cn:fe/xianyu-ufo-app-web into develop

... ... @@ -296,8 +296,10 @@ export default {
submitClick: debounce(function() {
this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id})
.then(() => {
this.showDialog();
.then((res) => {
if (res && res.code == 200) {
this.showDialog();
}
});
}, 500, {leading: false, trailing: true}),
... ...
... ... @@ -13,8 +13,13 @@ export default {
methods: {
...mapActions(['cancelTradeConfirmInfo', 'cancelTrade']),
...inSaleMapMutations(['filterInSaleOrderList']),
async onInSaleOrderAction({ action, order, isDetail = false } = {}) {
const { owner = ownType.SELL } = this.$route.params;
async onInSaleOrderAction({
action,
order,
isDetail = false, // 是否是详情
isInSale = false, // 是否是出售中
} = {}) {
const { owner = ownType.SELL, status } = this.$route.params;
const { orderCode, earnestMoney = 0 } = order;
switch (action.name) {
... ... @@ -42,7 +47,15 @@ export default {
if (isDetail) {
this.fetchOrderDetail(this.$route.params);
} else {
this.filterInSaleOrderList(orderCode);
if (isInSale) {
this.filterInSaleOrderList(orderCode);
} else {
this.filterOrderList({
orderCode,
owner,
status,
});
}
}
}
},
... ...
... ... @@ -17,7 +17,10 @@
<order-actions
class="actions"
:order="order"
@on-action="action => onInSaleOrderAction({ action, order })"
@on-action="
action =>
onInSaleOrderAction({ action, order, isInSale: true })
"
/>
</div>
</li>
... ...
... ... @@ -164,11 +164,11 @@ export default function() {
},
[BUYER_ASK_SET_PRODUCTINFO](state, payload) {
state.originProductData = payload
state.originProductData = payload;
},
[BUYER_ASK_SET_STORAGEID](state, payload) {
state.storageId = payload
state.storageId = payload;
},
[BUYER_ASK_SET_SHOWTOAST](state, payload) {
... ... @@ -368,20 +368,19 @@ export default function() {
buyerPrePublish({commit, dispatch}, {price = 0, storage_id = 0, uid, address_id = ''} = {}) {
commit(BUYER_ASK_PREPUBLISH_REQUEST);
return this.$api.get('/api/order/buyeraskprepublish', {
return this.$api.get('/api/order/buyeraskprepublish', {
price,
storage_id,
uid,
address_id,
}).then(result => {
if (result.code === 200) {
let payload = get(result, ['data', 'dialog'], null)
let payload = get(result, ['data', 'dialog'], null);
commit(BUYER_ASK_PREPUBLISH_SUCCESS, payload);
return payload;
} else {
commit(BUYER_ASK_PREPUBLISH_FAILURE, result.message);
return null;
}
return result;
}, error => {
console.log(error);
commit(BUYER_ASK_PREPUBLISH_FAILURE, TIP);
... ... @@ -389,9 +388,9 @@ export default function() {
});
},
async buyerPublish({commit, dispatch}, {price = 0, storage_id = 0, uid, address_id = '', time_limit_id = ''} = {}) {
async buyerPublish({commit, dispatch}, {price = 0, storage_id = 0, uid, address_id = '', time_limit_id = ''} = {}) {
commit(BUYER_ASK_PUBLISH_REQUEST);
return this.$api.get('/api/order/buyeraskpublish', {
return this.$api.get('/api/order/buyeraskpublish', {
price,
storage_id,
uid,
... ...