Browse Source

修改查询

zs 1 year ago
parent
commit
0a6411e05e

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