Parcourir la source

feat: umi设为静态编译,适配web服务

Hacked_v0.16.0
fellow99 il y a 7 mois
Parent
révision
8e72a247fb

+ 4
- 3
web/.umirc.ts Voir le fichier

@@ -19,6 +19,7 @@ export default defineConfig({
history: {
type: 'browser',
},
exportStatic: {},
plugins: [
'@react-dev-inspector/umi4-plugin',
'@umijs/plugins/dist/tailwindcss',
@@ -36,12 +37,12 @@ export default defineConfig({
],
proxy: [
{
context: ['/api', '/v1'],
target: 'http://127.0.0.1:9380/',
context: ['/ss-ragflow-api/api', '/ss-ragflow-api/v1'],
target: 'http://pi16:8321',
changeOrigin: true,
ws: true,
logger: console,
// pathRewrite: { '^/v1': '/v1' },
// pathRewrite: { '^/ss-ragflow-api/api': '/api', '^/ss-ragflow-api/v1': '/v1' },
},
],


+ 1
- 1
web/src/components/api-service/embed-modal/index.tsx Voir le fichier

@@ -30,7 +30,7 @@ const EmbedModal = ({
const text = `
~~~ html
<iframe
src="${location.origin}/chat/share?shared_id=${token}&from=${form}&auth=${beta}"
src="${location.origin}/ss-ragflow/chat/share?shared_id=${token}&from=${form}&auth=${beta}"
style="width: 100%; height: 100%; min-height: 600px"
frameborder="0"
>

+ 1
- 1
web/src/components/api-service/hooks.ts Voir le fichier

@@ -82,7 +82,7 @@ export const useShowBetaEmptyError = () => {

const getUrlWithToken = (token: string, from: string = 'chat') => {
const { protocol, host } = window.location;
return `${protocol}//${host}/chat/share?shared_id=${token}&from=${from}`;
return `${protocol}//${host}/ss-ragflow/chat/share?shared_id=${token}&from=${from}`;
};

const useFetchTokenListBeforeOtherStep = () => {

Chargement…
Annuler
Enregistrer