张延森 4 年前
父节点
当前提交
dad5f2063c
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4
    2
      src/pages/Index/BookDetail/index.vue

+ 4
- 2
src/pages/Index/BookDetail/index.vue 查看文件

106
   },
106
   },
107
   computed: {
107
   computed: {
108
     ...mapUserState({
108
     ...mapUserState({
109
-      UserInfo: x => x.UserInfo // 用户信息
109
+      UserInfo: x => x.UserInfo, // 用户信息
110
+      Student: x => x.UserInfo.student, // 用户信息
110
     })
111
     })
111
   },
112
   },
112
   components: {
113
   components: {
139
         this.GetArticleDetail({ urlData: { id: Taro.getCurrentInstance().router.params.id } }).then((res) => {
140
         this.GetArticleDetail({ urlData: { id: Taro.getCurrentInstance().router.params.id } }).then((res) => {
140
           this.ArticleInfo = res.data.data || {}
141
           this.ArticleInfo = res.data.data || {}
141
         })
142
         })
142
-        if (this.UserInfo.studentId === null || this.UserInfo.studentId === '') {
143
+
144
+        if (!this.Student?.studentId) {
143
           if (this.$refs.MainPage) {
145
           if (this.$refs.MainPage) {
144
             this.$refs.MainPage.ShowStudentIdPopup = true
146
             this.$refs.MainPage.ShowStudentIdPopup = true
145
           }
147
           }