feat: 添加伊利GPT跳转功能

- 在 nginx 配置中添加 /yiligpt路径,跳转到伊利GPT页面
- 在 Dockerfile 中使用自定义的 default.conf 文件- 在 vue.config.js 中添加 /yiligpt 代理配置,指向 AI 助手 URL
This commit is contained in:
du.meimei
2025-05-27 16:05:46 +08:00
parent 0013c2385f
commit 5f210b767c
3 changed files with 16 additions and 4 deletions

View File

@@ -10,5 +10,5 @@ ARG URL_DIR=
COPY ${DIST_DIR} /var/www/html/${URL_DIR}
RUN sed -i "s/\ \/index.html/\ \/${URL_DIR}\/index.html/g" /etc/nginx/conf.d/default.conf
# 默认不建议使用自定义nginx配置如必须使用请提前沟通
# COPY ./nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
COPY ./default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80

View File

@@ -5,6 +5,11 @@ server {
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
# 跳转到伊利GPT
location /yiligpt {
return 302 https://yiligpt.x.digitalyili.com/aiagent/assistant/78907182-cc42-4072-abae-86ef67c1ecd3/share;
}
location / {
root /var/www/html;
index index.html index.htm;
@@ -18,4 +23,4 @@ server {
root /var/www/html;
}
}
}

View File

@@ -3,7 +3,7 @@ const Components = require('unplugin-vue-components/webpack');
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers');
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
const LodashModuleReplacementPlugin = require("lodash-webpack-plugin");
const { proxyUrl, proxyUrlDelivery } = require('./src/config');
const { proxyUrl, proxyUrlDelivery,aiAssistantUrl } = require('./src/config');
const { baseOss } = require('./src/config');
const path = require('path');
@@ -33,6 +33,13 @@ module.exports = {
},
cookieDomainRewrite: 'localhost',
},
'/yiligpt': {
target: `${ aiAssistantUrl }`,
changeOrigin: true,
pathRewrite: {
'^/yiligpt': '', // 路径重写
},
},
// '/daixin': {
// target: proxyUrlMessageCenter,
// changeOrigin: false,