...
|
...
|
@@ -3,18 +3,18 @@ |
|
|
<LayoutHeader class="layout-header" :show-back="true">
|
|
|
<template>
|
|
|
<transition name="fade">
|
|
|
<img-size v-show="headThumbnailVisible" class="title-thumbnail" :src="imageList[0] && imageList[0].image_url" :width="300" :height="300"/>
|
|
|
<img-size v-show="headThumbnailVisible" class="title-thumbnail" :src="imageList && imageList[0] && imageList[0].image_url" :width="300" :height="300"/>
|
|
|
</transition>
|
|
|
</template>
|
|
|
|
|
|
<template #opts>
|
|
|
<cube-button class="icon-fav" :light="true" v-if="productDetail.isFav" @click="_toggleFav(true)">
|
|
|
<cube-button class="icon-fav" :light="true" v-if="productDetail.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>
|
|
|
</svg>
|
|
|
</cube-button>
|
|
|
<cube-button class="icon-fav" :light="true" v-else @click="_toggleFav(false)">
|
|
|
<cube-button class="icon-fav" :light="true" v-else @click="_toggleFav(true)">
|
|
|
<svg id="icon-heart-o" style="width: 1rem; height: 1rem;" viewBox="0 0 28 28">
|
|
|
<title>heart-o</title>
|
|
|
<path d="M26 9.312c0-4.391-2.969-5.313-5.469-5.313-2.328 0-4.953 2.516-5.766 3.484-0.375 0.453-1.156 0.453-1.531 0-0.812-0.969-3.437-3.484-5.766-3.484-2.5 0-5.469 0.922-5.469 5.313 0 2.859 2.891 5.516 2.922 5.547l9.078 8.75 9.063-8.734c0.047-0.047 2.938-2.703 2.938-5.563zM28 9.312c0 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.281s-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.313z"></path>
|
...
|
...
|
@@ -46,10 +46,9 @@ |
|
|
<img-size :src="sizeImg(resource.src)" :width="300" :height="60"/>
|
|
|
</a>
|
|
|
<div class="info-list">
|
|
|
<div class="info-list-item" v-if="activity && activity.length !== 0">
|
|
|
<div class="info-list-item" v-if="activity && activity.length !== 0" @click="showActivity">
|
|
|
<div class="info-list-name">促销</div>
|
|
|
<div class="info-list-value info-promote" @click="showActivity"
|
|
|
>
|
|
|
<div class="info-list-value info-promote">
|
|
|
<span>{{activity[0].promotionTypeStr}}</span>
|
|
|
<i class="cubeic-arrow"></i>
|
|
|
</div>
|
...
|
...
|
@@ -166,16 +165,23 @@ export default { |
|
|
},
|
|
|
},
|
|
|
beforeRouteUpdate(to, from, next) {
|
|
|
const loading = this.createLoading();
|
|
|
// const loading = this.createLoading();
|
|
|
|
|
|
this.loadData(to.params.productId, loading).then(next);
|
|
|
this.loadData(to.params.productId).then(next);
|
|
|
},
|
|
|
mounted() {
|
|
|
this.loadData(this.productId);
|
|
|
this.imageHideThreadhold = -window.innerWidth * 0.8;
|
|
|
},
|
|
|
activated() {
|
|
|
this.refresh();
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['fetchProductInfo', 'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct']),
|
|
|
refresh() {
|
|
|
this.$refs.slide.refresh();
|
|
|
this.headThumbnailVisible = false;
|
|
|
},
|
|
|
handleScroll(e) {
|
|
|
this.headThumbnailVisible = e.y < this.imageHideThreadhold;
|
|
|
},
|
...
|
...
|
@@ -194,6 +200,9 @@ export default { |
|
|
|
|
|
return this.fetchProductInfo({productId}).then(() => {
|
|
|
loading && loading.hide();
|
|
|
setTimeout(() => {
|
|
|
this.refresh();
|
|
|
}, 200);
|
|
|
}).catch(() => {
|
|
|
loading && loading.hide();
|
|
|
});
|
...
|
...
|
@@ -217,9 +226,6 @@ export default { |
|
|
onSizeSelectSheetHidden() {
|
|
|
this.showSizeSelectSheet = false;
|
|
|
},
|
|
|
gotoProduction(productId) {
|
|
|
this.$router.push({name: this.$route.name, params: {productId}});
|
|
|
},
|
|
|
buy() {
|
|
|
this.showBuySheet = true;
|
|
|
},
|
...
|
...
|
@@ -234,6 +240,7 @@ export default { |
|
|
name: 'OrderSellConfirm',
|
|
|
query: tradeProduct
|
|
|
});
|
|
|
this.showSizeSelectSheet = false;
|
|
|
},
|
|
|
onRequestSize() {
|
|
|
this.showSizeSelectSheet = false;
|
...
|
...
|
@@ -283,6 +290,11 @@ export default { |
|
|
}
|
|
|
}
|
|
|
|
|
|
.cube-slide-item {
|
|
|
img {
|
|
|
margin: 0 auto;
|
|
|
}
|
|
|
}
|
|
|
.banner {
|
|
|
padding: 20px 0 0;
|
|
|
display: block;
|
...
|
...
|
|