|
@@ -17,35 +17,71 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</van-sticky>
|
|
</van-sticky>
|
|
|
- <div
|
|
|
|
|
- class="explore_content"
|
|
|
|
|
- :class="
|
|
|
|
|
- (currentRecommendationList.length < 3 && hotCollectionList.length == 0) ||
|
|
|
|
|
- (currentRecommendationList.length == 0 && hotCollectionList.length < 3)
|
|
|
|
|
- ? 'shop_list_one'
|
|
|
|
|
- : ''
|
|
|
|
|
- "
|
|
|
|
|
- >
|
|
|
|
|
- <!-- 商品展示 -->
|
|
|
|
|
- <div class="commodity_display">
|
|
|
|
|
- <!-- <van-swipe :loop="false" :width="94" :height="90" :show-indicators="false">
|
|
|
|
|
|
|
+ <!-- 商品展示 -->
|
|
|
|
|
+ <div class="commodity_display">
|
|
|
|
|
+ <!-- <van-swipe :loop="false" :width="94" :height="90" :show-indicators="false">
|
|
|
<van-swipe-item v-for="(item, index) in commodityDisplayList" :key="index">
|
|
<van-swipe-item v-for="(item, index) in commodityDisplayList" :key="index">
|
|
|
<van-image width="94px" height="90px" :src="getImg(item.pic)" fit="cover" />
|
|
<van-image width="94px" height="90px" :src="getImg(item.pic)" fit="cover" />
|
|
|
</van-swipe-item>
|
|
</van-swipe-item>
|
|
|
</van-swipe> -->
|
|
</van-swipe> -->
|
|
|
- <swiper v-if="commodityDisplayList.length > 0" slides-per-view="auto">
|
|
|
|
|
- <swiper-slide
|
|
|
|
|
- class="setting"
|
|
|
|
|
- v-for="item in commodityDisplayList"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- style="width: 94px"
|
|
|
|
|
- >
|
|
|
|
|
- <van-image width="94px" height="90px" radius="8" :src="getImg(item.pic)" fit="cover" @click="goNext(item)"/>
|
|
|
|
|
- </swiper-slide>
|
|
|
|
|
- </swiper>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <swiper v-if="commodityDisplayList.length > 0" slides-per-view="auto">
|
|
|
|
|
+ <swiper-slide class="setting" v-for="item in commodityDisplayList" :key="item.id" style="width: 64px">
|
|
|
|
|
+ <van-image
|
|
|
|
|
+ width="64px"
|
|
|
|
|
+ height="64px"
|
|
|
|
|
+ radius="33"
|
|
|
|
|
+ :src="getImg(item.pic)"
|
|
|
|
|
+ fit="cover"
|
|
|
|
|
+ @click="goNext(item)"
|
|
|
|
|
+ />
|
|
|
|
|
+ <div class="setting_title">{{item.name}}</div>
|
|
|
|
|
+ </swiper-slide>
|
|
|
|
|
+ </swiper>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="explore_content"
|
|
|
|
|
+ >
|
|
|
|
|
+ <van-tabs
|
|
|
|
|
+ v-model:active="sort"
|
|
|
|
|
+ :ellipsis="false"
|
|
|
|
|
+ line-width="16"
|
|
|
|
|
+ line-height="2"
|
|
|
|
|
+ @click-tab="changeTab"
|
|
|
|
|
+ :class="{ trans: source == 'TRANSFER' }"
|
|
|
|
|
+ >
|
|
|
|
|
+ <van-tab
|
|
|
|
|
+ :title="item.label"
|
|
|
|
|
+ :name="item.value"
|
|
|
|
|
+ :title-class="item.type === 'select' && sortDes ? sortDes : ''"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ :lazy-render="false"
|
|
|
|
|
+ v-for="(item, index) in selectOptions"
|
|
|
|
|
+ >
|
|
|
|
|
+ <!-- <template v-if="item.type === 'sales'" #title>
|
|
|
|
|
+ <div class="tab">
|
|
|
|
|
+ <span>{{ item.label }}</span>
|
|
|
|
|
+ <van-icon size="8" name="arrow-up" />
|
|
|
|
|
+ <van-icon size="8" name="arrow-down" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template> -->
|
|
|
|
|
+ <template v-if="item.type === 'select'" #title>
|
|
|
|
|
+ <div class="tab">
|
|
|
|
|
+ <span>{{ item.label }}</span>
|
|
|
|
|
+ <van-icon size="8" name="arrow-up" />
|
|
|
|
|
+ <van-icon size="8" name="arrow-down" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-if="item.type === 'views'" #title2>
|
|
|
|
|
+ <div class="tab">
|
|
|
|
|
+ <span>{{ item.label }}</span>
|
|
|
|
|
+ <van-icon size="8" name="arrow-up" />
|
|
|
|
|
+ <van-icon size="8" name="arrow-down" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </van-tab>
|
|
|
|
|
+ </van-tabs>
|
|
|
<!-- banner图展示 -->
|
|
<!-- banner图展示 -->
|
|
|
- <div class="banner">
|
|
|
|
|
|
|
+ <!-- <div class="banner">
|
|
|
<div class="banner_con" v-for="(item, index) in bannerList" :key="index" @click="showJump(index)">
|
|
<div class="banner_con" v-for="(item, index) in bannerList" :key="index" @click="showJump(index)">
|
|
|
<img :src="item.img" alt="" class="banner_con_img" />
|
|
<img :src="item.img" alt="" class="banner_con_img" />
|
|
|
<div class="banner_con_title">
|
|
<div class="banner_con_title">
|
|
@@ -53,22 +89,24 @@
|
|
|
<div class="banner_con_titletwo">{{ item.titletwo }}</div>
|
|
<div class="banner_con_titletwo">{{ item.titletwo }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
<div class="content_list">
|
|
<div class="content_list">
|
|
|
<!-- 本期推荐 -->
|
|
<!-- 本期推荐 -->
|
|
|
- <page-title
|
|
|
|
|
|
|
+ <!-- <page-title
|
|
|
title="本期推荐"
|
|
title="本期推荐"
|
|
|
:to="{ path: '/productList', query: { type: 'DEFAULT', title: '本期推荐' } }"
|
|
:to="{ path: '/productList', query: { type: 'DEFAULT', title: '本期推荐' } }"
|
|
|
>
|
|
>
|
|
|
- </page-title>
|
|
|
|
|
- <div class="current_recommendation">
|
|
|
|
|
- <template v-for="(item, index) in currentRecommendationList" :key="item.id">
|
|
|
|
|
- <CollectionList v-model:info="currentRecommendationList[index]"></CollectionList
|
|
|
|
|
- ></template>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ </page-title> -->
|
|
|
|
|
+ <van-list v-model:loading="loading" :finished="finished" finished-text="" @load="getData">
|
|
|
|
|
+ <div class="current_recommendation">
|
|
|
|
|
+ <template v-for="(item, index) in list" :key="item.id">
|
|
|
|
|
+ <CollectionList v-model:info="list[index]"></CollectionList
|
|
|
|
|
+ ></template>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </van-list>
|
|
|
<!-- <List :dataList="currentRecommendationList"></List> -->
|
|
<!-- <List :dataList="currentRecommendationList"></List> -->
|
|
|
<!-- 最HOT收藏品 -->
|
|
<!-- 最HOT收藏品 -->
|
|
|
- <page-title
|
|
|
|
|
|
|
+ <!-- <page-title
|
|
|
title="最HOT收藏品"
|
|
title="最HOT收藏品"
|
|
|
:to="{ path: '/productList', query: { type: 'DEFAULT', title: '最HOT收藏品' } }"
|
|
:to="{ path: '/productList', query: { type: 'DEFAULT', title: '最HOT收藏品' } }"
|
|
|
>
|
|
>
|
|
@@ -77,7 +115,7 @@
|
|
|
<template v-for="(item, index) in hotCollectionList" :key="item.id">
|
|
<template v-for="(item, index) in hotCollectionList" :key="item.id">
|
|
|
<CollectionList v-model:info="hotCollectionList[index]"></CollectionList
|
|
<CollectionList v-model:info="hotCollectionList[index]"></CollectionList
|
|
|
></template>
|
|
></template>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</van-pull-refresh>
|
|
</van-pull-refresh>
|
|
@@ -103,11 +141,12 @@ import 'swiper/swiper-bundle.min.css';
|
|
|
import product from '../mixins/product';
|
|
import product from '../mixins/product';
|
|
|
import CollectionList from '../components/CollectionList.vue';
|
|
import CollectionList from '../components/CollectionList.vue';
|
|
|
import banner from '../mixins/banner';
|
|
import banner from '../mixins/banner';
|
|
|
|
|
+import list from '../mixins/list';
|
|
|
// import TopNavigation from "../components/TopNavigation.vue"
|
|
// import TopNavigation from "../components/TopNavigation.vue"
|
|
|
export default {
|
|
export default {
|
|
|
// name: 'discover',
|
|
// name: 'discover',
|
|
|
// inject: ['bar', 'setKeeps', 'scrollWrapper', 'changeScroll'],
|
|
// inject: ['bar', 'setKeeps', 'scrollWrapper', 'changeScroll'],
|
|
|
- mixins: [product,banner],
|
|
|
|
|
|
|
+ mixins: [product, banner, list],
|
|
|
components: {
|
|
components: {
|
|
|
CollectionList,
|
|
CollectionList,
|
|
|
Swiper,
|
|
Swiper,
|
|
@@ -128,19 +167,45 @@ export default {
|
|
|
img: require('@assets/icon-jingxuan.png'),
|
|
img: require('@assets/icon-jingxuan.png'),
|
|
|
titleone: '精选推荐',
|
|
titleone: '精选推荐',
|
|
|
titletwo: '介绍介绍介绍介绍'
|
|
titletwo: '介绍介绍介绍介绍'
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
// {
|
|
// {
|
|
|
// img: require('@assets/icon-zhanlan.png'),
|
|
// img: require('@assets/icon-zhanlan.png'),
|
|
|
// titleone: '藏品展览',
|
|
// titleone: '藏品展览',
|
|
|
// titletwo: '介绍介绍介绍介绍'
|
|
// titletwo: '介绍介绍介绍介绍'
|
|
|
// }
|
|
// }
|
|
|
],
|
|
],
|
|
|
|
|
+ selectOptions: [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '全部',
|
|
|
|
|
+ value: 'id,desc'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '最新',
|
|
|
|
|
+ value: 'createdAt,desc'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '销量',
|
|
|
|
|
+ value: 'likes,desc',
|
|
|
|
|
+ type: 'select'
|
|
|
|
|
+ },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // label: '价格',
|
|
|
|
|
+ // value: 'price',
|
|
|
|
|
+ // type: 'select'
|
|
|
|
|
+ // },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '浏览量',
|
|
|
|
|
+ value: 'view,desc',
|
|
|
|
|
+ type: 'views'
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
// 商品展示列表
|
|
// 商品展示列表
|
|
|
commodityDisplayList: [],
|
|
commodityDisplayList: [],
|
|
|
// 本期推荐列表
|
|
// 本期推荐列表
|
|
|
- currentRecommendationList: [],
|
|
|
|
|
|
|
+ list: [],
|
|
|
// 最HOT收藏品
|
|
// 最HOT收藏品
|
|
|
- hotCollectionList: []
|
|
|
|
|
|
|
+ hotCollectionList: [],
|
|
|
|
|
+ url: '/collection/all'
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
@@ -167,6 +232,32 @@ export default {
|
|
|
// let currentRecommendationList = this.currentRecommendationList
|
|
// let currentRecommendationList = this.currentRecommendationList
|
|
|
// currentRecommendationList[index].liked = !currentRecommendationList[index].liked
|
|
// currentRecommendationList[index].liked = !currentRecommendationList[index].liked
|
|
|
// },
|
|
// },
|
|
|
|
|
+ changeTab(info) {
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ if (info.name === 'price') {
|
|
|
|
|
+ this.sortDes = this.sortDes == 'desc' ? 'asc' : 'desc';
|
|
|
|
|
+ }
|
|
|
|
|
+ this.getData(true);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeData() {
|
|
|
|
|
+ let sort = this.sort;
|
|
|
|
|
+ if (sort == 'price') {
|
|
|
|
|
+ sort = 'price,' + this.sortDes;
|
|
|
|
|
+ }
|
|
|
|
|
+ return {
|
|
|
|
|
+ query: {
|
|
|
|
|
+ onShelf: true,
|
|
|
|
|
+ type: this.type,
|
|
|
|
|
+ source: this.source,
|
|
|
|
|
+ minterId: this.minterId,
|
|
|
|
|
+ del: false,
|
|
|
|
|
+ salable: this.salable
|
|
|
|
|
+ },
|
|
|
|
|
+ search: this.search,
|
|
|
|
|
+ sort: this.sort === 'id,desc' ? this.sortOptions[this.title] || sort : sort
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
// 精品推荐跳转
|
|
// 精品推荐跳转
|
|
|
showJump(index) {
|
|
showJump(index) {
|
|
|
if (index == 0) {
|
|
if (index == 0) {
|
|
@@ -196,7 +287,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
// 获取本期推荐的列表
|
|
// 获取本期推荐的列表
|
|
|
- getProduct(type = '', sort = 'sort,desc', size = 4) {
|
|
|
|
|
|
|
+ getProduct(type = '', sort = 'sort,desc', size = 8) {
|
|
|
let page = this.page;
|
|
let page = this.page;
|
|
|
return this.$http
|
|
return this.$http
|
|
|
.post(
|
|
.post(
|
|
@@ -387,31 +478,32 @@ export default {
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
|
-.shop_list_one {
|
|
|
|
|
- height: 100%;
|
|
|
|
|
- position: absolute;
|
|
|
|
|
|
|
+.scroll-wrapper{
|
|
|
|
|
+ background: #191D27 !important;
|
|
|
}
|
|
}
|
|
|
-.discover{
|
|
|
|
|
- background: #0f0f27;
|
|
|
|
|
|
|
+.discover {
|
|
|
|
|
+ background: #191D27;
|
|
|
}
|
|
}
|
|
|
.search_con {
|
|
.search_con {
|
|
|
- padding: 12px 16px 24px 16px;
|
|
|
|
|
|
|
+ padding: 9px 15px 20px 15px;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
- background: #0f0f27;
|
|
|
|
|
|
|
+ background: #191D27;
|
|
|
|
|
+ // background: #191D27;
|
|
|
.search {
|
|
.search {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- height: 32px;
|
|
|
|
|
- background: #29293f;
|
|
|
|
|
|
|
+ height: 38px;
|
|
|
|
|
+ background: #1e222c;
|
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
|
- padding: 5px 0 4px 33px;
|
|
|
|
|
|
|
+ padding: 7px 0 7px 35px;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
|
|
+ line-height: 24px;
|
|
|
.search_img {
|
|
.search_img {
|
|
|
- width: 16px;
|
|
|
|
|
- height: 16px;
|
|
|
|
|
|
|
+ width: 20px;
|
|
|
|
|
+ height: 20px;
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
left: 10px;
|
|
left: 10px;
|
|
|
- top: 6px;
|
|
|
|
|
|
|
+ top: 9px;
|
|
|
}
|
|
}
|
|
|
.search_text {
|
|
.search_text {
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
@@ -422,8 +514,23 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.setting {
|
|
.setting {
|
|
|
- height: 90px;
|
|
|
|
|
- margin-right: 16px;
|
|
|
|
|
|
|
+ height: 94px;
|
|
|
|
|
+ margin-right: 24px;
|
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
|
+ .setting_title {
|
|
|
|
|
+ width: 64px;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ margin-top: 10px;
|
|
|
|
|
+ height: 20px;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-family: PingFangSC-Regular, PingFang SC;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ line-height: 20px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
.setting:last-child {
|
|
.setting:last-child {
|
|
|
margin-right: 0px;
|
|
margin-right: 0px;
|
|
@@ -434,10 +541,14 @@ export default {
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
|
}
|
|
}
|
|
|
|
|
+.commodity_display {
|
|
|
|
|
+ padding-left: 15px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+}
|
|
|
.explore_content {
|
|
.explore_content {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- background: #0f0f27;
|
|
|
|
|
- padding: 0px 16px 16px 16px;
|
|
|
|
|
|
|
+ background: #191D27;
|
|
|
|
|
+ padding: 0px 15px 15px 15px;
|
|
|
// margin-top: 44px;
|
|
// margin-top: 44px;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
/deep/ .van-cell__title span {
|
|
/deep/ .van-cell__title span {
|
|
@@ -450,23 +561,64 @@ export default {
|
|
|
/deep/ .van-swipe__track {
|
|
/deep/ .van-swipe__track {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
}
|
|
}
|
|
|
- .commodity_display {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- margin-bottom: 24px;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- .van-swipe {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- }
|
|
|
|
|
- .van-swipe-item {
|
|
|
|
|
- margin-right: 16px;
|
|
|
|
|
|
|
+ // .commodity_display {
|
|
|
|
|
+ // width: 100%;
|
|
|
|
|
+ // margin-bottom: 24px;
|
|
|
|
|
+ // display: flex;
|
|
|
|
|
+ // .van-swipe {
|
|
|
|
|
+ // width: 100%;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // .van-swipe-item {
|
|
|
|
|
+ // margin-right: 16px;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // .commodity_display_img {
|
|
|
|
|
+ // width: 94px;
|
|
|
|
|
+ // height: 90px;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // .commodity_display_img:last-of-type{
|
|
|
|
|
+ // margin-right: 50px;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ /deep/ .van-tabs--line .van-tabs__wrap {
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ margin-bottom: 8px;
|
|
|
|
|
+ .van-tab--active{
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ color: #F2D5B2 !important;
|
|
|
}
|
|
}
|
|
|
- .commodity_display_img {
|
|
|
|
|
- width: 94px;
|
|
|
|
|
- height: 90px;
|
|
|
|
|
|
|
+ .van-tab {
|
|
|
|
|
+ margin-right: 32px;
|
|
|
|
|
+ // width: 20%;
|
|
|
|
|
+ flex: 1 !important;
|
|
|
}
|
|
}
|
|
|
- // .commodity_display_img:last-of-type{
|
|
|
|
|
- // margin-right: 50px;
|
|
|
|
|
|
|
+ // .van-tab:nth-of-type(4){
|
|
|
|
|
+ // margin-right: 0px;
|
|
|
// }
|
|
// }
|
|
|
|
|
+ .tab {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ padding-right: 14px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ .van-icon {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ right: 0;
|
|
|
|
|
+
|
|
|
|
|
+ &.van-icon-arrow-down {
|
|
|
|
|
+ top: 8px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ &.van-icon-arrow-up {
|
|
|
|
|
+ bottom: 8px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ /deep/ .van-tabs__nav--line.van-tabs__nav--complete {
|
|
|
|
|
+ padding: 0 !important;
|
|
|
|
|
+ border: none !important;
|
|
|
|
|
+ }
|
|
|
|
|
+ /deep/ .van-tabs__line {
|
|
|
|
|
+ width: 0px !important;
|
|
|
|
|
+ height: 0px !important;
|
|
|
}
|
|
}
|
|
|
.banner {
|
|
.banner {
|
|
|
width: 100%;
|
|
width: 100%;
|