提交 4cfd382d authored 作者: 王鹏飞's avatar 王鹏飞

chore: 进入第三方实验室携带token

上级 74c281ce
VITE_LOGIN_URL=https://login.ezijing.com/auth/login/index
VITE_LAB_URL=https://bi.ezijing.com/bi/?proc=0&action=index
VITE_LAB_URL=https://bi.ezijing.com/bi/viewer?proc=0&action=index
VITE_DML_URL=https://saas-dml.ezijing.com
\ No newline at end of file
VITE_LOGIN_URL=https://login.ezijing.com/auth/login/index
VITE_LAB_URL=https://digitalmarketinglab.ezijing.com
# VITE_LAB_URL=https://digitalmarketinglab.ezijing.com
VITE_LAB_URL=https://bi.ezijing.com/bi/viewer?proc=0&action=index
VITE_DML_URL=https://saas-dml.ezijing.com
\ No newline at end of file
VITE_LOGIN_URL=https://login2.ezijing.com/auth/login/index
VITE_LAB_URL=https://bi.ezijing.com/bi/?proc=0&action=index
VITE_LOGIN_URL=https://login.ezijing.com/auth/login/index
VITE_LAB_URL=https://bi.ezijing.com/bi/viewer?proc=0&action=index
VITE_DML_URL=https://saas-dml.ezijing.com
\ No newline at end of file
......@@ -13,6 +13,7 @@
"@vant/area-data": "^1.4.0",
"@vueuse/core": "^9.13.0",
"@vueuse/head": "^1.0.26",
"@vueuse/integrations": "^9.13.0",
"@vueuse/math": "^9.13.0",
"ali-oss": "^6.17.1",
"axios": "^1.3.3",
......@@ -25,6 +26,7 @@
"lodash-es": "^4.17.21",
"pinia": "^2.0.32",
"ua-parser-js": "^1.0.33",
"universal-cookie": "^4.0.4",
"video.js": "^7.21.1",
"vue": "^3.2.47",
"vue-router": "^4.1.6",
......@@ -1159,6 +1161,11 @@
"integrity": "sha512-f4A+++lGZGJvVSgeyMkqA7BEf2BVQli6F+qEykKb49c5ieWQBkfpn6CP5c1IZr2Yi2Ofl6Fj+v0e1fN18Z8Cnw==",
"dev": true
},
"node_modules/@types/cookie": {
"version": "0.3.3",
"resolved": "https://registry.npmmirror.com/@types/cookie/-/cookie-0.3.3.tgz",
"integrity": "sha512-LKVP3cgXBT9RYj+t+9FDKwS5tdI+rPBXaNSkma7hvqy35lc7mAokC2zsqWJH0LaqIt3B962nuYI77hsJoT1gow=="
},
"node_modules/@types/estree": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.0.tgz",
......@@ -1751,6 +1758,86 @@
"vue": ">=2.7 || >=3"
}
},
"node_modules/@vueuse/integrations": {
"version": "9.13.0",
"resolved": "https://registry.npmmirror.com/@vueuse/integrations/-/integrations-9.13.0.tgz",
"integrity": "sha512-I1kX/tsfcvWWLZD7HZaP0LsSfchK13YxReLfharXhk72SFXp87doLbRaTfIF5w8m/gr/vPtcNyQPAXW7Ubpuww==",
"dependencies": {
"@vueuse/core": "9.13.0",
"@vueuse/shared": "9.13.0",
"vue-demi": "*"
},
"peerDependencies": {
"async-validator": "*",
"axios": "*",
"change-case": "*",
"drauu": "*",
"focus-trap": "*",
"fuse.js": "*",
"idb-keyval": "*",
"jwt-decode": "*",
"nprogress": "*",
"qrcode": "*",
"universal-cookie": "*"
},
"peerDependenciesMeta": {
"async-validator": {
"optional": true
},
"axios": {
"optional": true
},
"change-case": {
"optional": true
},
"drauu": {
"optional": true
},
"focus-trap": {
"optional": true
},
"fuse.js": {
"optional": true
},
"idb-keyval": {
"optional": true
},
"jwt-decode": {
"optional": true
},
"nprogress": {
"optional": true
},
"qrcode": {
"optional": true
},
"universal-cookie": {
"optional": true
}
}
},
"node_modules/@vueuse/integrations/node_modules/vue-demi": {
"version": "0.13.11",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.13.11.tgz",
"integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/@vueuse/math": {
"version": "9.13.0",
"resolved": "https://registry.npmmirror.com/@vueuse/math/-/math-9.13.0.tgz",
......@@ -2358,6 +2445,14 @@
"integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==",
"dev": true
},
"node_modules/cookie": {
"version": "0.4.2",
"resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.4.2.tgz",
"integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/copy-to": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/copy-to/-/copy-to-2.0.1.tgz",
......@@ -5500,6 +5595,15 @@
"node": ">=12"
}
},
"node_modules/universal-cookie": {
"version": "4.0.4",
"resolved": "https://registry.npmmirror.com/universal-cookie/-/universal-cookie-4.0.4.tgz",
"integrity": "sha512-lbRVHoOMtItjWbM7TwDLdl8wug7izB0tq3/YVKhT/ahB4VDvWMyvnADfnJI8y6fSvsjh51Ix7lTGC6Tn4rMPhw==",
"dependencies": {
"@types/cookie": "^0.3.3",
"cookie": "^0.4.0"
}
},
"node_modules/universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmmirror.com/universalify/-/universalify-0.1.2.tgz",
......@@ -6953,6 +7057,11 @@
"integrity": "sha512-f4A+++lGZGJvVSgeyMkqA7BEf2BVQli6F+qEykKb49c5ieWQBkfpn6CP5c1IZr2Yi2Ofl6Fj+v0e1fN18Z8Cnw==",
"dev": true
},
"@types/cookie": {
"version": "0.3.3",
"resolved": "https://registry.npmmirror.com/@types/cookie/-/cookie-0.3.3.tgz",
"integrity": "sha512-LKVP3cgXBT9RYj+t+9FDKwS5tdI+rPBXaNSkma7hvqy35lc7mAokC2zsqWJH0LaqIt3B962nuYI77hsJoT1gow=="
},
"@types/estree": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.0.tgz",
......@@ -7427,6 +7536,24 @@
"@unhead/vue": "^1.0.22"
}
},
"@vueuse/integrations": {
"version": "9.13.0",
"resolved": "https://registry.npmmirror.com/@vueuse/integrations/-/integrations-9.13.0.tgz",
"integrity": "sha512-I1kX/tsfcvWWLZD7HZaP0LsSfchK13YxReLfharXhk72SFXp87doLbRaTfIF5w8m/gr/vPtcNyQPAXW7Ubpuww==",
"requires": {
"@vueuse/core": "9.13.0",
"@vueuse/shared": "9.13.0",
"vue-demi": "*"
},
"dependencies": {
"vue-demi": {
"version": "0.13.11",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.13.11.tgz",
"integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
"requires": {}
}
}
},
"@vueuse/math": {
"version": "9.13.0",
"resolved": "https://registry.npmmirror.com/@vueuse/math/-/math-9.13.0.tgz",
......@@ -7902,6 +8029,11 @@
"integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==",
"dev": true
},
"cookie": {
"version": "0.4.2",
"resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.4.2.tgz",
"integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA=="
},
"copy-to": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/copy-to/-/copy-to-2.0.1.tgz",
......@@ -10420,6 +10552,15 @@
}
}
},
"universal-cookie": {
"version": "4.0.4",
"resolved": "https://registry.npmmirror.com/universal-cookie/-/universal-cookie-4.0.4.tgz",
"integrity": "sha512-lbRVHoOMtItjWbM7TwDLdl8wug7izB0tq3/YVKhT/ahB4VDvWMyvnADfnJI8y6fSvsjh51Ix7lTGC6Tn4rMPhw==",
"requires": {
"@types/cookie": "^0.3.3",
"cookie": "^0.4.0"
}
},
"universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmmirror.com/universalify/-/universalify-0.1.2.tgz",
......
......@@ -19,6 +19,7 @@
"@vant/area-data": "^1.4.0",
"@vueuse/core": "^9.13.0",
"@vueuse/head": "^1.0.26",
"@vueuse/integrations": "^9.13.0",
"@vueuse/math": "^9.13.0",
"ali-oss": "^6.17.1",
"axios": "^1.3.3",
......@@ -31,6 +32,7 @@
"lodash-es": "^4.17.21",
"pinia": "^2.0.32",
"ua-parser-js": "^1.0.33",
"universal-cookie": "^4.0.4",
"video.js": "^7.21.1",
"vue": "^3.2.47",
"vue-router": "^4.1.6",
......
......@@ -4,14 +4,15 @@ import { Upload, Promotion } from '@element-plus/icons-vue'
import AppList from '@/components/base/AppList.vue'
import { getExperimentRecordList } from '../api'
import { useFilterList } from '../composables/useFilterList'
import { useCookies } from '@vueuse/integrations/useCookies'
const ScoreDialog = defineAsyncComponent(() => import('../components/ScoreDialog.vue'))
const ImportDialog = defineAsyncComponent(() => import('../components/ImportDialog.vue'))
const ScoreLogDialog = defineAsyncComponent(() => import('../components/ScoreLogDialog.vue'))
const { courses, experiments, specialties, classes } = useFilterList()
const LAB_URL = import.meta.env.VITE_LAB_URL
const cookies = useCookies(['TGC'])
const LAB_URL = `${import.meta.env.VITE_LAB_URL}&token=${cookies.get('TGC')}`
const route = useRoute()
......
......@@ -9,6 +9,7 @@ import { getExperiment, getExperimentRecord, uploadExperimentPicture, submitExpe
import dayjs from 'dayjs'
import { saveAs } from 'file-saver'
import html2pdf from 'html2pdf.js'
import { useCookies } from '@vueuse/integrations/useCookies'
const Info = defineAsyncComponent(() => import('../components/Info.vue'))
const Case = defineAsyncComponent(() => import('../components/Case.vue'))
......@@ -90,10 +91,11 @@ watchEffect(() => {
})
// 右侧
const cookies = useCookies(['TGC'])
const LAB_URL = computed(() => {
return experimentInfo?.type === 4
? `${import.meta.env.VITE_DML_URL}/trip?experiment_id=${form.experiment_id}`
: import.meta.env.VITE_LAB_URL
: `${import.meta.env.VITE_LAB_URL}&token=${cookies.get('TGC')}`
})
let iframeKey = $ref(Date.now())
// 返回首页
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论