zs 2 年之前
父节点
当前提交
8c05ed5540
共有 1 个文件被更改,包括 2 次插入5 次删除
  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' })
         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 })
         }
     },
@@ -115,9 +112,9 @@ Page({
                         for (const val of res.data.member) {
                             for (const as of that.data.userList) {
                                 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 })
                     } else {
                         wx.showToast({ title: `${res.errmsg}`, icon: 'none' });