Authored by hongyong.zhao

求购予发布提示

@@ -296,8 +296,10 @@ export default { @@ -296,8 +296,10 @@ export default {
296 296
297 submitClick: debounce(function() { 297 submitClick: debounce(function() {
298 this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id}) 298 this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id})
299 - .then(() => {  
300 - this.showDialog(); 299 + .then((res) => {
  300 + if (res && res.code == 200) {
  301 + this.showDialog();
  302 + }
301 }); 303 });
302 }, 500, {leading: false, trailing: true}), 304 }, 500, {leading: false, trailing: true}),
303 305
@@ -164,11 +164,11 @@ export default function() { @@ -164,11 +164,11 @@ export default function() {
164 }, 164 },
165 165
166 [BUYER_ASK_SET_PRODUCTINFO](state, payload) { 166 [BUYER_ASK_SET_PRODUCTINFO](state, payload) {
167 - state.originProductData = payload 167 + state.originProductData = payload;
168 }, 168 },
169 169
170 [BUYER_ASK_SET_STORAGEID](state, payload) { 170 [BUYER_ASK_SET_STORAGEID](state, payload) {
171 - state.storageId = payload 171 + state.storageId = payload;
172 }, 172 },
173 173
174 [BUYER_ASK_SET_SHOWTOAST](state, payload) { 174 [BUYER_ASK_SET_SHOWTOAST](state, payload) {
@@ -368,20 +368,19 @@ export default function() { @@ -368,20 +368,19 @@ export default function() {
368 368
369 buyerPrePublish({commit, dispatch}, {price = 0, storage_id = 0, uid, address_id = ''} = {}) { 369 buyerPrePublish({commit, dispatch}, {price = 0, storage_id = 0, uid, address_id = ''} = {}) {
370 commit(BUYER_ASK_PREPUBLISH_REQUEST); 370 commit(BUYER_ASK_PREPUBLISH_REQUEST);
371 - return this.$api.get('/api/order/buyeraskprepublish', { 371 + return this.$api.get('/api/order/buyeraskprepublish', {
372 price, 372 price,
373 storage_id, 373 storage_id,
374 uid, 374 uid,
375 address_id, 375 address_id,
376 }).then(result => { 376 }).then(result => {
377 if (result.code === 200) { 377 if (result.code === 200) {
378 - let payload = get(result, ['data', 'dialog'], null) 378 + let payload = get(result, ['data', 'dialog'], null);
379 commit(BUYER_ASK_PREPUBLISH_SUCCESS, payload); 379 commit(BUYER_ASK_PREPUBLISH_SUCCESS, payload);
380 - return payload;  
381 } else { 380 } else {
382 commit(BUYER_ASK_PREPUBLISH_FAILURE, result.message); 381 commit(BUYER_ASK_PREPUBLISH_FAILURE, result.message);
383 - return null;  
384 } 382 }
  383 + return result;
385 }, error => { 384 }, error => {
386 console.log(error); 385 console.log(error);
387 commit(BUYER_ASK_PREPUBLISH_FAILURE, TIP); 386 commit(BUYER_ASK_PREPUBLISH_FAILURE, TIP);
@@ -389,9 +388,9 @@ export default function() { @@ -389,9 +388,9 @@ export default function() {
389 }); 388 });
390 }, 389 },
391 390
392 - async buyerPublish({commit, dispatch}, {price = 0, storage_id = 0, uid, address_id = '', time_limit_id = ''} = {}) { 391 + async buyerPublish({commit, dispatch}, {price = 0, storage_id = 0, uid, address_id = '', time_limit_id = ''} = {}) {
393 commit(BUYER_ASK_PUBLISH_REQUEST); 392 commit(BUYER_ASK_PUBLISH_REQUEST);
394 - return this.$api.get('/api/order/buyeraskpublish', { 393 + return this.$api.get('/api/order/buyeraskpublish', {
395 price, 394 price,
396 storage_id, 395 storage_id,
397 uid, 396 uid,