1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <template>
- <view class="style-two dir-left-nowrap">
- <app-category-list
- @click="active"
- :list="list"
- v-if="list.length !== 0"
- :noSetHeight="setHeight+'rpx'"
- ></app-category-list>
- <scroll-view scroll-y class="right" :style="{height: `${setHeight}rpx`}" v-if="list.length > 0">
- <image class="advert_pic" @click="route_advert(list[activeIndex])" :src="list[activeIndex].advert_pic"
- v-if="list[activeIndex].advert_pic"></image>
- <view class="item" v-for="(it, key) in list[activeIndex].child" :key="key" @click="route_go(it.page_url)">
- <image :src="it.big_pic_url" class="big_pic_url"></image>
- </view>
- <view class="no-empty main-center" v-if="list[activeIndex].child.length === 0">
- <app-no-goods title="该分类下无相关内容哦~"></app-no-goods>
- </view>
- </scroll-view>
- <view class="no-empty main-center" v-else>
- <app-no-goods background="#f7f7f7" title="该分类下无相关内容哦~"></app-no-goods>
- </view>
- </view>
- </template>
- <script>
- import appCategoryList from '../../components/page-component/app-category-list/app-category-list.vue';
- import appNoGoods from '../../components/page-component/app-no-goods/app-no-goods.vue';
- export default {
- name: "style-two",
- props: [`list`, `activeIndex`, `setHeight`],
- components: {
- 'app-category-list': appCategoryList,
- 'app-no-goods': appNoGoods,
- },
- methods: {
- active(data) {
- this.$emit('active', data);
- },
- route_go(data) {
- uni.navigateTo({
- url: data
- })
- },
- route_advert(data) {
- this.$emit('route_advert', data);
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .right {
- width: #{524rpx};
- margin-left: #{22rpx};
- background-color: #ffffff;
- }
- .advert_pic {
- width: #{500rpx};
- height: #{184rpx};
- margin: #{20rpx} #{24rpx} #{20rpx} 0;
- }
- .item {
- margin-left: #{2rpx};
- height: #{158rpx};
- width: #{524rpx};
- margin-bottom: #{20rpx};
- }
- .big_pic_url {
- height: #{158rpx};
- width: #{524rpx};
- }
- .no-empty {
- width: 100%;
- margin-top: #{150upx};
- }
- </style>
|