diff --git a/pages/demand-center/accept-demand-center.vue b/pages/demand-center/accept-demand-center.vue index 14f1afd..8ebee7e 100644 --- a/pages/demand-center/accept-demand-center.vue +++ b/pages/demand-center/accept-demand-center.vue @@ -362,21 +362,31 @@ this[this.taskConditions[index].action](); }, async loadCategoryList(idArr) { - let typeList = await this.$request.listByStep(); + let typeList = await this.$request.listByStep({ + type: 1 + }); typeList = typeList.data; let col1Id = idArr ? idArr[0] : typeList[0].goodsCategoryId; let subTypeList = await this.$request.listByStep({ + type: 1, goodsCategoryId: col1Id }); subTypeList = subTypeList.data; let col2Id = idArr ? idArr[1] : subTypeList[0].goodsCategoryId; let subSubTypeList = await this.$request.listByStep({ + type: 1, goodsCategoryId: col2Id }); subSubTypeList = subSubTypeList.data; - this.categoryList.push(typeList); + let col3Id = idArr ? idArr[2] : subSubTypeList[0].goodsCategoryId; + let thirdTypeList = await this.$request.listByStep({ + type: 1, + goodsCategoryId: col3Id + }); + thirdTypeList = thirdTypeList.data; this.categoryList.push(subTypeList); this.categoryList.push(subSubTypeList); + this.categoryList.push(thirdTypeList); }, async loadRegionList() { let regionList = await this.$request.areaListByStep(); @@ -462,13 +472,18 @@ if (colObj.column == 0) { // 通过一级查询二级 let subTypeList = await this.$request.listByStep({ + type: 1, goodsCategoryId: this.categoryList[0][colObj.value].goodsCategoryId }); subTypeList = subTypeList.data; - let subSubTypeList = await this.$request.listByStep({ - goodsCategoryId: subTypeList[0].goodsCategoryId - }); - subSubTypeList = subSubTypeList.data; + let subSubTypeList = []; + if (subTypeList && subTypeList.length) { + subSubTypeList = await this.$request.listByStep({ + type: 1, + goodsCategoryId: subTypeList[0].goodsCategoryId + }); + subSubTypeList = subSubTypeList.data; + } this.categoryList.pop(); this.categoryList.pop(); this.categoryList.push(subTypeList); @@ -477,6 +492,7 @@ } else if (colObj.column == 1) { // 通过二级查三级 let subSubTypeList = await this.$request.listByStep({ + type: 1, goodsCategoryId: this.categoryList[1][colObj.value].goodsCategoryId }); subSubTypeList = subSubTypeList.data; diff --git a/pages/my/certification.vue b/pages/my/certification.vue index eee3e3f..8e0cf78 100644 --- a/pages/my/certification.vue +++ b/pages/my/certification.vue @@ -509,8 +509,15 @@ // this.servSpecialSkills = res.data; // }, async loadSpecialSkillType() { - let res = await this.$request.listByStep(); - this.specialTypeList = res.data; + let res = await this.$request.listByStep({ + type: 1 + }); + res = res.data; + let typeList = await this.$request.listByStep({ + type: 1, + goodsCategoryId: res[0].goodsCategoryId + }); + this.specialTypeList = typeList.data; }, async chooseSpecialSkill(e, type, index) { let funName = "listByStep"; @@ -518,7 +525,8 @@ funName = "qrySpecialSkillList"; } let res = await this.$request[funName]({ - goodsCategoryId: e.goodsCategoryId + goodsCategoryId: e.goodsCategoryId, + type: 1 }); if (res.code == 0) { switch (type) { diff --git a/pages/my/master-occupancy.vue b/pages/my/master-occupancy.vue index 6c5b710..afeef81 100644 --- a/pages/my/master-occupancy.vue +++ b/pages/my/master-occupancy.vue @@ -318,12 +318,20 @@ /* 服务区域 end */ /* 服务技能 start */ async loadTypeList() { - let res = await this.$request.listByStep(); - this.typeList = res.data; + let res = await this.$request.listByStep({ + type: 1 + }); + res = res.data; + let typeList = await this.$request.listByStep({ + type: 1, + goodsCategoryId: res[0].goodsCategoryId + }); + this.typeList = typeList.data; }, async chooseType(e, type, index) { let res = await this.$request.listByStep({ - goodsCategoryId: e.goodsCategoryId + goodsCategoryId: e.goodsCategoryId, + type: 1 }); if (res.code == 0) { switch (type) { @@ -364,8 +372,15 @@ /* 服务技能 end */ /* 特殊技能 start */ async loadSpecialSkill() { - let res = await this.$request.listByStep(); - this.specialTypeList = res.data; + let res = await this.$request.listByStep({ + type: 1 + }); + res = res.data; + let typeList = await this.$request.listByStep({ + type: 1, + goodsCategoryId: res[0].goodsCategoryId + }); + this.specialTypeList = typeList.data; }, async chooseSpecialSkill(e, type, index) { let funName = "listByStep"; @@ -373,7 +388,8 @@ funName = "qrySpecialSkillList"; } let res = await this.$request[funName]({ - goodsCategoryId: e.goodsCategoryId + goodsCategoryId: e.goodsCategoryId, + type: 1 }); if (res.code == 0) { switch (type) { diff --git a/pages/my/new-serv.vue b/pages/my/new-serv.vue index c4b53a3..5e8928d 100644 --- a/pages/my/new-serv.vue +++ b/pages/my/new-serv.vue @@ -21,7 +21,7 @@ @@ -278,7 +278,7 @@ cropHeight: 0, curImgListField: '', categoryList: [], - categoryMultiIndex: [0, 0], + categoryMultiIndex: [0, 0, 0], regionList: [], regionMultiIndex: [0, 0], isShowAllSpecs: false, @@ -372,10 +372,17 @@ type: 1, goodsCategoryId: col2Id }); - subSubTypeList = subSubTypeList.data; + subSubTypeList = subSubTypeList.data; + let col3Id = idArr ? idArr[2] : subSubTypeList[0].goodsCategoryId; + let thirdTypeList = await this.$request.listByStep({ + type: 1, + goodsCategoryId: col3Id + }); + thirdTypeList = thirdTypeList.data; // this.categoryList.push(typeList); this.categoryList.push(subTypeList); - this.categoryList.push(subSubTypeList); + this.categoryList.push(subSubTypeList); + this.categoryList.push(thirdTypeList); }, async loadRegionList() { let regionList = await this.$request.areaListByStep(); @@ -407,34 +414,36 @@ }, async categoryColChange(e) { let colObj = e.detail; - // if (colObj.column == 0) { - // // 通过一级查询二级,通过二级查三级 - // let subTypeList = await this.$request.listByStep({ - // type: 1, - // goodsCategoryId: this.categoryList[0][colObj.value].goodsCategoryId - // }); - // subTypeList = subTypeList.data; - // let subSubTypeList = await this.$request.listByStep({ - // type: 1, - // goodsCategoryId: subTypeList[0].goodsCategoryId - // }); - // subSubTypeList = subSubTypeList.data; - // this.categoryList.pop(); - // this.categoryList.pop(); - // this.categoryList.push(subTypeList); - // this.categoryList.push(subSubTypeList); - // this.categoryMultiIndex = [colObj.value, 0, 0]; - // } else if (colObj.column == 0) { + // 通过一级查询二级,通过二级查三级 + let subTypeList = await this.$request.listByStep({ + type: 1, + goodsCategoryId: this.categoryList[0][colObj.value].goodsCategoryId + }); + subTypeList = subTypeList.data; + let subSubTypeList = []; + if (subTypeList && subTypeList.length) { + subSubTypeList = await this.$request.listByStep({ + type: 1, + goodsCategoryId: subTypeList[0].goodsCategoryId + }); + subSubTypeList = subSubTypeList.data; + } + this.categoryList.pop(); + this.categoryList.pop(); + this.categoryList.push(subTypeList); + this.categoryList.push(subSubTypeList); + this.categoryMultiIndex = [colObj.value, 0, 0]; + } else if (colObj.column == 1) { // 通过二级查三级 let subSubTypeList = await this.$request.listByStep({ type: 1, - goodsCategoryId: this.categoryList[0][colObj.value].goodsCategoryId + goodsCategoryId: this.categoryList[1][colObj.value].goodsCategoryId }); subSubTypeList = subSubTypeList.data; this.categoryList.pop(); this.categoryList.push(subSubTypeList); - this.categoryMultiIndex = [colObj.value, 0]; + this.categoryMultiIndex = [this.categoryMultiIndex[0], colObj.value, 0]; } }, async regionChange(e) { @@ -641,10 +650,10 @@ return; } - let checkRes = await this.checkBankAndCertify(); - if (!checkRes) { - return; - } + // let checkRes = await this.checkBankAndCertify(); + // if (!checkRes) { + // return; + // } // 0是轮播图,1是详情图 let goodsImgsList = []; diff --git a/pages/order-manage/order-manage.vue b/pages/order-manage/order-manage.vue index a7e4ae6..6bc0d7e 100644 --- a/pages/order-manage/order-manage.vue +++ b/pages/order-manage/order-manage.vue @@ -427,21 +427,31 @@ } }, async loadCategoryList(idArr) { - let typeList = await this.$request.listByStep(); + let typeList = await this.$request.listByStep({ + type: 1 + }); typeList = typeList.data; let col1Id = idArr ? idArr[0] : typeList[0].goodsCategoryId; let subTypeList = await this.$request.listByStep({ + type: 1, goodsCategoryId: col1Id }); subTypeList = subTypeList.data; let col2Id = idArr ? idArr[1] : subTypeList[0].goodsCategoryId; let subSubTypeList = await this.$request.listByStep({ + type: 1, goodsCategoryId: col2Id }); subSubTypeList = subSubTypeList.data; - this.categoryList.push(typeList); + let col3Id = idArr ? idArr[2] : subSubTypeList[0].goodsCategoryId; + let thirdTypeList = await this.$request.listByStep({ + type: 1, + goodsCategoryId: col3Id + }); + thirdTypeList = thirdTypeList.data; this.categoryList.push(subTypeList); this.categoryList.push(subSubTypeList); + this.categoryList.push(thirdTypeList); }, async loadRegionList() { let regionList = await this.$request.areaListByStep(); @@ -518,13 +528,18 @@ if (colObj.column == 0) { // 通过一级查询二级 let subTypeList = await this.$request.listByStep({ + type: 1, goodsCategoryId: this.categoryList[0][colObj.value].goodsCategoryId }); subTypeList = subTypeList.data; - let subSubTypeList = await this.$request.listByStep({ - goodsCategoryId: subTypeList[0].goodsCategoryId - }); - subSubTypeList = subSubTypeList.data; + let subSubTypeList = []; + if (subTypeList && subTypeList.length) { + subSubTypeList = await this.$request.listByStep({ + type: 1, + goodsCategoryId: subTypeList[0].goodsCategoryId + }); + subSubTypeList = subSubTypeList.data; + } this.categoryList.pop(); this.categoryList.pop(); this.categoryList.push(subTypeList); @@ -533,6 +548,7 @@ } else if (colObj.column == 1) { // 通过二级查三级 let subSubTypeList = await this.$request.listByStep({ + type: 1, goodsCategoryId: this.categoryList[1][colObj.value].goodsCategoryId }); subSubTypeList = subSubTypeList.data;