Jelajahi Sumber

fix: 调整接口地址

zhupei@smartai.com 1 tahun lalu
induk
melakukan
93a994b58c

+ 4 - 4
public/config.js

@@ -7,18 +7,18 @@ window.DMX_VERSION = '1.0.1';
  * 配置项最后一个字符 无需是 /
  * 即,无需以 / 结束
  */
-window.API_BASE_URL = 'http://smartai.com:8191';
+window.API_BASE_URL = 'http://smartai.com:8401';
 
 /**
  * 对话websocket连接地址
  */
-window.WEBSOCKET_BASE_URL = 'ws://smartai.com:8191';
+window.WEBSOCKET_BASE_URL = 'ws://smartai.com:8401';
 
 /**
  * 静态资源地址
  * 图片、文档等类型的地址
  */
-window.ASSETS_BASE_URL = 'http://smartai.com:8191';
+window.ASSETS_BASE_URL = 'http://smartai.com:8401';
 
 /**
  * rgflow 接口地址
@@ -51,7 +51,7 @@ window.IFRAME_URL_CHUJUAN = 'http://192.168.20.119:8501';
  * 小数系统访问地址
  * 导航栏 小数 通过 无界 微前端 方式嵌入到大模型2.0
  */
-window.XIAOSHU_URL = 'http://smartai.com:8191';
+window.XIAOSHU_URL = 'http://smartai.com:8401';
 
 /**
  * 当用户第一次进入系统时,进入的第一个页面就是对话页面

+ 1 - 1
src/index.js

@@ -18,7 +18,7 @@ import WujieVue from 'wujie-vue3';
 import App from './App.vue';
 
 import router from './router'; // 路由
-import './router/guard';
+// import './router/guard';
 import directive from './directive'; // 指令
 import { setupI18n } from './i18n';
 

+ 7 - 3
src/modules/answer-refference/RefferenceDocDetail.vue

@@ -211,7 +211,9 @@ main > div.right .pdf-viewer {
 main > div.left {
   width: 460px;
   padding: 20px 0 20px 20px;
-  background: #e2e4eb;
+  /* background: #e2e4eb; */
+  background-color: var(--color-fill-2);
+  color: var(--color-text-1);
   display: flex;
   flex-direction: column;
   /* height: calc(100vh - 48px - 65px); */
@@ -243,7 +245,8 @@ main > div.left > div > div {
   color: #fff;
 }
 main > div.left > div > p {
-  background: #f6f8ff;
+  /* background: #f6f8ff; */
+  /* background-color: var(--color-bg-1); */
   border-radius: 0 12px 12px 12px;
   padding: 16px 16px;
   font-size: 16px;
@@ -262,7 +265,8 @@ main > div.left > section {
   padding-right: 20px;
 }
 main > div.left > section > div {
-  background: #fff;
+  /* background: #fff; */
+  background-color: var(--color-bg-1);
   border-radius: 8px;
   padding: 12px;
   margin-bottom: 16px;

+ 4 - 2
src/modules/conversation-chat/chat-content.css

@@ -21,12 +21,14 @@
   border-radius: 50%;
   cursor: pointer;
   display: inline-block;
-  border: 1px solid #888;
+  /* border: 1px solid #888; */
+  border: 1px solid var(--color-text-1);
 }
 .client-formated-markdown-doc-refference-flag .refference-flag-circle::before {
   content: '!';
   font-size: 12px;
-  color: #000;
+  /* color: #000; */
+  color: var(--color-text-1);
   line-height: 12px;
   text-align: center;
   display: block;

+ 2 - 1
src/modules/file-name/FileNameDisplay.vue

@@ -61,7 +61,8 @@ const img_src = icon_map[file_endfix];
 }
 
 .file-name-label {
-  color: blue;
+  /* color: blue; */
+  color: rgb(var(--primary-6));
   display: -webkit-box;
   -webkit-box-orient: vertical;
   -webkit-line-clamp: 1; /* 这里设置显示的行数 */

+ 0 - 35
src/router/guard.js

@@ -1,35 +0,0 @@
-import router from './index';
-import { kuky_Authorization } from '../base/storage';
-import { firstPage, accessFlatRoutes } from '../utils/permission';
-
-/** 免验证白名单 */
-const whiteList = ['/login', '/reg', '/noPer'];
-
-// 导入所需的模块
-router.beforeEach((to, from, next) => {
-  const isAuthorized = kuky_Authorization.get(); // 获取用户授权状态
-  const isLoginPage = to.path === '/login'; // 判断目标路径是否为登录页
-  const firstLogin = from.path === '/login'; // 判断当前路径是否为登录页
-  const isInWhiteList = whiteList.includes(to.path); // 检查目标路径是否在白名单中
-  const hasAccess = accessFlatRoutes.some((route) => route.path == to.path);
-
-  // 用户已授权的情况
-  if (isAuthorized) {
-    if (firstLogin || isLoginPage) {
-      next(); // 如果是第一次登录,直接进入首页
-    } else if (!hasAccess && !isInWhiteList) {
-      // 如果用户无访问权限且不在白名单中
-      next({ path: '/noPer' }); // 重定向到无权限页面
-    } else {
-      next(); // 其他情况,正常访问
-    }
-  } else {
-    // 用户未授权的情况
-    if (isInWhiteList) {
-      // 如果目标路径在免登录白名单中
-      next(); // 允许进入
-    } else {
-      next('/login'); // 否则重定向到登录页面
-    }
-  }
-});

+ 34 - 0
src/router/index.js

@@ -1,6 +1,8 @@
 import { createRouter, createWebHashHistory } from 'vue-router';
 import { systemRoutes } from './route';
 import { accessRoutes } from '../utils/permission';
+import { kuky_Authorization } from '../base/storage';
+import { firstPage, accessFlatRoutes } from '../utils/permission';
 
 const router = createRouter({
   history: createWebHashHistory(),
@@ -8,4 +10,36 @@ const router = createRouter({
   scrollBehavior: () => ({ left: 0, top: 0 })
 });
 
+/** 免验证白名单 */
+const whiteList = ['/login', '/reg', '/noPer'];
+
+// 导入所需的模块
+router.beforeEach((to, from, next) => {
+  const isAuthorized = kuky_Authorization.get(); // 获取用户授权状态
+  const isLoginPage = to.path === '/login'; // 判断目标路径是否为登录页
+  const firstLogin = from.path === '/login'; // 判断当前路径是否为登录页
+  const isInWhiteList = whiteList.includes(to.path); // 检查目标路径是否在白名单中
+  const hasAccess = accessFlatRoutes.some((route) => route.path == to.path);
+
+  // 用户已授权的情况
+  if (isAuthorized) {
+    if (firstLogin || isLoginPage) {
+      next(); // 如果是第一次登录,直接进入首页
+    } else if (!hasAccess && !isInWhiteList) {
+      // 如果用户无访问权限且不在白名单中
+      next({ path: '/noPer' }); // 重定向到无权限页面
+    } else {
+      next(); // 其他情况,正常访问
+    }
+  } else {
+    // 用户未授权的情况
+    if (isInWhiteList) {
+      // 如果目标路径在免登录白名单中
+      next(); // 允许进入
+    } else {
+      next('/login'); // 否则重定向到登录页面
+    }
+  }
+});
+
 export default router;

+ 2 - 1
vite.config.mjs

@@ -21,7 +21,8 @@ export default defineConfig(({ mode }) => {
       host: '0.0.0.0', // IP配置,支持从IP启动
       proxy: {
         '/api/': {
-          target: 'http://smartai.com:8191',
+          target: 'http://smartai.com:8401',
+          // target: 'http://192.168.20.119:9301',
           changeOrigin: true,
           secure: false,
           ws: true,