123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <!-- recommend.vue -->
- <template>
- <view class="div ui-recommend-wrapper" v-if="commendList.length > 0">
- <view class="div title">为你推荐</view>
- <view class="div product-list-body">
- <index-product-body
- class="product-item"
- :item="item"
- :index="index"
- v-for="(item, index) in commendList"
- v-bind:key="index"
- ></index-product-body>
- </view>
- </view>
- </template>
- <script>
- import { mapState, mapMutations } from 'vuex'
- import IndexProductBody from '../../index/IndexProductBody'
- export default {
- data () {
- return {
- list: [],
- indicatorArray: [],
- currentIndex: 0
- }
- },
- components: { IndexProductBody },
- created () {
- },
- computed: {
- ...mapState({
- commendList: state => state.goodsdetail.commendList,
- currentProductId: state => state.goodsdetail.currentProductId
- })
- },
- methods: {
- }
- }
- </script>
- <style lang="scss" scoped>
- .ui-recommend-wrapper {
- background: #ffffff;
- margin-bottom:$pageSpace;
- .product-list-body{
- display: flex; flex-wrap: wrap;background: #fff;padding-right: $pageSpace;
- .product-item{width:50%;}
- }
- .title{text-align: center;position:relative;font-size:$mainFontSize;color:#000;font-weight:700;padding-top:.5rem;padding-bottom:1rem;}
- }
- </style>
|