feat(ProjectManage): 更新 AI 助手链接并添加 token 认证
- 更新了 .env.dev 和 .env.uat 文件中的 VUE_APP_AI_ASSISTANT_URL - 在 ProjectManage 创建页面中添加了 token 认证功能 -优化了 Home 页面中的 LaunchIntro 和 ModelCard 组件样式
This commit is contained in:
3
.env.dev
3
.env.dev
@@ -15,4 +15,5 @@ VUE_APP_JSONPURL = 'https://iam-uat.dctest.digitalyili.com/idp/restful/getIDPTok
|
|||||||
VUE_APP_YQRURL = 'https://ocp-uat-ain.digitalyili.com'
|
VUE_APP_YQRURL = 'https://ocp-uat-ain.digitalyili.com'
|
||||||
|
|
||||||
# 伊调研问卷助手
|
# 伊调研问卷助手
|
||||||
VUE_APP_AI_ASSISTANT_URL = 'https://yiligpt.x.digitalyili.com/aiagent/assistant/b4834e30-0de9-4741-87f3-9fb4af5184cb/share'
|
#VUE_APP_AI_ASSISTANT_URL = 'https://yiligpt.x.digitalyili.com/aiagent/assistant/b4834e30-0de9-4741-87f3-9fb4af5184cb/share'
|
||||||
|
VUE_APP_AI_ASSISTANT_URL = 'https://yiligpt.x.digitalyili.com/aiagent/assistant/78907182-cc42-4072-abae-86ef67c1ecd3/share'
|
||||||
|
|||||||
3
.env.uat
3
.env.uat
@@ -17,4 +17,5 @@ VUE_APP_JSONPURL = 'https://iam-uat.dctest.digitalyili.com/idp/restful/getIDPTok
|
|||||||
VUE_APP_YQRURL = 'https://ocp-uat-ain.digitalyili.com'
|
VUE_APP_YQRURL = 'https://ocp-uat-ain.digitalyili.com'
|
||||||
|
|
||||||
# 伊调研问卷助手
|
# 伊调研问卷助手
|
||||||
VUE_APP_AI_ASSISTANT_URL = 'https://yiligpt.x.digitalyili.com/aiagent/assistant/b4834e30-0de9-4741-87f3-9fb4af5184cb/share'
|
#VUE_APP_AI_ASSISTANT_URL = 'https://yiligpt.x.digitalyili.com/aiagent/assistant/b4834e30-0de9-4741-87f3-9fb4af5184cb/share'
|
||||||
|
VUE_APP_AI_ASSISTANT_URL = 'https://yiligpt.x.digitalyili.com/aiagent/assistant/78907182-cc42-4072-abae-86ef67c1ecd3/share'
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 475 KiB After Width: | Height: | Size: 380 KiB |
@@ -10,12 +10,9 @@
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.intro-container{
|
.intro-container{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
position: relative;
|
|
||||||
padding-bottom: 30px;
|
padding-bottom: 30px;
|
||||||
.title{
|
.title{
|
||||||
position: absolute;
|
padding-top: 50px;
|
||||||
top: 3vh;
|
|
||||||
left: 29%;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ p {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.model-item-desc {
|
.model-item-desc {
|
||||||
|
|||||||
@@ -205,7 +205,7 @@
|
|||||||
:footer="null"
|
:footer="null"
|
||||||
>
|
>
|
||||||
<iframe
|
<iframe
|
||||||
:src="aiAssistantUrl"
|
:src="aiAssistantUrlWithToken"
|
||||||
style="width: 100%; height: 100%; min-height: 500px"
|
style="width: 100%; height: 100%; min-height: 500px"
|
||||||
frameborder="0"
|
frameborder="0"
|
||||||
>
|
>
|
||||||
@@ -276,6 +276,8 @@ import PackageTest from './presets/package/PackageTest.vue';
|
|||||||
import { tr } from 'element-plus/lib/locale';
|
import { tr } from 'element-plus/lib/locale';
|
||||||
|
|
||||||
import { aiAssistantUrl } from '@/config';
|
import { aiAssistantUrl } from '@/config';
|
||||||
|
// 获取 token
|
||||||
|
const token = ref(localStorage.getItem('plantToken') || '');
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -316,7 +318,17 @@ const props = defineProps({
|
|||||||
// required: true,
|
// required: true,
|
||||||
// },
|
// },
|
||||||
});
|
});
|
||||||
|
const aiAssistantUrlWithToken = computed(() => {
|
||||||
|
if (!aiAssistantUrl) return '';
|
||||||
|
// 使用 encodeURIComponent 转义 token
|
||||||
|
const encodedToken = encodeURIComponent(token.value);
|
||||||
|
|
||||||
|
// 使用 URL 对象安全拼接参数
|
||||||
|
const url = new URL(aiAssistantUrl);
|
||||||
|
url.searchParams.append('token', encodedToken);
|
||||||
|
url.searchParams.append('source', 'pc');
|
||||||
|
return url.toString();
|
||||||
|
});
|
||||||
function setRef(el) {
|
function setRef(el) {
|
||||||
normalRef.value.push(el);
|
normalRef.value.push(el);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user