From 20a26aa0c12c05c3f96afc163c6532c6b1b5cf8e Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期四, 21 三月 2024 09:24:01 +0800
Subject: [PATCH] Merge refs/remotes/origin/master into refs/heads/master

---
 pages/bookServices/assort/index.js |   59 ++++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 38 insertions(+), 21 deletions(-)

diff --git a/pages/bookServices/assort/index.js b/pages/bookServices/assort/index.js
index 78224d0..e8f86b1 100644
--- a/pages/bookServices/assort/index.js
+++ b/pages/bookServices/assort/index.js
@@ -6,14 +6,20 @@
    * 椤甸潰鐨勫垵濮嬫暟鎹�
    */
   data: {
+    placeholderstyle: 'font-size:28rpx',
     assortList: [],
     assortCheck: {
       name: '',
       code: '',
     },
     startList: [],
-    startCheck: '',
+
+    startCheck: {
+      id: '',
+      code: ''
+    },
     bookList: [],
+    loading: false,
     listLoding: false,
   },
 
@@ -21,8 +27,7 @@
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
   onLoad(options) {
-    // this.getAssortList()
-    console.log(options);
+    this.getAssortList();
   },
 
   /**
@@ -34,7 +39,6 @@
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
    */
   onShow() {
-    this.getAssortList();
   },
 
   /**
@@ -64,6 +68,9 @@
 
   // 鑾峰彇渚ц竟鏍忓垪琛�
   getAssortList() {
+    this.setData({
+      loading: true
+    })
     const query = {
       path: '*',
       filterList: [
@@ -83,6 +90,7 @@
       const list = res.datas.filter((item) => item.refCode != 'jsek_homepageBookService');
       this.setData({
         assortList: list,
+        loading: false
       });
       this.setData({
         assortCheck: {
@@ -94,14 +102,14 @@
     });
   },
   // 渚ц竟鏍忓垏鎹�
-  changeAssort(data) {
+  changeAssort(e) {
     this.setData({
       assortCheck: {
-        name: data.detail.label,
-        code: data.detail.value,
+        name: e.detail.label,
+        code: e.detail.value,
       },
     });
-    this.getStairList(data.detail.value);
+    this.getStairList(e.detail.value);
   },
   // 鑾峰彇涓�绾у垎绫�
   getStairList(path) {
@@ -110,7 +118,12 @@
     });
     const query = {
       path,
-      filterList: [],
+      filterList: [
+        {
+          value: 'Normal',
+          field: 'state'
+        }
+      ],
       queryType: '\\',
       searchList: [],
       size: '30',
@@ -119,23 +132,20 @@
       sort: { type: 'Asc', field: 'LinkOrder' },
     };
     app.MG.store.getStoreChannelList(query).then(async (res) => {
-      // 涓�绾у垎绫婚�変腑
-      // this.setData({
-      //   startCheck: res.datas[0].refCode,
-      // });
       // 鑾峰彇浜岀骇鍒嗙被
       for (let index = 0; index < res.datas.length; index++) {
         const item = res.datas[index];
         item.icon ? item.icon = getPublicImage(item.icon, 58, 72) : item.icon = item.icon
         item.children = await this.getSecondList(item);
       }
+      console.log(res.datas);
       // 涓�绾у垎绫昏祴鍊�
       this.setData({
         startList: res.datas,
+        listLoding: false,
+        'startCheck.id': res.datas[0].id,
+        'startCheck..code': ''
       });
-    });
-    this.setData({
-      listLoding: false,
     });
   },
 
@@ -145,7 +155,12 @@
     let datas;
     const query = {
       path,
-      filterList: [],
+      filterList: [
+        {
+          value: 'Normal',
+          field: 'state'
+        }
+      ],
       queryType: '\\',
       searchList: [],
       size: '30',
@@ -167,7 +182,8 @@
   tabClick(e) {
     const data = e.currentTarget.dataset.tabdata;
     this.setData({
-      startCheck: data.refCode,
+      'startCheck.id': data.id,
+      'startCheck.code': data.refCode,
     });
     console.log(data);
   },
@@ -176,12 +192,13 @@
     const tab = e.currentTarget.dataset.tabdata
     const stair = e.currentTarget.dataset.stair
     this.setData({
-      startCheck: tab.refCode
+      'startCheck.id': tab.id,
+      'startCheck.code': tab.refCode
     })
     if (stair) {
       const secondCode = `${stair.pathLinks[0].linkPath}\\${stair.id}`;
       wx.navigateTo({
-        url: `/packageBookService/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck}&secondCode=${secondCode}`,
+        url: `/packageBookService/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck.code}&secondCode=${secondCode}`,
       });
     } else {
       wx.navigateTo({
@@ -192,7 +209,7 @@
   },
   navToSearchPage(e) {
     wx.navigateTo({
-      url: `/packageBookService/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck}&searchValue=${e.detail.value}`,
+      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}`,
     });
   },
 });

--
Gitblit v1.9.1