Sfoglia il codice sorgente

修改实践中心拓展课程判断显示

11wqe1 6 mesi fa
parent
commit
7aef6c6043
1 ha cambiato i file con 9 aggiunte e 2 eliminazioni
  1. 9 2
      src/components/main/Practice.vue

+ 9 - 2
src/components/main/Practice.vue

@@ -29,7 +29,7 @@
 
       </div>
     </el-col>
-    <el-col :span="6">
+    <el-col :span="6" v-if="isLogin">
     <div class="grid-content" @click="openApplications('study')">
       <!-- <router-link to="/iframe/其他课程资源/课程中心"> -->
       <img :src="Img2" alt="">
@@ -61,7 +61,7 @@
   </el-dialog>
 </template>
 <script setup>
-import { ref } from 'vue';
+import { ref,watchEffect } from 'vue';
 import CourseSelect from './downloadCourse.vue';
 import GraphicsImg from '@/assets/icon/图形化icon-1.png'
 import pythonImg from '@/assets/icon/Frame.png'
@@ -70,6 +70,7 @@ import { userInfoStore } from '@/stores/counter'
 
 const dialogVisible = ref(false)
 const InfoStore = userInfoStore()
+const isLogin = ref(false)
 
 
 const openApplication = (type) => {
@@ -87,6 +88,12 @@ const courseDown = e => {
   dialogVisible.value = true
   e.stopPropagation();
 }
+watchEffect(() => {
+  // console.log('111111111111',CurrentRole, user.user)
+  if (JSON.stringify(InfoStore.user) != "{}") {
+    isLogin.value = true
+  }
+})
 </script>
 <style lang="scss" scoped>
 .el-row {