...
|
...
|
@@ -57,7 +57,7 @@ |
|
|
</div>
|
|
|
<div class="footer">
|
|
|
<div class="heart">
|
|
|
<div class="icon-fav" v-if="productDetail.isFav" @click="_toggleFav(false)">
|
|
|
<div class="icon-fav" v-if="isFav" @click="_toggleFav(false)">
|
|
|
<svg id="icon-heart" style="width: 1rem; height: 1rem;" viewBox="0 0 28 28">
|
|
|
<title>heart</title>
|
|
|
<path d="M14 26c-0.25 0-0.5-0.094-0.688-0.281l-9.75-9.406c-0.125-0.109-3.563-3.25-3.563-7 0-4.578 2.797-7.313 7.469-7.313 2.734 0 5.297 2.156 6.531 3.375 1.234-1.219 3.797-3.375 6.531-3.375 4.672 0 7.469 2.734 7.469 7.313 0 3.75-3.437 6.891-3.578 7.031l-9.734 9.375c-0.187 0.187-0.438 0.281-0.688 0.281z"></path>
|
...
|
...
|
@@ -144,7 +144,7 @@ export default { |
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(['productDetail', 'topList', 'imageList', 'resource', 'activity', 'recommend']),
|
|
|
...mapGetters(['productDetail', 'isFav', 'topList', 'imageList', 'resource', 'activity', 'recommend']),
|
|
|
productDec() {
|
|
|
const goods = get(this.productDetail, 'goods_list[0]', {});
|
|
|
|
...
|
...
|
@@ -183,7 +183,7 @@ export default { |
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['fetchProductInfo', 'fetchTop3', 'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct']),
|
|
|
...mapActions(['fetchProductInfo', 'fetchTop3', 'fetchFav', 'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct']),
|
|
|
refresh() {
|
|
|
this.$refs.slide.refresh();
|
|
|
this.headThumbnailVisible = false;
|
...
|
...
|
@@ -205,6 +205,7 @@ export default { |
|
|
loading && loading.show();
|
|
|
|
|
|
this.fetchTop3({productId});
|
|
|
this.fetchFav({productId});
|
|
|
|
|
|
return this.fetchProductInfo({productId}).then(() => {
|
|
|
loading && loading.hide();
|
...
|
...
|
@@ -215,7 +216,9 @@ export default { |
|
|
loading && loading.hide();
|
|
|
});
|
|
|
},
|
|
|
_toggleFav(isFav) {
|
|
|
async _toggleFav(isFav) {
|
|
|
await this.$yoho.auth();
|
|
|
|
|
|
this.toggleFav({ productId: this.productId, isFav }).then(() => {
|
|
|
const txt = isFav ? '收藏成功' : '取消收藏成功';
|
|
|
|
...
|
...
|
@@ -260,8 +263,8 @@ export default { |
|
|
onSizeSelectSheetHidden() {
|
|
|
this.showSizeSelectSheet = false;
|
|
|
},
|
|
|
buy() {
|
|
|
this.$yoho.auth();
|
|
|
async buy() {
|
|
|
await this.$yoho.auth();
|
|
|
|
|
|
this.selectSizeConfig = {
|
|
|
dest: 'OrderBuyConfirm',
|
...
|
...
|
@@ -273,8 +276,8 @@ export default { |
|
|
onBuyHidden() {
|
|
|
this.showBuySheet = false;
|
|
|
},
|
|
|
sell() {
|
|
|
this.$yoho.auth();
|
|
|
async sell() {
|
|
|
await this.$yoho.auth();
|
|
|
|
|
|
this.selectSizeConfig = {
|
|
|
dest: 'OrderSellConfirm',
|
...
|
...
|
|