| | |
| | | }, |
| | | |
| | | ], |
| | | 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() |
| | | }, |
| | |
| | | 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 |
| | |
| | | url: `${res.data[i].code}` |
| | | }) |
| | | } |
| | | console.log(that.elements); |
| | | that.elements.push({ |
| | | title: '退出登录', |
| | | name: 'logOut', |