From 1b9fb3069dd5aeaedab1d1815f607dc935ccf464 Mon Sep 17 00:00:00 2001 From: xuwentong Date: Sun, 30 Nov 2025 12:51:53 +0800 Subject: [PATCH] =?UTF-8?q?chore=EF=BC=9A=E8=B0=83=E6=95=B4=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=9C=B0=E5=9D=80https?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env/.env | 6 +++--- openapi-ts-request.config.ts | 2 +- src/utils/http.ts | 2 +- src/utils/index.ts | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/env/.env b/env/.env index 045dd6b..22210f9 100644 --- a/env/.env +++ b/env/.env @@ -10,9 +10,9 @@ VITE_APP_PUBLIC_BASE=/ # 登录页面 VITE_LOGIN_URL = '/pages/auth/index' -VITE_SERVER_BASEURL = 'http://mapi.xianglexue.com/api/v1' -VITE_DESKTOP_SERVER_BASEURL = 'http://api.xianglexue.com/api/v1' -VITE_UPLOAD_BASEURL = 'http://mapi.xianglexue.com/api/v1' +VITE_SERVER_BASEURL = 'https://mapi.xianglexue.com/api/v1' +VITE_DESKTOP_SERVER_BASEURL = 'https://api.xianglexue.com/api/v1' +VITE_UPLOAD_BASEURL = 'https://mapi.xianglexue.com/api/v1' # h5是否需要配置代理 VITE_APP_PROXY=false diff --git a/openapi-ts-request.config.ts b/openapi-ts-request.config.ts index 1d0f874..c09efe6 100644 --- a/openapi-ts-request.config.ts +++ b/openapi-ts-request.config.ts @@ -2,7 +2,7 @@ import type { GenerateServiceProps } from 'openapi-ts-request' export default [ { - schemaPath: 'http://mapi.xianglexue.com/apidoc/doc.json', + schemaPath: 'https://mapi.xianglexue.com/apidoc/doc.json', serversPath: './src/service', requestLibPath: `import request from '@/http/vue-query';\n import { CustomRequestOptions } from '@/http/types';`, requestOptionsType: 'CustomRequestOptions', diff --git a/src/utils/http.ts b/src/utils/http.ts index 179a281..f7456e7 100644 --- a/src/utils/http.ts +++ b/src/utils/http.ts @@ -9,7 +9,7 @@ import type { CustomRequestOptions } from '@/http/types' import { http, httpDelete, httpGet, httpPost, httpPut } from '@/http/http' // 桌面端 baseURL -const DESKTOP_BASE_URL = 'http://api.xianglexue.com/api/v1' +const DESKTOP_BASE_URL = 'https://api.xianglexue.com/api/v1' interface ControllerResponse { code?: number diff --git a/src/utils/index.ts b/src/utils/index.ts index 59661e1..9209da3 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -130,9 +130,9 @@ export function getEnvBaseUrl() { let baseUrl = import.meta.env.VITE_SERVER_BASEURL // # 有些同学可能需要在微信小程序里面根据 develop、trial、release 分别设置上传地址,参考代码如下。 - const VITE_SERVER_BASEURL__WEIXIN_DEVELOP = 'http://mapi.xianglexue.com/api/v1' - const VITE_SERVER_BASEURL__WEIXIN_TRIAL = 'http://mapi.xianglexue.com/api/v1' - const VITE_SERVER_BASEURL__WEIXIN_RELEASE = 'http://mapi.xianglexue.com/api/v1' + const VITE_SERVER_BASEURL__WEIXIN_DEVELOP = 'https://mapi.xianglexue.com/api/v1' + const VITE_SERVER_BASEURL__WEIXIN_TRIAL = 'https://mapi.xianglexue.com/api/v1' + const VITE_SERVER_BASEURL__WEIXIN_RELEASE = 'https://mapi.xianglexue.com/api/v1' // 微信小程序端环境区分 if (isMpWeixin) {