Merge branch 'zcwy-zsx' into 'master'

Zcwy zsx

See merge request !46
This commit is contained in:
joshen
2024-05-17 22:42:38 +08:00
3 changed files with 27 additions and 5 deletions

View File

@@ -32,6 +32,8 @@ export const TASK_TYPES = {
11: "去完成",
12: "去投票",
13: "去完成",
20: "未开始",
21: "进行中"
},
path: {
1: ({courseId}) => window.open(window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL + courseId), //在线

View File

@@ -79,7 +79,8 @@ export const EXTERNALEXAM = `/external/exam/queryExternalExam`
// 外链详情接口
export const LINKGETONE = `/link/getOne`
export const LEARN = `/manageApi/xboe/m/boe/umu/enterprise/learn get`
export const NOLOGINURL = `/manageApi/xboe/m/boe/hongshan/noLoginUrl post`
// 讨论模块
// -- 根据讨论的Id查询讨论发表的帖子
export const QueryDiscussSubmitDetailByDiscussId = '/discussSubmit/queryDiscussSubmitDetailByDiscussId post'

View File

@@ -78,12 +78,14 @@
<script setup>
import {useRequest, request} from "@/api/request";
import {
LINKGETONE
LINKGETONE,
LEARN,
NOLOGINURL
} from "@/api/api";
import {ref} from "vue";
import {ref,computed} from "vue";
import {useRoute,useRouter} from "vue-router/dist/vue-router";
import {useTaskPage} from "@/api/useCommon";
import { useStore } from "vuex";
const {
query: {courseId, pName, sName, chapterOrStageId, infoId, id, exname, type},
} = useRoute();
@@ -92,7 +94,8 @@
const returnclick = () => {
router.back();
};
const store = useStore();
const userInfo = computed(() => store.state.userInfo);
const datainfo = ref({});
//获取基本信息
@@ -109,6 +112,22 @@
// 查看外链
const handleClick = async(url) => {
console.log('我是获取的外链基本信息', datainfo.value)
if(url.includes('umu.cn')){
await request(LEARN, {url,userId:userInfo.value.userId}).then(res=>{
if(res.code == 200){
window.open(res.data)
}
})
return
}
if(url.includes('firacademy.com')){
await request(NOLOGINURL, {url,userId:userInfo.value.userId}).then(res=>{
if(res.code == 200){
window.open(res.data)
}
})
return
}
// await request(UPDATE_CURRENT_TASK, { id: d.id, type: PROJECT, pid: projectId, name: d.name })
// if ( d.type == 7 ) {
// d.status !== 1 && await request(STUDY_RECORD, {