vip换购列表更改及部分拼团功能融合
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { lists, classify } from "@/apis/interfaces/store"
|
||||
import { lists, categories } from "@/apis/interfaces/store"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -46,17 +46,21 @@
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$Route.query.title
|
||||
})
|
||||
if (this.$Route.query.id) {
|
||||
this.cid = this.$Route.query.id
|
||||
} else {
|
||||
this.getClassify();
|
||||
}
|
||||
this.getLists()
|
||||
this.getClassify()
|
||||
},
|
||||
methods:{
|
||||
// 商品列表
|
||||
getLists() {
|
||||
lists({
|
||||
category_id : this.$Route.query.id,
|
||||
category_cid: this.cid,
|
||||
let data = {
|
||||
category_id : this.cid,
|
||||
page : this.page
|
||||
}).then(res => {
|
||||
};
|
||||
lists(data).then(res => {
|
||||
if(res.page.current === 1){
|
||||
this.goodsArr = []
|
||||
}
|
||||
@@ -67,14 +71,15 @@
|
||||
},
|
||||
// 获取二级分类
|
||||
getClassify(){
|
||||
classify(this.$Route.query.id).then(res => {
|
||||
categories().then(res => {
|
||||
this.classify = this.classify.concat(res)
|
||||
})
|
||||
},
|
||||
// 二级分类筛选
|
||||
onTabs(e){
|
||||
this.goodsArr = []
|
||||
this.cid = e.category_id
|
||||
this.page = 1;
|
||||
this.goodsArr = [];
|
||||
this.cid = e.category_id;
|
||||
this.getLists()
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user