瀏覽代碼

修改查询

zs 1 年之前
父節點
當前提交
0a6411e05e
共有 6 個文件被更改,包括 14 次插入8 次删除
  1. 2 1
      pagesHome/home/index.js
  2. 2 1
      pagesMatch/home/index.js
  3. 2 1
      pagesMy/apply/index.js
  4. 4 3
      pagesMy/match/index.js
  5. 2 1
      pagesMy/team/index.js
  6. 2 1
      pagesTeam/home/index.js

+ 2 - 1
pagesHome/home/index.js

@@ -31,7 +31,8 @@ Page({
     // 查询
     async toSearch(e) {
         const that = this;
-        that.setData({ 'searchInfo.name': e.detail.value })
+        if (e.detail.value) that.setData({ 'searchInfo.name': e.detail.value })
+        else that.setData({ searchInfo: {} })
         that.clearPage();
         that.search()
     },

+ 2 - 1
pagesMatch/home/index.js

@@ -51,7 +51,8 @@ Page({
     // 查询
     async toSearch(e) {
         const that = this;
-        that.setData({ 'searchInfo.name': e.detail.value })
+        if (e.detail.value) that.setData({ 'searchInfo.name': e.detail.value })
+        else that.setData({ searchInfo: {} })
         that.clearPage();
         that.search()
     },

+ 2 - 1
pagesMy/apply/index.js

@@ -54,7 +54,8 @@ Page({
     // 查询
     async toSearch(e) {
         const that = this;
-        that.setData({ 'searchInfo.apply_name': e.detail.value })
+        if (e.detail.value) that.setData({ 'searchInfo.name': e.detail.value })
+        else that.setData({ searchInfo: {} })
         that.clearPage();
         that.search()
     },

+ 4 - 3
pagesMy/match/index.js

@@ -14,7 +14,8 @@ Page({
     // 查询
     async toSearch(e) {
         const that = this;
-        that.setData({ 'searchInfo.name': e.detail.value })
+        if (e.detail.value) that.setData({ 'searchInfo.name': e.detail.value })
+        else that.setData({ searchInfo: {} })
         that.clearPage();
         that.search()
     },
@@ -38,8 +39,8 @@ Page({
         let item = e.currentTarget.dataset.item
         wx.navigateTo({ url: '/pagesMatch/enroll/index?id=' + item._id })
     },
-      // 分页-触底
-      toLower() {
+    // 分页-触底
+    toLower() {
         const that = this;
         let list = that.data.list;
         let limit = that.data.limit;

+ 2 - 1
pagesMy/team/index.js

@@ -14,7 +14,8 @@ Page({
     // 查询
     async toSearch(e) {
         const that = this;
-        that.setData({ 'searchInfo.name': e.detail.value })
+        if (e.detail.value) that.setData({ 'searchInfo.name': e.detail.value })
+        else that.setData({ searchInfo: {} })
         that.clearPage();
         that.search()
     },

+ 2 - 1
pagesTeam/home/index.js

@@ -21,7 +21,8 @@ Page({
     // 查询
     async toSearch(e) {
         const that = this;
-        that.setData({ 'searchInfo.name': e.detail.value })
+        if (e.detail.value) that.setData({ 'searchInfo.name': e.detail.value })
+        else that.setData({ searchInfo: {} })
         that.clearPage();
         that.search()
     },