| | |
| | | }); |
| | | this.getUserInfo() |
| | | this.getIntegral() |
| | | } else { |
| | | wx.switchTab({ |
| | | url: '/pages/home/home', |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | this.setData({ |
| | | userInfo: defaultUser |
| | | }) |
| | | if (defaultUser?.role == 'Teacher') { |
| | | const data = [...this.data.menuData] |
| | | const list = data.filter(item => item.type != 'class') |
| | | this.setData({ |
| | | menuData: list |
| | | }) |
| | | } else { |
| | | const data = [...this.data.menuData] |
| | | const list = data.filter(item => item.type != 'course') |
| | | this.setData({ |
| | | menuData: list |
| | | }) |
| | | } |
| | | this.getTeacherInfo() |
| | | wx.setStorageSync(app.config.userInfoKey, JSON.stringify(this.data.userInfo)); |
| | | setTimeout(() => { |