...
|
...
|
@@ -14,8 +14,14 @@ |
|
|
<div class="productPrice">
|
|
|
<span class="size">{{sizeInfo}}</span>
|
|
|
<div class="pricedetail">
|
|
|
<span class="priceTitle">最低售价: </span>
|
|
|
<span class="price">{{originProductData.least_price || '-'}}</span>
|
|
|
<div>
|
|
|
<span class="priceTitle">最低售价: </span>
|
|
|
<span class="price">{{originProductData.least_price || '-'}}</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
<span class="priceTitle">最高求购价: </span>
|
|
|
<span class="price">{{originProductData.bid_moster_price || '-'}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -97,7 +103,7 @@ export default { |
|
|
return {
|
|
|
inputPrice: '',
|
|
|
isAgreeTerms: false,
|
|
|
url: `http://m.yohobuy.com/activity/student/detail/renzhen?openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"url\":\"https://activity.yoho.cn/feature/3189.html?title=买家协议&promiseV="}}`,
|
|
|
url: 'http://m.yohobuy.com/activity/student/detail/renzhen?openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"url\":\"https://activity.yoho.cn/feature/3189.html?title=买家协议&promiseV="}}',
|
|
|
agreeDesc: '有货买家协议'
|
|
|
};
|
|
|
},
|
...
|
...
|
@@ -123,19 +129,29 @@ export default { |
|
|
sizeInfo: {
|
|
|
get() {
|
|
|
return this.originProductData.colorName + ', ' + this.originProductData.sizeName + '码';// '黑色, 48码';
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
|
|
|
next(vm => {
|
|
|
// 通过 `vm` 访问组件实例
|
|
|
vm.inputPrice = '';
|
|
|
vm.BUYER_ASK_RESET_DATA();
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
this.BUYER_ASK_RESET_DATA();
|
|
|
|
|
|
this.BUYER_ASK_SET_STORAGEID(this.storageId);
|
|
|
this.fetchBuyerOrderCount({ tabType: 'buy'});
|
|
|
this.fetchConfig();
|
|
|
this.$on("addressinfo", function (address) {
|
|
|
console.log(address)
|
|
|
})
|
|
|
this.$on('addressinfo', function(address) {
|
|
|
console.log(address);
|
|
|
});
|
|
|
},
|
|
|
|
|
|
watch: {
|
...
|
...
|
@@ -150,6 +166,14 @@ export default { |
|
|
if (val) {
|
|
|
this.showDialog();
|
|
|
}
|
|
|
},
|
|
|
|
|
|
addressInfo(val) {
|
|
|
|
|
|
if (this.inputPrice && val) {
|
|
|
this.computePrice();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
},
|
|
|
|
...
|
...
|
@@ -173,7 +197,7 @@ export default { |
|
|
if (this.originProductData.least_price && this.originProductData.skup && this.originProductData.least_price <= this.inputPrice) {
|
|
|
this.showBuyDialog();
|
|
|
} else {
|
|
|
this.buyerCompute({price: this.inputPrice, storage_id: this.storageId });
|
|
|
this.computePrice();
|
|
|
}
|
|
|
}, 500, {leading: false, trailing: true}),
|
|
|
|
...
|
...
|
@@ -214,7 +238,7 @@ export default { |
|
|
});
|
|
|
},
|
|
|
onCancel: () => {
|
|
|
this.buyerCompute({price: this.inputPrice, storage_id: this.storageId });
|
|
|
this.computePrice();
|
|
|
}
|
|
|
}).show();
|
|
|
},
|
...
|
...
|
@@ -241,7 +265,7 @@ export default { |
|
|
},
|
|
|
|
|
|
onConfirm: () => {
|
|
|
this.publishProduct()
|
|
|
this.publishProduct();
|
|
|
},
|
|
|
|
|
|
onCancel: () => {
|
...
|
...
|
@@ -250,23 +274,32 @@ export default { |
|
|
|
|
|
}).show();
|
|
|
} else {
|
|
|
this.publishProduct()
|
|
|
this.publishProduct();
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
submitClick() {
|
|
|
this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id});
|
|
|
this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id});
|
|
|
},
|
|
|
|
|
|
publishProduct() {
|
|
|
this.buyerPublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id, time_limit_id: this.chooseDayId}).then(() => {
|
|
|
this.buyerPublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id, time_limit_id: this.chooseDayId}).then(() => {
|
|
|
this.payOrder();
|
|
|
});
|
|
|
},
|
|
|
|
|
|
computePrice() {
|
|
|
if (!this.inputPrice) {
|
|
|
console.log('inputPrice is null')
|
|
|
return;
|
|
|
}
|
|
|
this.buyerCompute({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id || '' });
|
|
|
},
|
|
|
|
|
|
payOrder() {
|
|
|
let vm = this;
|
|
|
|
|
|
this.$createOrderPayType({
|
|
|
price: get(this.publishresult, 'depositAmount', ''),
|
|
|
desc: '保证金',
|
...
|
...
|
@@ -372,11 +405,8 @@ export default { |
|
|
}
|
|
|
|
|
|
.pricedetail {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
height: 30*2px;
|
|
|
margin-top: 5*2px;
|
|
|
align-items: flex-end;
|
|
|
}
|
|
|
|
|
|
.priceTitle {
|
...
|
...
|
|