Forráskód Böngészése

feat: 修改接口地址

zhuozh 10 hónapja
szülő
commit
30bc3837ec
2 módosított fájl, 11 hozzáadás és 4 törlés
  1. 6 2
      src/appConfig.ts
  2. 5 2
      src/pages/home/index.tsx

+ 6 - 2
src/appConfig.ts

@@ -1,6 +1,12 @@
 // 全局静态配置
 const Global = {
   apiBasePath: '/api', // 接口名称统一前缀
+  // 聊天接口
+  LeisurePath:
+    'http://136.6.202.47:8888/ai/aiFactoryServer/v1/apis/1/nlp-llm-digital-cq-chat-service:1.0@alpha.fixed',
+  // 写作接口
+  Specialty:
+    'http://136.6.202.47:8888/ai/aiFactoryServer/v1/apis/1/nlp-llm-digital-cq-writing-service:1.0@alpha.fixed',
 };
 
 export const NOTIFICATION_TYPES = {
@@ -32,5 +38,3 @@ export const CODE_MESSAGE: any = {
 } as const;
 
 export default Global;
-
-

+ 5 - 2
src/pages/home/index.tsx

@@ -1,3 +1,4 @@
+import Global from '@/appConfig';
 import darkcd from '@/assets/dark/application-two.png';
 import badTwo from '@/assets/dark/bad-two-l.png';
 import darkdz2 from '@/assets/dark/bad-two.png';
@@ -89,7 +90,8 @@ const Home: React.FC = () => {
    */
   const getSpecialtySearchValue = async () => {
     const resp = await fetch(
-      `http://136.6.202.47:8888/ai/aiFactoryServer/v1/apis/1/nlp-llm-digital-cq-baichuan2-service:1.0@alpha.fixed/LLM4Writing`,
+      // `http://136.6.202.47:8888/ai/aiFactoryServer/v1/apis/1/nlp-llm-digital-cq-baichuan2-service:1.0@alpha.fixed/LLM4Writing`,
+      Global.Specialty,
       {
         method: 'post',
         headers: {
@@ -155,7 +157,8 @@ const Home: React.FC = () => {
    */
   const getLeisureSearchValue = async () => {
     const resp = await fetch(
-      `http://136.6.202.47:8888/ai/aiFactoryServer/v1/apis/1/nlp-llm-digital-cq-chat-service:1.0@alpha.fixed`,
+      // `http://136.6.202.47:8888/ai/aiFactoryServer/v1/apis/1/nlp-llm-digital-cq-chat-service:1.0@alpha.fixed`,
+      Global.LeisurePath,
       {
         method: 'post',
         headers: {