Browse Source

修改接口请求端口

lcl 1 tuần trước cách đây
mục cha
commit
841e79d0b1
5 tập tin đã thay đổi với 7 bổ sung7 xóa
  1. 1 1
      src/api/user.ts
  2. 1 1
      src/utils/OSSupload.ts
  3. 2 2
      src/utils/getUrl/getUrl.js
  4. 2 2
      src/utils/http/index.ts
  5. 1 1
      vite.config.ts

+ 1 - 1
src/api/user.ts

@@ -50,7 +50,7 @@ export type RefreshTokenResult = {
 export const getLogin = (data?: object) => {
   console.log(data);
   return http.login(
-    "http://localhost:5801/v1/tel/sysServer/oauth2/token",
+    "http://localhost:5802/v1/tel/sysServer/oauth2/token",
     data
   );
 };

+ 1 - 1
src/utils/OSSupload.ts

@@ -26,7 +26,7 @@ const Ossupload = function (data, Filename = "TelAdmin/upload") {
   // eslint-disable-next-line no-async-promise-executor
   return new Promise(async (r, j) => {
     const res: Res = await http.post(
-      "http://localhost:5801/api/ossparam?t=",
+      "http://localhost:5802/api/ossparam?t=",
       {}
     );
     const client = new OSS({

+ 2 - 2
src/utils/getUrl/getUrl.js

@@ -64,7 +64,7 @@ const getURL = () => {
 const getAllPlate = () => {
   return new Promise(async (resolve, reject) => {
     postRequest(
-      "http://localhost:5801/noauth/api/groupsforadmin",
+      "http://localhost:5802/noauth/api/groupsforadmin",
       {
         key: "tel#2024"
       }
@@ -99,7 +99,7 @@ const getGroupUrl = async (checkPlate = []) => {
       );
     }, 5000);
     postRequest(
-      "http://localhost:5801/noauth/api/listforadmin",
+      "http://localhost:5802/noauth/api/listforadmin",
       parameters
     )
       .then(async res => {

+ 2 - 2
src/utils/http/index.ts

@@ -192,7 +192,7 @@ class PureHttp {
     axiosConfig?: PureHttpRequestConfig
   ): Promise<T> {
     //本地调试配置
-    url = url.replace("http://localhost:5801", "/aapi")
+    url = url.replace("http://localhost:5802", "/aapi")
     const config = {
       method: "post",
       url:
@@ -236,7 +236,7 @@ class PureHttp {
     axiosConfig?: PureHttpRequestConfig
   ): any {
     //本地调试配置
-    url = url.replace("http://localhost:5801", "/aapi")
+    url = url.replace("http://localhost:5802", "/aapi")
     const config = {
       method,
       url,

+ 1 - 1
vite.config.ts

@@ -54,7 +54,7 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
       proxy: {
         "/aapi": {
           // 这里填写后端地址
-          target: "http://localhost:5801",
+          target: "http://localhost:5802",
           changeOrigin: true,
           rewrite: path => path.replace(/^\/aapi/, "")
         }