vip换购列表更改及部分拼团功能融合

This commit is contained in:
2022-08-18 10:00:28 +08:00
parent 96ae56192c
commit 61f3dd8755
14 changed files with 1629 additions and 793 deletions

View File

@@ -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()
},