Authored by zhangwenxue

商品详情: 取消变现

变现是求购需求
... ... @@ -18,8 +18,7 @@
@select="onSelectSize"
@add="onAdd" />
<transition name="slide-up">
<div class="footer" v-if="isAvailable">
<cube-button v-if="config.type === 'sell'" @click="convertToCash" :class="{active: isMarketable}">变现<span> <i>¥</i>{{cashPrice}}</span></cube-button>
<div class="footer">
<cube-button @click="select" :class="{active: isTradable}">{{config.title}}</cube-button>
</div>
</transition>
... ... @@ -97,25 +96,6 @@ export default {
isTradable() {
return this.isAvailable && this.selectedSize.storage_num > 0 && this.selectedSize.least_price !== '-';
},
/**
* 变现价格,使用bid_moster_price
*/
cashPrice() {
if (this.selectedSize && this.selectedSize.hasOwnProperty('bid_moster_price')) {
return this.selectedSize.bid_moster_price;
}
return '-';
},
/**
* 可变现
* 通过bid_moster_price或bid_skup判断
*/
isMarketable() {
return this.cashPrice > 0;
}
},
mounted() {
this.$refs.popup.show();
... ... @@ -148,14 +128,6 @@ export default {
bid_skup: this.selectedSize.bid_skup,
});
},
convertToCash() {
if (!this.isMarketable) {
return;
}
this.hide();
// TODO: TBD
},
},
};
</script>
... ...