Authored by hongyong.zhao

求购予发布提示

... ... @@ -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}),
... ...
... ... @@ -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,
... ...