...
|
...
|
@@ -52,18 +52,17 @@ |
|
|
</div>
|
|
|
<span class="iconfont iconright"></span>
|
|
|
</div>
|
|
|
</LayoutScroll>
|
|
|
<div class="fixed-footer">
|
|
|
<cube-button class="buy active" @click="buy">购买 <span class="price">¥{{info.price}}</span></cube-button>
|
|
|
</div>
|
|
|
</LayoutScroll>
|
|
|
</LayoutApp>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { Button, Slide } from 'cube-ui';
|
|
|
import { mapState } from 'vuex'
|
|
|
import { mapState, mapActions } from 'vuex'
|
|
|
import ImgSize from '@/components/img-size';
|
|
|
|
|
|
// const info = {
|
|
|
// "brandName": "NIKE",
|
|
|
// "colorName": "黑色",
|
...
|
...
|
@@ -115,6 +114,10 @@ export default { |
|
|
// console.log('mounted', this.info);
|
|
|
},
|
|
|
activated() {
|
|
|
if (this.$refs.pageScroll) {
|
|
|
this.$refs.pageScroll.scrollTop = 0;
|
|
|
}
|
|
|
this.fetchDetailById({ skup: this.skup })
|
|
|
this.refresh();
|
|
|
},
|
|
|
deactivated() {},
|
...
|
...
|
@@ -123,6 +126,8 @@ export default { |
|
|
// beforeRouteLeave(to, from, next) {},
|
|
|
destroyed() {},
|
|
|
methods: {
|
|
|
...mapActions('second',['fetchDetailById']),
|
|
|
|
|
|
refresh() {
|
|
|
this.$refs.slide && this.$refs.slide.refresh && this.$refs.slide.refresh();
|
|
|
},
|
...
|
...
|
@@ -155,7 +160,9 @@ export default { |
|
|
/* 定义局部样式,添加外围容器,scss嵌套尽量不要超过三层,会影响查找器性能 */
|
|
|
<style rel='stylesheet/scss' lang='scss' scoped>
|
|
|
@import '@/pages/product/product-detail.scss';
|
|
|
/* .second-detail-wrap {} */
|
|
|
.second-detail-wrap {
|
|
|
padding-bottom: 120px;
|
|
|
}
|
|
|
|
|
|
.ellipsis {
|
|
|
white-space: nowrap;
|
...
|
...
|
@@ -277,9 +284,10 @@ export default { |
|
|
|
|
|
// fixed-footer
|
|
|
.fixed-footer {
|
|
|
position: sticky;
|
|
|
position: fixed;
|
|
|
bottom: 0;
|
|
|
display: flex;
|
|
|
width: 100%;
|
|
|
height: 120px;
|
|
|
padding: 16px 30px;
|
|
|
box-shadow: 0 0 4px rgba(0, 0, 0, 0.08);
|
...
|
...
|
|