1
zhangc
2025-03-24 5d62f0a16c8475aff2103f476fe827ec3e16046c
pages/home/menuHome.vue
@@ -90,12 +90,15 @@
               },
            ],
            menu: [],
            colorList: ['cyan','blue','purple','mauve','pink','brown','red','orange','yellow','olive','olive','grey' ]
         };
      },
      onShow() {
         this.baseUrl = uni.getStorageSync('baseUrl');
         this.token = uni.getStorageSync('token');
         this.menu = uni.getStorageSync('menu');
         // console.log(this.menu);
         this.getAuth()
         // this.backGroundRepeat()
      },
@@ -110,6 +113,27 @@
               this.elements2[k].color = this.colorList[i]
               i++
            }
         },
         getAuth2() {
            this.elements = []
            for (let i in this.menu) {
               this.getIcon(this.menu[i].title)
               this.elements.unshift({
                  title: this.menu[i].name,
                  name: this.menu[i].title,
                  color: this.colorList[i],
                  cuIcon: this.icon,
                  id: this.menu[i].id,
                  url: `${this.menu[i].code}`
               })
            }
            this.elements.push({
               title: '退出登录',
               name: 'logOut',
               color: 'grey',
               cuIcon: 'exit',
               url: '/login/logOut'
            })
         },
         getAuth() {
            let that = this
@@ -140,7 +164,6 @@
                           url: `${res.data[i].code}`
                        })
                     }
                     console.log(that.elements);
                     that.elements.push({
                        title: '退出登录',
                        name: 'logOut',