From d0b4a9a760d5c3f3b967d3c2e0a906c32b85b50f Mon Sep 17 00:00:00 2001 From: zhangheng Date: Mon, 16 Mar 2026 18:00:40 +0800 Subject: [PATCH] fix(env): fix --- .env.staging | 2 +- components/label/api/const.ts | 4 +++- components/login/api/index.ts | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.env.staging b/.env.staging index cf50bf9..1fd59f4 100644 --- a/.env.staging +++ b/.env.staging @@ -3,7 +3,7 @@ NEXT_PUBLIC_BASE_PATH="" NEXT_PUBLIC_ENV=staging # redis -NEXT_PUBLIC_REDIS_URL="172.16.112.128" +NEXT_PUBLIC_REDIS_URL="172.30.21.213" NEXT_PUBLIC_REDIS_PORT=9765 NEXT_PUBLIC_REDIS_PASSWORD=password NEXT_PUBLIC_REDIS_USERNAME=default diff --git a/components/label/api/const.ts b/components/label/api/const.ts index 25355ce..8b520b4 100644 --- a/components/label/api/const.ts +++ b/components/label/api/const.ts @@ -1,4 +1,6 @@ export const BASE_LABEL_API = process.env.NEXT_PUBLIC_ENV === "production" ? "https://label.cowarobot.com" - : "https://label.softtest.cowarobot.com" + : process.env.NEXT_PUBLIC_ENV === "staging" + ? "https://label.softtest.cowarobot.com" + : "https://label.softtest.cowarobot.com" diff --git a/components/login/api/index.ts b/components/login/api/index.ts index fe18dca..a4d5890 100644 --- a/components/login/api/index.ts +++ b/components/login/api/index.ts @@ -4,8 +4,10 @@ import { Login } from "./types" const BASE_PATH = process.env.NEXT_PUBLIC_ENV === "production" - ? "https://label.soft.cowarobot.com" - : "https://label.softtest.cowarobot.com" + ? "https://label.cowarobot.com" + : process.env.NEXT_PUBLIC_ENV === "staging" + ? "https://label.softtest.cowarobot.com" + : "https://label.softtest.cowarobot.com" // 获取验证码 export const getVerifyCode = (params: { phone: string }) => {