...
|
...
|
@@ -62,6 +62,7 @@ export default { |
|
|
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=卖家协议\"}}`,
|
|
|
isEntry: false,
|
|
|
};
|
|
|
},
|
|
|
|
...
|
...
|
@@ -83,6 +84,14 @@ export default { |
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
this.isEntry = false
|
|
|
this.fetchSellerEntryStatus({})
|
|
|
.then((res)=> {
|
|
|
console.log(res)
|
|
|
if (res) {
|
|
|
this.isEntry = get(res, 'entrySellerType', 0) !== 0
|
|
|
}
|
|
|
})
|
|
|
this.fetchSellerOrderCount({tabType: 'sell'});// 19268
|
|
|
this.sellerCompute({price: this.price, skup: this.skup});
|
|
|
|
...
|
...
|
@@ -105,13 +114,51 @@ export default { |
|
|
'fetchSellerOrderCount',
|
|
|
'sellerCompute',
|
|
|
'sellerPublish',
|
|
|
'fetchSellerEntryStatus',
|
|
|
|
|
|
]),
|
|
|
submitClick() {
|
|
|
this.sellerPublish({price: this.price, skup: this.skup, address_id: this.addressInfo.address_id})
|
|
|
.then(() => {
|
|
|
this.payOrder();
|
|
|
});
|
|
|
|
|
|
if (this.isEntry) {
|
|
|
this.$createDialog({
|
|
|
type: 'confirm',
|
|
|
title: '',
|
|
|
content: `确定以${this.price}出售此商品`,
|
|
|
confirmBtn: {
|
|
|
text: '确定出售',
|
|
|
active: true,
|
|
|
disabled: false,
|
|
|
href: 'javascript:;',
|
|
|
},
|
|
|
cancelBtn: {
|
|
|
text: '我再想想',
|
|
|
active: false,
|
|
|
disabled: false,
|
|
|
href: 'javascript:;'
|
|
|
},
|
|
|
onConfirm: () => {
|
|
|
this.sellerPublish({price: this.price, skup: this.skup, address_id: this.addressInfo.address_id})
|
|
|
.then(() => {
|
|
|
this.$createToast({
|
|
|
time: 1000,
|
|
|
type: 'txt',
|
|
|
txt: '出售成功'
|
|
|
}).show();
|
|
|
|
|
|
this.$router.go(-1);
|
|
|
});
|
|
|
},
|
|
|
onCancel: () => {
|
|
|
this.computePrice();
|
|
|
}
|
|
|
}).show();
|
|
|
} else {
|
|
|
this.sellerPublish({price: this.price, skup: this.skup, address_id: this.addressInfo.address_id})
|
|
|
.then(() => {
|
|
|
this.payOrder();
|
|
|
});
|
|
|
}
|
|
|
|
|
|
},
|
|
|
payOrder() {
|
|
|
|
...
|
...
|
|