| | |
| | | // pages/bookServices/assort/index.js |
| | | import { getPublicImage } from "../../../assets/js/middleGround/tool"; |
| | | import { |
| | | getPublicImage |
| | | } from "../../../assets/js/middleGround/tool"; |
| | | const app = getApp(); |
| | | Page({ |
| | | /** |
| | |
| | | }); |
| | | const query = { |
| | | path: "*", |
| | | filterList: [ |
| | | { |
| | | value: "Normal", |
| | | field: "state", |
| | | }, |
| | | ], |
| | | filterList: [{ |
| | | value: "Normal", |
| | | field: "state", |
| | | }, ], |
| | | queryType: "\\", |
| | | searchList: [], |
| | | size: "30", |
| | | start: "0", |
| | | storeRefCode: app.config.goodsStore, |
| | | sort: { type: "Asc", field: "LinkOrder" }, |
| | | sort: { |
| | | type: "Asc", |
| | | field: "LinkOrder" |
| | | }, |
| | | }; |
| | | app.MG.store.getStoreChannelList(query).then((res) => { |
| | | const list = res.datas.filter( |
| | |
| | | }); |
| | | const query = { |
| | | path, |
| | | filterList: [ |
| | | { |
| | | value: "Normal", |
| | | field: "state", |
| | | }, |
| | | ], |
| | | filterList: [{ |
| | | value: "Normal", |
| | | field: "state", |
| | | }, ], |
| | | queryType: "\\", |
| | | searchList: [], |
| | | size: "30", |
| | | start: "0", |
| | | storeRefCode: app.config.goodsStore, |
| | | sort: { type: "Asc", field: "LinkOrder" }, |
| | | sort: { |
| | | type: "Asc", |
| | | field: "LinkOrder" |
| | | }, |
| | | }; |
| | | app.MG.store.getStoreChannelList(query).then(async (res) => { |
| | | // 获取二级分类 |
| | | for (let index = 0; index < res.datas.length; index++) { |
| | | const item = res.datas[index]; |
| | | item.icon |
| | | ? (item.icon = getPublicImage(item.icon, 500)) |
| | | : (item.icon = item.icon); |
| | | item.icon ? |
| | | (item.icon = getPublicImage(item.icon, 500)) : |
| | | (item.icon = item.icon); |
| | | item.children = await this.getSecondList(item); |
| | | } |
| | | console.log(res.datas); |
| | | // 一级分类赋值 |
| | | this.setData({ |
| | | startList: res.datas, |
| | |
| | | let datas; |
| | | const query = { |
| | | path, |
| | | filterList: [ |
| | | { |
| | | value: "Normal", |
| | | field: "state", |
| | | }, |
| | | ], |
| | | filterList: [{ |
| | | value: "Normal", |
| | | field: "state", |
| | | }, ], |
| | | coverSize: { |
| | | width: 500, |
| | | }, |
| | |
| | | size: "30", |
| | | start: "0", |
| | | storeRefCode: app.config.goodsStore, |
| | | sort: { type: "Asc", field: "LinkOrder" }, |
| | | sort: { |
| | | type: "Asc", |
| | | field: "LinkOrder" |
| | | }, |
| | | }; |
| | | await app.MG.store.getStoreChannelList(query).then((res) => { |
| | | for (let index = 0; index < res.datas.length; index++) { |
| | |
| | | "startCheck.id": data.id, |
| | | "startCheck.code": data.refCode, |
| | | }); |
| | | console.log(data); |
| | | }, |
| | | // 跳转列表页 |
| | | goPageList(e) { |
| | |
| | | url: `/packageBookService/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck.code}&searchValue=${e.detail.value}`, |
| | | }); |
| | | }, |
| | | }); |
| | | }); |