mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-07 01:46:45 +08:00
外链添加接口
This commit is contained in:
@@ -34,6 +34,8 @@ export const TASK_OFFCOURSE_NOTASK_SIGN = '/stu/task/offcourse/notask/sign post'
|
|||||||
export const TASK_OFFCOURSE_SIGN = '/stu/task/offcourse/sign post'
|
export const TASK_OFFCOURSE_SIGN = '/stu/task/offcourse/sign post'
|
||||||
export const LINK_DETAILS = `/link/getOne`
|
export const LINK_DETAILS = `/link/getOne`
|
||||||
export const STUDY_RECORD = '/stu/task/thirdTask/submit post'
|
export const STUDY_RECORD = '/stu/task/thirdTask/submit post'
|
||||||
|
export const LEARN = `/xboe/m/boe/umu/enterprise/learn post`
|
||||||
|
export const NOLOGINURL = `/xboe/m/boe/hongshan/noLoginUrl post`
|
||||||
export const TASK_WORK_SUBMIT_LIST = '/workSubmit/queryWorkSubmitDetailById'
|
export const TASK_WORK_SUBMIT_LIST = '/workSubmit/queryWorkSubmitDetailById'
|
||||||
export const SUB_STUDENT_DETAIL = `/workSubmit/submitStudentNoWorkDetail post`
|
export const SUB_STUDENT_DETAIL = `/workSubmit/submitStudentNoWorkDetail post`
|
||||||
export const WORK_HISTROY = '/workSubmit/queryWorkDetailListByStuId'
|
export const WORK_HISTROY = '/workSubmit/queryWorkDetailListByStuId'
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<div class="submitbtn" @click="goOuterChain">去查看</div>
|
<div class="submitbtn" @click="goOuterChain(data.linkAddress)">去查看</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -57,7 +57,7 @@ import ReturnHead from "@/components/ReturnHead.vue";
|
|||||||
import { computed, reactive, toRefs, onUnmounted, ref, watch } from "vue";
|
import { computed, reactive, toRefs, onUnmounted, ref, watch } from "vue";
|
||||||
import img from "@/assets/image/uploadimg.png";
|
import img from "@/assets/image/uploadimg.png";
|
||||||
import { request, useRequest } from "@/api/request";
|
import { request, useRequest } from "@/api/request";
|
||||||
import { LINK_DETAILS, STUDY_RECORD, checkStudentExist } from "@/api/api";
|
import { LINK_DETAILS, STUDY_RECORD, checkStudentExist,LEARN,NOLOGINURL } from "@/api/api";
|
||||||
import { useRoute } from "vue-router/dist/vue-router";
|
import { useRoute } from "vue-router/dist/vue-router";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useUserInfo } from "@/api/utils";
|
import { useUserInfo } from "@/api/utils";
|
||||||
@@ -105,19 +105,35 @@ const { data } = useRequest(LINK_DETAILS, { linkId, type }, (e) => {
|
|||||||
|
|
||||||
console.log("外链信息", data);
|
console.log("外链信息", data);
|
||||||
const userInfo = computed(() => store.state.userInfo);
|
const userInfo = computed(() => store.state.userInfo);
|
||||||
const goOuterChain = () => {
|
const goOuterChain = async (url) => {
|
||||||
console.log("userInfo", userInfo);
|
console.log("userInfo", userInfo);
|
||||||
request(STUDY_RECORD, {
|
// request(STUDY_RECORD, {
|
||||||
studentId: userInfo.value.id,
|
// studentId: userInfo.value.id,
|
||||||
targetId: infoId,
|
// targetId: infoId,
|
||||||
logo: type,
|
// logo: type,
|
||||||
stageOrChapterId: chapterOrStageId,
|
// stageOrChapterId: chapterOrStageId,
|
||||||
taskId: taskId,
|
// taskId: taskId,
|
||||||
type: type,
|
// type: type,
|
||||||
taskType: 7,
|
// taskType: 7,
|
||||||
});
|
// });
|
||||||
|
if(url.includes('umu.cn')){
|
||||||
window.open(data.value.linkAddress, "_top");
|
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
|
||||||
|
}
|
||||||
|
window.open(url);
|
||||||
|
// window.open(data.value.linkAddress, "_top");
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user