From 5408190f76ec736b0a705da24dc20cc77d72ea4b Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Wed, 29 Mar 2023 10:16:39 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20build:=20=E4=BF=AE=E6=94=B9ip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/api.js | 2 ++ src/pages/login/login.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/assets/api.js b/src/assets/api.js index c5fca8ac..7f4d0d01 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -9,11 +9,13 @@ if (process.env.NODE_ENV == 'test' || process.env.NODE_ENV == 'development') { // 测试环境 baseurl = 'http://192.168.6.75'; window.baseurl = 'http://192.168.6.75'; + window.unifiedUrl = 'http://test.user.1688sup.com/#/login'; /* 统一登录地址 */ } if (process.env.NODE_ENV == 'production') { // 生成环境 baseurl = 'https://marketapi.1688sup.com'; window.baseurl = 'https://marketapi.1688sup.com'; + window.unifiedUrl = 'https://user.1688sup.com/#/login'; /* 统一登录地址 */ } const upload = (method, url, params, responseType) => { let obj = { diff --git a/src/pages/login/login.js b/src/pages/login/login.js index 615b1aa2..55b3e9ae 100644 --- a/src/pages/login/login.js +++ b/src/pages/login/login.js @@ -30,7 +30,7 @@ export default class App extends Component { /* 跳转统一登录平台 */ toUnifiedLogin() { setTimeout(() => { - window.location.href = `http://test.user.1688sup.com/#/login?url=${encodeURIComponent( + window.location.href = `${window.unifiedUrl}?url=${encodeURIComponent( window.location.href )}`; }, 1500);