From 791a96ae03cf92478244127b294c1fe520d31e89 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期六, 11 十月 2025 11:17:10 +0800
Subject: [PATCH] 优化

---
 entry/src/main/ets/pages/home/ClassificationDetail.ets |    4 ++--
 entry/src/main/ets/pages/account/CourseCollection.ets  |    2 +-
 entry/src/main/ets/pages/login/SignInPage.ets          |    4 ++--
 entry/src/main/ets/pages/home/BannerDetail.ets         |    4 ++--
 entry/src/main/ets/utils/config.ets                    |    3 ++-
 entry/src/main/ets/pages/account/UserInfoPage.ets      |    6 +++---
 entry/src/main/ets/pages/home/ActiveDetail.ets         |    4 ++--
 entry/src/main/ets/pages/search/SearchPage.ets         |    7 ++++---
 entry/src/main/ets/pages/home/Home.ets                 |   12 ++++++------
 entry/src/main/ets/pages/account/AccountPage.ets       |    4 ++--
 entry/src/main/ets/pages/login/LoginPage.ets           |    4 ++--
 11 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/entry/src/main/ets/pages/account/AccountPage.ets b/entry/src/main/ets/pages/account/AccountPage.ets
index 24ce7b6..9da5a55 100644
--- a/entry/src/main/ets/pages/account/AccountPage.ets
+++ b/entry/src/main/ets/pages/account/AccountPage.ets
@@ -3,7 +3,7 @@
 import { http } from "@kit.NetworkKit";
 import { HttpResponseResult } from "../../data/HttpResponse";
 import { common } from "@kit.AbilityKit";
-import { ROMAIN } from "../../utils/config";
+import { DOMAIN } from "../../utils/config";
 
 export class UserInfo {
   nickName: string = ''
@@ -117,7 +117,7 @@
   getUserInfo() {
     let httpRequest = http.createHttp();
     httpRequest.request(
-      `${ROMAIN}/quiz-community/public/v1.0/users/userinfo`,
+      `${DOMAIN}/quiz-community/public/v1.0/users/userinfo`,
       {
         method: http.RequestMethod.GET,
         header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` },
diff --git a/entry/src/main/ets/pages/account/CourseCollection.ets b/entry/src/main/ets/pages/account/CourseCollection.ets
index 171144f..1f44c4a 100644
--- a/entry/src/main/ets/pages/account/CourseCollection.ets
+++ b/entry/src/main/ets/pages/account/CourseCollection.ets
@@ -109,7 +109,7 @@
               .border({ width: 1, style: BorderStyle.Solid, color: '#f2f2f2' })
               .borderRadius(10)
             }
-          }, (index: number) => index.toString())
+          })
         }
         .listDirection(Axis.Vertical) // 鎺掑垪鏂瑰悜
         .scrollBar(BarState.Off)
diff --git a/entry/src/main/ets/pages/account/UserInfoPage.ets b/entry/src/main/ets/pages/account/UserInfoPage.ets
index 275f0bb..237d6a6 100644
--- a/entry/src/main/ets/pages/account/UserInfoPage.ets
+++ b/entry/src/main/ets/pages/account/UserInfoPage.ets
@@ -1,7 +1,7 @@
 import { promptAction, router } from "@kit.ArkUI"
 import { http } from "@kit.NetworkKit"
 import { HttpResponseResult } from "../../data/HttpResponse"
-import { ROMAIN } from "../../utils/config"
+import { DOMAIN } from "../../utils/config"
 import { UserInfo } from "./AccountPage"
 
 @Entry
@@ -30,7 +30,7 @@
   getUserInfo() {
     let httpRequest = http.createHttp();
     httpRequest.request(
-      `${ROMAIN}/quiz-community/public/v1.0/users/userinfo`,
+      `${DOMAIN}/quiz-community/public/v1.0/users/userinfo`,
       {
         method: http.RequestMethod.GET,
         header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` },
@@ -62,7 +62,7 @@
       introduce: this.userInfo.introduce
     }
     httpRequest.request(
-      `${ROMAIN}/quiz-community/public/v1.0/users/userinfo`,
+      `${DOMAIN}/quiz-community/public/v1.0/users/userinfo`,
       {
         method: http.RequestMethod.PUT,
         header: { 'Content-Type': 'application/json' },
diff --git a/entry/src/main/ets/pages/home/ActiveDetail.ets b/entry/src/main/ets/pages/home/ActiveDetail.ets
index 93bb3ee..8c74d7a 100644
--- a/entry/src/main/ets/pages/home/ActiveDetail.ets
+++ b/entry/src/main/ets/pages/home/ActiveDetail.ets
@@ -2,7 +2,7 @@
 import { http } from "@kit.NetworkKit"
 import { LvMarkdownIn } from "@luvi/lv-markdown-in"
 import { HttpResponseResult } from "../../data/HttpResponse"
-import { ROMAIN } from "../../utils/config"
+import { DOMAIN } from "../../utils/config"
 
 class Activity {
   id: string = ''
@@ -41,7 +41,7 @@
   getDetail() {
     let httpRequest = http.createHttp();
     httpRequest.request(
-      `${ROMAIN}/quiz-community/public/v1.0/home/hotTraining/details?hotTrainingId=${this.hotTrainingId}`,
+      `${DOMAIN}/quiz-community/public/v1.0/home/hotTraining/details?hotTrainingId=${this.hotTrainingId}`,
       {
         method: http.RequestMethod.GET,
         header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` },
diff --git a/entry/src/main/ets/pages/home/BannerDetail.ets b/entry/src/main/ets/pages/home/BannerDetail.ets
index 3515a22..3617065 100644
--- a/entry/src/main/ets/pages/home/BannerDetail.ets
+++ b/entry/src/main/ets/pages/home/BannerDetail.ets
@@ -2,7 +2,7 @@
 import { http } from "@kit.NetworkKit";
 import { HttpResponseResult } from "../../data/HttpResponse";
 import { LvMarkdownIn } from "@luvi/lv-markdown-in"
-import { ROMAIN } from "../../utils/config";
+import { DOMAIN } from "../../utils/config";
 
 class BannerInfo {
   pic: string = ''
@@ -33,7 +33,7 @@
   getDetail() {
     let httpRequest = http.createHttp();
     httpRequest.request(
-      `${ROMAIN}/quiz-community/public/v1.0/home/slideshows/details?bannerId=${this.bannerId}`,
+      `${DOMAIN}/quiz-community/public/v1.0/home/slideshows/details?bannerId=${this.bannerId}`,
       {
         method: http.RequestMethod.GET,
         header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` },
diff --git a/entry/src/main/ets/pages/home/ClassificationDetail.ets b/entry/src/main/ets/pages/home/ClassificationDetail.ets
index ae5cc86..0a65b66 100644
--- a/entry/src/main/ets/pages/home/ClassificationDetail.ets
+++ b/entry/src/main/ets/pages/home/ClassificationDetail.ets
@@ -2,7 +2,7 @@
 import { http } from "@kit.NetworkKit"
 import { LvMarkdownIn } from "@luvi/lv-markdown-in"
 import { HttpResponseResult } from "../../data/HttpResponse"
-import { ROMAIN } from "../../utils/config"
+import { DOMAIN } from "../../utils/config"
 
 @Entry
 @Component
@@ -21,7 +21,7 @@
   getDetail() {
     let httpRequest = http.createHttp();
     httpRequest.request(
-      `${ROMAIN}/quiz-community/public/v1.0/home/module/details?moduleName=${this.moduleName}`,
+      `${DOMAIN}/quiz-community/public/v1.0/home/module/details?moduleName=${this.moduleName}`,
       {
         method: http.RequestMethod.GET,
         header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` },
diff --git a/entry/src/main/ets/pages/home/Home.ets b/entry/src/main/ets/pages/home/Home.ets
index 6a3bf19..f4369e9 100644
--- a/entry/src/main/ets/pages/home/Home.ets
+++ b/entry/src/main/ets/pages/home/Home.ets
@@ -2,7 +2,7 @@
 import http from '@ohos.net.http';
 import { HttpResponseResult } from "../../data/HttpResponse";
 import { JSON } from "@kit.ArkTS";
-import { ROMAIN } from "../../utils/config";
+import { DOMAIN } from "../../utils/config";
 
 class TabBarBase {
   title: string = ''
@@ -144,7 +144,7 @@
   getBannerList() {
     let httpRequest = http.createHttp();
     httpRequest.request(
-      `${ROMAIN}/quiz-community/public/v1.0/home/slideshows`,
+      `${DOMAIN}/quiz-community/public/v1.0/home/slideshows`,
       {
         method: http.RequestMethod.GET,
         header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` },
@@ -167,7 +167,7 @@
   getActivityList() {
     let httpRequest = http.createHttp();
     httpRequest.request(
-      `${ROMAIN}/quiz-community/public/v1.0/home/hotTraining`,
+      `${DOMAIN}/quiz-community/public/v1.0/home/hotTraining`,
       {
         method: http.RequestMethod.GET,
         header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` },
@@ -190,7 +190,7 @@
   getCourseList() {
     let httpRequest = http.createHttp();
     httpRequest.request(
-      `${ROMAIN}/quiz-community/public/v1.0/home/courses`,
+      `${DOMAIN}/quiz-community/public/v1.0/home/courses`,
       {
         method: http.RequestMethod.GET,
         header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` },
@@ -344,7 +344,7 @@
                         })
                       })
                     }
-                  }, (index: number) => index.toString())
+                  })
                 }
                 .listDirection(Axis.Vertical) // 鎺掑垪鏂瑰悜
                 .scrollBar(BarState.Off)
@@ -437,7 +437,7 @@
                       .border({ width: 1, style: BorderStyle.Solid, color: '#f2f2f2' })
                       .borderRadius(10)
                     }
-                  }, (index: number) => index.toString())
+                  })
                 }
                 .listDirection(Axis.Vertical) // 鎺掑垪鏂瑰悜
                 .scrollBar(BarState.Off)
diff --git a/entry/src/main/ets/pages/login/LoginPage.ets b/entry/src/main/ets/pages/login/LoginPage.ets
index c3e9a96..d8685e5 100644
--- a/entry/src/main/ets/pages/login/LoginPage.ets
+++ b/entry/src/main/ets/pages/login/LoginPage.ets
@@ -4,7 +4,7 @@
 import http from '@ohos.net.http';
 import { HttpResponseResult } from '../../data/HttpResponse';
 import { JSON } from '@kit.ArkTS';
-import { ROMAIN } from '../../utils/config';
+import { DOMAIN } from '../../utils/config';
 
 /**
  * @Description : 鐧诲綍椤�
@@ -68,7 +68,7 @@
     }
 
     httpRequest.request(
-      `${ROMAIN}/quiz-community/public/v1.0/users/login`,
+      `${DOMAIN}/quiz-community/public/v1.0/users/login`,
       {
         method: http.RequestMethod.PUT,
         header: { 'Content-Type': 'application/json' },
diff --git a/entry/src/main/ets/pages/login/SignInPage.ets b/entry/src/main/ets/pages/login/SignInPage.ets
index cb0235a..3679f14 100644
--- a/entry/src/main/ets/pages/login/SignInPage.ets
+++ b/entry/src/main/ets/pages/login/SignInPage.ets
@@ -3,7 +3,7 @@
 import { HttpResponseResult } from '../../data/HttpResponse';
 import { ComponentContent } from '@kit.ArkUI';
 import { PromptActionClass } from '../../utils/PromptActionClass';
-import { ROMAIN } from '../../utils/config';
+import { DOMAIN } from '../../utils/config';
 
 class DialogParams {
   text: string = "";
@@ -91,7 +91,7 @@
     }
 
     httpRequest.request(
-      `${ROMAIN}/quiz-community/public/v1.0/users/register`,
+      `${DOMAIN}/quiz-community/public/v1.0/users/register`,
       {
         method: http.RequestMethod.POST,
         header: { 'Content-Type': 'application/json' },
diff --git a/entry/src/main/ets/pages/search/SearchPage.ets b/entry/src/main/ets/pages/search/SearchPage.ets
index 8cf6fa6..e52fe0a 100644
--- a/entry/src/main/ets/pages/search/SearchPage.ets
+++ b/entry/src/main/ets/pages/search/SearchPage.ets
@@ -2,7 +2,7 @@
 import { http } from "@kit.NetworkKit"
 import { LvMarkdownIn } from "@luvi/lv-markdown-in"
 import { HttpResponseResult } from "../../data/HttpResponse"
-import { ROMAIN } from "../../utils/config"
+import { DOMAIN } from "../../utils/config"
 
 class JobItem {
   ability: string = ''
@@ -29,7 +29,7 @@
   getJobList() {
     let httpRequest = http.createHttp();
     httpRequest.request(
-      `${ROMAIN}/quiz-community/public/v1.0/home/seek/job`,
+      `${DOMAIN}/quiz-community/public/v1.0/home/seek/job`,
       {
         method: http.RequestMethod.GET,
         header: { 'Content-Type': 'application/json', 'x-jwt-token': `Bearer ${AppStorage.get('x-jwt-token')}` },
@@ -56,6 +56,7 @@
         return ele.companyName.includes(this.searchKeyword) || ele.jobName.includes(this.searchKeyword)
       })
       this.jobList = list
+      console.log(JSON.stringify(list))
     } else {
       this.jobList = this.origJobList
     }
@@ -188,7 +189,7 @@
             .border({ width: 1, style: BorderStyle.Solid, color: this.expandIndex == index ? '#1756f4' : '#f2f2f2' })
             .borderRadius(10)
           }
-        }, (index: number) => index.toString())
+        })
       }
       .listDirection(Axis.Vertical) // 鎺掑垪鏂瑰悜
       .scrollBar(BarState.Off)
diff --git a/entry/src/main/ets/utils/config.ets b/entry/src/main/ets/utils/config.ets
index 5eb1fa1..b703feb 100644
--- a/entry/src/main/ets/utils/config.ets
+++ b/entry/src/main/ets/utils/config.ets
@@ -1 +1,2 @@
-export const ROMAIN = 'http://192.168.20.70:8080'
\ No newline at end of file
+// export const DOMAIN = 'http://192.168.20.70:8080'
+export const DOMAIN = 'http://124.70.31.13:7776'
\ No newline at end of file

--
Gitblit v1.8.0