Sfoglia il codice sorgente

Merge branch '联系人修改' into 测试

xiaohaizhao 1 anno fa
parent
commit
424c73c025
1 ha cambiato i file con 6 aggiunte e 3 eliminazioni
  1. 6 3
      packageA/contacts/modules/list/index.js

+ 6 - 3
packageA/contacts/modules/list/index.js

@@ -79,16 +79,19 @@ Component({
             content.groupname = this.data.groupname;
             content.sys_phonebookgroupid = this.data.sys_phonebookgroupid;
             if (this.data.classActions.length == 0) {
+                let templetList = wx.getStorageSync('templetList');
+                if (wx.getStorageSync('userMsg').usertype != 0) templetList = templetList.filter(v => v.templetname != '站点全部')
                 this.setData({
-                    classActions: wx.getStorageSync('templetList').map(v => {
+                    classActions: templetList.map(v => {
                         return {
                             name: v.templetname,
                             index: v.templetid
                         }
                     }),
-                    'navList[0].label': wx.getStorageSync('templetList')[0].templetname
+                    'navList[0].label': templetList[0].templetname
                 });
-                content.type = wx.getStorageSync('templetList')[0].templetid;
+                content.type = templetList[0].templetid;
+                console.log(" templetList[0].templetname", templetList)
                 this.selectComponent("#ListBox").setHeight(".head", this);
             }
             return new Promise((resolve) => {