chao 1 год назад
Родитель
Сommit
9a47743170

+ 1 - 1
dist/assets/Details-YY2PlziF.js → dist/assets/Details-5SJHfJKy.js

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

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/assets/admin-euFkycWc.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/assets/index--7G8V9Nd.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/assets/index-3gnlaRln.js


+ 2 - 2
dist/index.html

@@ -8,8 +8,8 @@
     <script>
       document.domain = "cocorobo.cn"
     </script>
-    <script type="module" crossorigin src="./assets/index-SfdkMMjM.js"></script>
-    <link rel="stylesheet" crossorigin href="./assets/index-eY5uiTid.css">
+    <script type="module" crossorigin src="./assets/index-3gnlaRln.js"></script>
+    <link rel="stylesheet" crossorigin href="./assets/index--7G8V9Nd.css">
   </head>
   <body>
     <div id="app"></div>

+ 1 - 4
src/App.vue

@@ -100,10 +100,7 @@ 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 => {
-            let obj = d.data[0][0]
-            obj.userName = name
-            store.user = obj
-
+            store.user = US.userInfo
           })
         }, [], { "type": "POST", "withCredentials": true });
       } else {

+ 5 - 15
src/components/header/headerRight.vue

@@ -23,23 +23,13 @@
 
 <script setup>
 import { ref, onMounted, watchEffect } from "vue"
-import { userInfoStore,userCurrentRole } from '../../stores/counter'
+import { userCurrentRole } from '../../stores/counter'
 
-const user = userInfoStore()
+// const user = userInfoStore()
 const isLogin = ref(false)
 const admin = ref(false)
 const userName = ref('')
 const CurrentRole = userCurrentRole()
-// onMounted(() => {
-//     console.log(user)
-//     if (JSON.stringify(user.user) != "{}") {
-//         isLogin.value = true
-//         userName.value = user.user.userName
-//         if (user.user.currentRole == "areaAdministrator" || user.user.currentRole == "userAdministrator" || user.user.currentRole == "securityAuditor" || user.user.currentRole == "schoolAdministrator" || user.user.currentRole == "schoolSecurityAuditor" || user.user.currentRole == "teacher") {
-//             admin.value = true
-//         }
-//     }
-// })
 
 const linkLogin = () => {
     top.location.href = `http://szedutest.changyan.cn/thirdauth/oauth2/authorize?service=initService&scope=all&response_type=code&app_id=94c720f0634b4bad890dc9223de01166&redirect_uri=https://cloud.cocorobo.cn/testapi`
@@ -56,10 +46,10 @@ const goBack=()=>{
 
 watchEffect(() => {
     // console.log(user, 2222222222)
-    if (JSON.stringify(user.user) != "{}") {
+    if (JSON.stringify(US.userInfo) != "{}") {
         isLogin.value = true
-        userName.value = user.user.username
-        if (CurrentRole.currentRole == "edupersonnel" || CurrentRole.currentRole == "areaAdministrator" || CurrentRole.currentRole == "userAdministrator" || CurrentRole.currentRole == "securityAuditor" || CurrentRole.currentRole == "schoolAdministrator" || CurrentRole.currentRole == "schoolSecurityAuditor" || CurrentRole.currentRole == "teacher" || user.user.identity != 1) {
+        userName.value = US.userInfo.username
+        if (CurrentRole.currentRole == "edupersonnel" || CurrentRole.currentRole == "areaAdministrator" || CurrentRole.currentRole == "userAdministrator" || CurrentRole.currentRole == "securityAuditor" || CurrentRole.currentRole == "schoolAdministrator" || CurrentRole.currentRole == "schoolSecurityAuditor" || CurrentRole.currentRole == "teacher" || US.userInfo.type != 2) {
             admin.value = true
         }
     }

+ 6 - 6
src/components/main/courseSelect.vue

@@ -68,7 +68,7 @@
 </template>
 <script setup>
 import { ref, onMounted, watchEffect } from 'vue';
-import { userInfoStore,userCurrentRole } from '../../stores/counter'
+import { userCurrentRole } from '../../stores/counter'
 import WarningImg from '@/assets/icon/icon.png'
 import san1 from '../../assets/img/三下1.png'
 import san2 from '@/assets/img/三下2.png'
@@ -95,7 +95,7 @@ import ba2 from '@/assets/img/八下2.png'
 import ba3 from '@/assets/img/八下3.png'
 import ba4 from '@/assets/img/八下4.png'
 
-const user = userInfoStore()
+// const user = userInfoStore()
 const CurrentRole = userCurrentRole()
 const selectGrand = ref('三年级')
 const isupdateCourse = ref(false)
@@ -277,8 +277,8 @@ const getImageUrl = (url) => {
 }
 
 const openCourseDetail = (id) => {
-  console.log(user.user.type)
-  top.U.MD.D.I.openInApplication("studyDetail", id, 2, user.user.type); //这个是打开指定的课程接口
+  console.log(US.userInfo.type)
+  top.U.MD.D.I.openInApplication("studyDetail", id, 2, US.userInfo.type); //这个是打开指定的课程接口
 }
 const updateCourse = id => {
   top.U.MD.D.I.openInApplication('openCourseUpdate', id)
@@ -294,8 +294,8 @@ const updateReduction = () => {
 }
 
 watchEffect(() => {
-  if (JSON.stringify(user.user) != "{}") {
-    if (CurrentRole.currentRole == "edupersonnel" || CurrentRole.currentRole == "areaAdministrator" || CurrentRole.currentRole == "userAdministrator" || CurrentRole.currentRole == "securityAuditor" || CurrentRole.currentRole == "schoolAdministrator" || CurrentRole.currentRole == "schoolSecurityAuditor" || CurrentRole.currentRole == "teacher" || user.user.identity != 1) {
+  if (JSON.stringify(US.userInfo) != "{}") {
+    if (CurrentRole.currentRole == "edupersonnel" || CurrentRole.currentRole == "areaAdministrator" || CurrentRole.currentRole == "userAdministrator" || CurrentRole.currentRole == "securityAuditor" || CurrentRole.currentRole == "schoolAdministrator" || CurrentRole.currentRole == "schoolSecurityAuditor" || CurrentRole.currentRole == "teacher" || US.userInfo.type != 2) {
       isupdateCourse.value = true
     }
   }

+ 4 - 4
src/components/main/other.vue

@@ -31,13 +31,13 @@ import { ref,onMounted } 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'
+// import { userInfoStore } from '@/stores/counter'
 
-const InfoStore = userInfoStore()
+// const InfoStore = userInfoStore()
 const Identity = ref(0)
 onMounted(() => {
-  if(InfoStore.user && InfoStore.user.identity){
-    Identity.value = InfoStore.user.identity
+  if(US.userInfo && US.userInfo.type){
+    Identity.value = US.userInfo.type
   }
 })
 

+ 4 - 4
src/views/main.vue

@@ -20,18 +20,18 @@ import Practice from '@/components/main/Practice.vue';
 import other from '@/components/main/other.vue';
 import Edu from '@/components/main/edu.vue';
 import Header from './header.vue'
-import { userInfoStore, userCurrentRole } from '../stores/counter'
+import { userCurrentRole } from '../stores/counter'
 
-const user = userInfoStore()
+// const user = userInfoStore()
 const CurrentRole = userCurrentRole()
 const isupdateCourse = ref(false)
 const isLogin = ref(false)
 
 watchEffect(() => {
   // console.log('111111111111',CurrentRole, user.user)
-  if (JSON.stringify(user.user) != "{}") {
+  if (JSON.stringify(US.userInfo.type) != "{}") {
     isLogin.value = true
-    if (CurrentRole.currentRole == "edupersonnel" || CurrentRole.currentRole == "areaAdministrator" || CurrentRole.currentRole == "userAdministrator" || CurrentRole.currentRole == "securityAuditor" || CurrentRole.currentRole == "schoolAdministrator" || CurrentRole.currentRole == "schoolSecurityAuditor" || CurrentRole.currentRole == "teacher" || user.user.identity != 1) {
+    if (CurrentRole.currentRole == "edupersonnel" || CurrentRole.currentRole == "areaAdministrator" || CurrentRole.currentRole == "userAdministrator" || CurrentRole.currentRole == "securityAuditor" || CurrentRole.currentRole == "schoolAdministrator" || CurrentRole.currentRole == "schoolSecurityAuditor" || CurrentRole.currentRole == "teacher" || US.userInfo.type != 2) {
       isupdateCourse.value = true
     }
   }

Некоторые файлы не были показаны из-за большого количества измененных файлов