|
@@ -51,7 +51,10 @@
|
|
|
</van-grid>
|
|
</van-grid>
|
|
|
|
|
|
|
|
<div class="box" v-if="box.length > 0">
|
|
<div class="box" v-if="box.length > 0">
|
|
|
- <page-title title="精选盲盒" :to="{ path: '/productList', query: { type: 'BLIND_BOX' } }"></page-title>
|
|
|
|
|
|
|
+ <page-title
|
|
|
|
|
+ title="精选盲盒"
|
|
|
|
|
+ :to="{ path: '/productList', query: { type: 'BLIND_BOX', title: '精选盲盒' } }"
|
|
|
|
|
+ ></page-title>
|
|
|
<!-- <div class="box-list"></div> -->
|
|
<!-- <div class="box-list"></div> -->
|
|
|
|
|
|
|
|
<swiper
|
|
<swiper
|
|
@@ -71,7 +74,7 @@
|
|
|
<div class="box" v-if="products.length > 0">
|
|
<div class="box" v-if="products.length > 0">
|
|
|
<page-title
|
|
<page-title
|
|
|
title="本期推荐"
|
|
title="本期推荐"
|
|
|
- :to="{ path: '/productList', query: { type: 'DEFAULT', source: 'OFFICIAL' } }"
|
|
|
|
|
|
|
+ :to="{ path: '/productList', query: { type: 'DEFAULT', title: '本期推荐' } }"
|
|
|
></page-title>
|
|
></page-title>
|
|
|
<div class="box-list">
|
|
<div class="box-list">
|
|
|
<template v-for="(item, index) in products" :key="item.id">
|
|
<template v-for="(item, index) in products" :key="item.id">
|
|
@@ -82,7 +85,7 @@
|
|
|
<div class="box" v-if="hots.length > 0">
|
|
<div class="box" v-if="hots.length > 0">
|
|
|
<page-title
|
|
<page-title
|
|
|
title="最HOT收藏品"
|
|
title="最HOT收藏品"
|
|
|
- :to="{ path: '/productList', query: { type: 'DEFAULT', source: 'OFFICIAL' } }"
|
|
|
|
|
|
|
+ :to="{ path: '/productList', query: { type: 'DEFAULT', source: 'TRANSFER', title: '最HOT收藏品' } }"
|
|
|
></page-title>
|
|
></page-title>
|
|
|
<div class="box-list">
|
|
<div class="box-list">
|
|
|
<template v-for="(item, index) in hots" :key="item.id">
|
|
<template v-for="(item, index) in hots" :key="item.id">
|
|
@@ -128,6 +131,7 @@ import SwiperCore, { Pagination, Autoplay } from 'swiper';
|
|
|
|
|
|
|
|
// install Swiper modules
|
|
// install Swiper modules
|
|
|
SwiperCore.use([Pagination, Autoplay]);
|
|
SwiperCore.use([Pagination, Autoplay]);
|
|
|
|
|
+import product from '../mixins/product';
|
|
|
|
|
|
|
|
import ProductInfo from '../components/product/productInfo.vue';
|
|
import ProductInfo from '../components/product/productInfo.vue';
|
|
|
import banner from '../mixins/banner';
|
|
import banner from '../mixins/banner';
|
|
@@ -136,7 +140,7 @@ import CreatorInfo from '../components/creator/CreatorInfo.vue';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'discover',
|
|
name: 'discover',
|
|
|
inject: ['bar'],
|
|
inject: ['bar'],
|
|
|
- mixins: [banner],
|
|
|
|
|
|
|
+ mixins: [banner, product],
|
|
|
components: {
|
|
components: {
|
|
|
Swiper,
|
|
Swiper,
|
|
|
SwiperSlide,
|
|
SwiperSlide,
|
|
@@ -168,29 +172,29 @@ export default {
|
|
|
forbidClick: true
|
|
forbidClick: true
|
|
|
});
|
|
});
|
|
|
this.getBanner();
|
|
this.getBanner();
|
|
|
- this.getProduct('BLIND_BOX', 'stock,desc;sort,desc').then(res => {
|
|
|
|
|
|
|
+ this.getProduct('BLIND_BOX', this.sortOptions['精选盲盒']).then(res => {
|
|
|
this.box = res;
|
|
this.box = res;
|
|
|
});
|
|
});
|
|
|
- this.getProduct('DEFAULT', 'likes,desc;sort,desc;createdAt,desc').then(res => {
|
|
|
|
|
|
|
+ this.getProduct('DEFAULT', this.sortOptions['最HOT收藏品'], 'TRANSFER', 4).then(res => {
|
|
|
this.hots = res;
|
|
this.hots = res;
|
|
|
});
|
|
});
|
|
|
- this.getProduct().then(res => {
|
|
|
|
|
|
|
+ this.getProduct('DEFAULT', this.sortOptions['本期推荐']).then(res => {
|
|
|
this.products = res;
|
|
this.products = res;
|
|
|
});
|
|
});
|
|
|
this.getMiner();
|
|
this.getMiner();
|
|
|
},
|
|
},
|
|
|
- getProduct(type = '', sort = 'sort,desc') {
|
|
|
|
|
|
|
+ getProduct(type = '', sort = 'sort,desc', source = 'OFFICIAL', size = 4) {
|
|
|
return this.$http
|
|
return this.$http
|
|
|
.post(
|
|
.post(
|
|
|
'/collection/all',
|
|
'/collection/all',
|
|
|
{
|
|
{
|
|
|
page: 0,
|
|
page: 0,
|
|
|
- size: 4,
|
|
|
|
|
|
|
+ size: size,
|
|
|
query: {
|
|
query: {
|
|
|
type: type,
|
|
type: type,
|
|
|
onShelf: true,
|
|
onShelf: true,
|
|
|
del: false,
|
|
del: false,
|
|
|
- source: 'OFFICIAL'
|
|
|
|
|
|
|
+ source: source
|
|
|
},
|
|
},
|
|
|
sort: sort
|
|
sort: sort
|
|
|
},
|
|
},
|
|
@@ -233,9 +237,9 @@ export default {
|
|
|
query: {
|
|
query: {
|
|
|
onShelf: true,
|
|
onShelf: true,
|
|
|
del: false,
|
|
del: false,
|
|
|
- source: 'OFFICIAL'
|
|
|
|
|
|
|
+ source: 'OFFICIAL,TRANSFER'
|
|
|
},
|
|
},
|
|
|
- sort: 'sort,desc'
|
|
|
|
|
|
|
+ sort: this.sortOptions['更多藏品']
|
|
|
},
|
|
},
|
|
|
{ body: 'json' }
|
|
{ body: 'json' }
|
|
|
)
|
|
)
|