feat(ProjectManage): 更新 AI 助手链接并添加 token 认证

- 更新了 .env.dev 和 .env.uat 文件中的 VUE_APP_AI_ASSISTANT_URL
- 在 ProjectManage 创建页面中添加了 token 认证功能
-优化了 Home 页面中的 LaunchIntro 和 ModelCard 组件样式
This commit is contained in:
du.meimei
2025-05-16 14:58:29 +08:00
parent 8796b58928
commit 3582b26ed3
6 changed files with 19 additions and 7 deletions

View File

@@ -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_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'

View File

@@ -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_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

View File

@@ -10,12 +10,9 @@
<style scoped lang="scss">
.intro-container{
background-color: #fff;
position: relative;
padding-bottom: 30px;
.title{
position: absolute;
top: 3vh;
left: 29%;
padding-top: 50px;
}
}
</style>

View File

@@ -50,6 +50,7 @@ p {
font-weight: bold;
font-size: 22px;
color: #fff;
white-space: nowrap;
}
.model-item-desc {

View File

@@ -205,7 +205,7 @@
:footer="null"
>
<iframe
:src="aiAssistantUrl"
:src="aiAssistantUrlWithToken"
style="width: 100%; height: 100%; min-height: 500px"
frameborder="0"
>
@@ -276,6 +276,8 @@ import PackageTest from './presets/package/PackageTest.vue';
import { tr } from 'element-plus/lib/locale';
import { aiAssistantUrl } from '@/config';
// 获取 token
const token = ref(localStorage.getItem('plantToken') || '');
const loading = ref(false);
const router = useRouter();
@@ -316,7 +318,17 @@ const props = defineProps({
// 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) {
normalRef.value.push(el);
}