zs 2 tahun lalu
induk
melakukan
8c05ed5540
1 mengubah file dengan 2 tambahan dan 5 penghapusan
  1. 2 5
      pagesMy/teamCreate/index.js

+ 2 - 5
pagesMy/teamCreate/index.js

@@ -95,10 +95,7 @@ Page({
         // 成员
         // 成员
         res = await app.$api('user', 'GET', { status: '1', type: '0' })
         res = await app.$api('user', 'GET', { status: '1', type: '0' })
         if (res.errcode == '0') {
         if (res.errcode == '0') {
-            for (const val of res.data) {
-                val.checked = false
-                if (!val.name) val.name = '暂无';
-            }
+            for (const val of res.data) if (!val.name) val.name = '暂无';
             that.setData({ userList: res.data })
             that.setData({ userList: res.data })
         }
         }
     },
     },
@@ -115,9 +112,9 @@ Page({
                         for (const val of res.data.member) {
                         for (const val of res.data.member) {
                             for (const as of that.data.userList) {
                             for (const as of that.data.userList) {
                                 if (as._id == val) as.checked = true
                                 if (as._id == val) as.checked = true
-                                else as.checked = false
                             }
                             }
                         }
                         }
+                        console.log(that.data.userList);
                         that.setData({ imgList: res.data.logo, form: res.data })
                         that.setData({ imgList: res.data.logo, form: res.data })
                     } else {
                     } else {
                         wx.showToast({ title: `${res.errmsg}`, icon: 'none' });
                         wx.showToast({ title: `${res.errmsg}`, icon: 'none' });