Authored by hongyong.zhao

自己订单提示

... ... @@ -32,7 +32,7 @@ import TitleComp from './components/confirm/title';
import OrderMargin from './components/confirm/order-margin';
import OrderFee from './components/confirm/order-fee';
import OrderAgree from './components/confirm/agree';
import {get} from 'lodash'
import {get} from 'lodash';
import { createNamespacedHelpers} from 'vuex';
const { mapState, mapActions, mapMutations, mapGetters} = createNamespacedHelpers(
... ... @@ -61,7 +61,7 @@ export default {
isAgreeTerms: false,
hiddenIcon: true,
agreeDesc: '有货卖家协议',
url: `http://m.yohobuy.com/activity/student/detail/renzhen?openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"url\":\"https://activity.yoho.cn/feature/3187.html?title=卖家协议\"}}`,
url: 'http://m.yohobuy.com/activity/student/detail/renzhen?openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"url\":\"https://activity.yoho.cn/feature/3187.html?title=卖家协议\"}}',
isEntry: false,
};
},
... ... @@ -84,14 +84,14 @@ export default {
},
mounted() {
this.isEntry = false
this.isEntry = false;
this.fetchSellerEntryStatus({})
.then((res)=> {
console.log(res)
console.log(res);
if (res) {
this.isEntry = get(res, 'entrySellerType', 0) !== 0
this.isEntry = get(res, 'entrySellerType', 0) !== 0;
}
})
});
this.fetchSellerOrderCount({tabType: 'sell'});// 19268
this.sellerCompute({price: this.price, skup: this.skup});
... ... @@ -101,7 +101,7 @@ export default {
isShowTip(val) {
if (val) {
this.showToast()
this.showToast();
}
}
},
... ... @@ -138,14 +138,25 @@ export default {
},
onConfirm: () => {
this.sellerPublish({price: this.price, skup: this.skup, address_id: this.addressInfo.address_id})
.then(() => {
this.$createToast({
time: 1000,
type: 'txt',
txt: '出售成功'
}).show();
.then((res) => {
if (res && res.data && res.data.code == 200) {
this.$createToast({
time: 1000,
type: 'txt',
txt: '出售成功'
}).show();
this.$router.go(-1);
} else {
this.$createToast({
time: 1000,
type: 'txt',
txt: res.message
}).show();
}
this.$router.go(-1);
});
},
onCancel: () => {
... ... @@ -188,7 +199,7 @@ export default {
},
showToast() {
this.SELLER_ASK_SET_IS_SHOWTOAST(false)
this.SELLER_ASK_SET_IS_SHOWTOAST(false);
this.$createToast({
time: 1000,
type: 'txt',
... ...
... ... @@ -210,9 +210,14 @@ export default function() {
} else {
commit(SELLER_ASK_PUBLISH_FAILURE, result.message);
}
return result;
}, error => {
console.log(error);
commit(SELLER_ASK_PUBLISH_FAILURE, TIP);
return {
code: 400,
message: TIP
};
});
}
},
... ...