|
|
@@ -161,7 +161,7 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getCreators();
|
|
|
- this.getProduct().then(res => {
|
|
|
+ this.getProduct('DEFAULT', 'likes,desc;sort,desc;createdAt,desc').then(res => {
|
|
|
this.products = res;
|
|
|
});
|
|
|
this.$http
|
|
|
@@ -225,7 +225,7 @@ export default {
|
|
|
this.showCreator = (this.showCreator + 1) % this.creators.length;
|
|
|
this.timer = setTimeout(this.autoChange, 3000);
|
|
|
},
|
|
|
- getProduct(type = 'DEFAULT') {
|
|
|
+ getProduct(type = '', sort = 'sort,desc') {
|
|
|
return this.$http
|
|
|
.post(
|
|
|
'/collection/all',
|
|
|
@@ -237,7 +237,7 @@ export default {
|
|
|
onShelf: true,
|
|
|
del: false
|
|
|
},
|
|
|
- sort: 'createdAt,desc'
|
|
|
+ sort: sort
|
|
|
},
|
|
|
{ body: 'json' }
|
|
|
)
|