chao 1 year ago
parent
commit
0628331942

+ 1 - 1
dist/assets/Details-EWnOQWJy.js → dist/assets/Details-tVXkRLUl.js

@@ -1 +1 @@
-import{u as m,r as i,o as p,a as r,b as a,c as t,w as o,d as c,e as u,t as b,f,g as h,C as v,h as k,P as y,i as g,j as C}from"./index-vOLl9ne8.js";const x={class:"iframDiv"},w={__name:"Details",setup(N){const{query:n,params:s}=m();console.log(n,s);const e=i("");return p(()=>{e.value=s.title}),(V,B)=>{const l=r("el-breadcrumb-item"),_=r("el-breadcrumb"),d=r("el-page-header");return a(),t(d,null,{breadcrumb:o(()=>[c(_,{separator:"/"},{default:o(()=>[c(l,{to:{path:"/"}},{default:o(()=>[u(" 首页 ")]),_:1}),c(l,null,{default:o(()=>[u(b(f(s).title),1)]),_:1})]),_:1})]),default:o(()=>[h("div",x,[e.value=="课程列表"?(a(),t(v,{key:0})):e.value=="资源中心"?(a(),t(k,{key:1})):e.value=="实践中心"?(a(),t(y,{key:2})):e.value=="其他课程资源"?(a(),t(g,{key:3})):C("",!0)])]),_:1})}}};export{w as default};
+import{u as m,r as i,o as p,a as r,b as a,c as t,w as o,d as c,e as u,t as b,f,g as h,C as v,h as k,P as y,i as g,j as C}from"./index-x8SnDrSq.js";const x={class:"iframDiv"},w={__name:"Details",setup(N){const{query:n,params:s}=m();console.log(n,s);const e=i("");return p(()=>{e.value=s.title}),(V,B)=>{const l=r("el-breadcrumb-item"),_=r("el-breadcrumb"),d=r("el-page-header");return a(),t(d,null,{breadcrumb:o(()=>[c(_,{separator:"/"},{default:o(()=>[c(l,{to:{path:"/"}},{default:o(()=>[u(" 首页 ")]),_:1}),c(l,null,{default:o(()=>[u(b(f(s).title),1)]),_:1})]),_:1})]),default:o(()=>[h("div",x,[e.value=="课程列表"?(a(),t(v,{key:0})):e.value=="资源中心"?(a(),t(k,{key:1})):e.value=="实践中心"?(a(),t(y,{key:2})):e.value=="其他课程资源"?(a(),t(g,{key:3})):C("",!0)])]),_:1})}}};export{w as default};

File diff suppressed because it is too large
+ 0 - 0
dist/assets/admin-ZPvlrHXn.js


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-jrToCi7N.css


File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-x8SnDrSq.js


+ 2 - 2
dist/index.html

@@ -8,8 +8,8 @@
     <script>
       document.domain = "cocorobo.cn"
     </script>
-    <script type="module" crossorigin src="./assets/index-vOLl9ne8.js"></script>
-    <link rel="stylesheet" crossorigin href="./assets/index-debZpQ1n.css">
+    <script type="module" crossorigin src="./assets/index-x8SnDrSq.js"></script>
+    <link rel="stylesheet" crossorigin href="./assets/index-jrToCi7N.css">
   </head>
   <body>
     <div id="app"></div>

+ 12 - 5
src/App.vue

@@ -9,6 +9,7 @@ import { userInfoStore, userCurrentRole } from './stores/counter'
 const route = useRoute()
 const store = userInfoStore()
 const CurrentRole = userCurrentRole()
+const name = ref('')
 onMounted(() => {
   // 通过 grant_code 获取登录信息
   let isGrantCode = getUrlParam(window.parent.location.href, 'grant_code')
@@ -26,7 +27,8 @@ onMounted(() => {
       axios.post('//cloud.cocorobo.cn/api/getUserInfo', JSON.stringify(accessTokenParams)).then(r => {
         console.log(r, r.data.code, r.data.data)
         if (r.data.code == 0) {
-          store.user = r.data.data
+          // store.user = r.data.data
+          name.value = r.data.data.userName
           userInfo(r.data.data)
         } else {
         }
@@ -72,13 +74,17 @@ const userInfo = (data) => {
     console.log(res, '222222222222')
 
     if (res.data && res.data[0][0].active == 1) {
-      store.userInfoEdu = res.data[0][0]
+      let obj = res.data[0][0]
+      obj.userName = name
+      store.user = obj
     } else {
       top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/batchRegistrationSzdjg", [data.userName, data.telephoneNumber + '@szdjg.com', '16ace517-b5c7-4168-a9bb-a9e0035df840', data.schoolName, data.telephoneNumber, userGrand, userIdentity, data.userId], function (r) {
         console.log('rrrrr', r)
         axios.post(`https://beta.api.cocorobo.cn/api/user`, qs.stringify(params)).then(d => {
           console.log(d, 'ddddddd')
-          store.userInfoEdu = d.data[0][0]
+          let obj = d.data[0][0]
+          obj.userName = name
+          store.user = obj
 
         })
       }, [], { "type": "POST", "withCredentials": true });
@@ -87,8 +93,9 @@ const userInfo = (data) => {
     top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/batchRegistrationSzdjg", [data.userName, data.telephoneNumber + '@szdjg.com', '16ace517-b5c7-4168-a9bb-a9e0035df840', data.schoolName, data.telephoneNumber, userGrand, userIdentity, data.userId], function (r) {
       console.log('rrrrr', r)
       axios.post(`https://beta.api.cocorobo.cn/api/user`, qs.stringify(params)).then(d => {
-        console.log(d, 'ddddddd')
-        store.userInfoEdu = d.data[0][0]
+        let obj = d.data[0][0]
+        obj.userName = name
+        store.user = obj
 
       })
     }, [], { "type": "POST", "withCredentials": true });

+ 20 - 2
src/components/main/other.vue

@@ -1,7 +1,7 @@
 <template>
   <h2 class="contentTitle">其他课程资源</h2>
   <el-row :gutter="20">
-    <el-col :span="6">
+    <el-col :span="6" v-if="Identity != 1">
       <div class="grid-content" @click="openApplication('project')">
         <!-- <router-link to="/iframe/其他课程资源/课程管理"> -->
         <img :src="Img1" alt="">
@@ -31,9 +31,27 @@ import { ref } from 'vue';
 import Img1 from '@/assets/icon/课程管理.png'
 import Img2 from '@/assets/icon/课程中心.png'
 import Img3 from '@/assets/icon/学生评价icon.png'
+import { userInfoStore } from '@/stores/counter'
+
+const InfoStore = userInfoStore()
+const Identity = ref(0)
+onMounted(() => {
+  if(InfoStore.user && InfoStore.user.identity){
+    Identity.value = InfoStore.user.identity
+  }
+})
 
 const openApplication = (type) => {
-  top.U.MD.D.I.openApplication(type)
+  if(type == "study"){
+    if(Identity.value == 1){
+      top.U.MD.D.I.openApplication('studentStudy')
+    }else{
+      top.U.MD.D.I.openApplication('study')
+    }
+  }else{
+    top.U.MD.D.I.openApplication(type)
+  }
+  
 }
 </script>
 <style lang="scss" scoped>

Some files were not shown because too many files changed in this diff