闫增涛
2025-03-31 04c7b0163caeae4ab1c5da62e301fa993101cfad
pages/personalCenter/index.js
@@ -170,6 +170,10 @@
          });
          this.getUserInfo()
          this.getIntegral()
        } else {
          wx.switchTab({
            url: '/pages/home/home',
          })
        }
      })
    } else {
@@ -258,6 +262,19 @@
        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(() => {