From ca25af5a954f8d5974e1ddbf7ca03827d99e2c77 Mon Sep 17 00:00:00 2001
From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com>
Date: Wed, 15 May 2024 14:44:51 +0800
Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E7=A7=9F=E6=88=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 5 ++++-
.env.test | 3 +++
.env.test-scp | 4 ++++
.env.wyf | 7 +++++--
src/views/login/components/LoginForm.vue | 15 ++++++++++++---
src/views/login/components/MobileForm.vue | 15 ++++++++++++---
6 files changed, 40 insertions(+), 9 deletions(-)
diff --git a/.env.development b/.env.development
index 78976cddd..7ffad86e9 100644
--- a/.env.development
+++ b/.env.development
@@ -34,4 +34,7 @@ VITE_OUT_DIR=dist
VITE_INTERFACE_URL='http://localhost:12080/magic/web/index.html'
# 积木报表请求路径
-VITE_JMREPORT_BASE_URL='http://localhost:12080'
\ No newline at end of file
+VITE_JMREPORT_BASE_URL='http://localhost:12080'
+
+# 租户配置
+VITE_TENANT='["长春","成都"]'
\ No newline at end of file
diff --git a/.env.test b/.env.test
index a42a17cd3..27d463213 100644
--- a/.env.test
+++ b/.env.test
@@ -35,3 +35,6 @@ VITE_INTERFACE_URL='http://dev.ccwin-in.com:25310/magic/web/index.html'
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310'
+
+# 租户配置
+VITE_TENANT='["长春","成都"]'
\ No newline at end of file
diff --git a/.env.test-scp b/.env.test-scp
index a68d25459..e64386900 100644
--- a/.env.test-scp
+++ b/.env.test-scp
@@ -35,3 +35,7 @@ VITE_INTERFACE_URL='http://dev.ccwin-in.com:25311/magic/web/index.html'
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25311'
+
+
+# 租户配置
+VITE_TENANT='["长春","成都"]'
diff --git a/.env.wyf b/.env.wyf
index 4c5de71c6..ae1a58502 100644
--- a/.env.wyf
+++ b/.env.wyf
@@ -4,9 +4,9 @@ NODE_ENV=test
VITE_DEV=false
# 请求路径
-VITE_BASE_URL='http://192.168.0.113:12080'
+VITE_BASE_URL='http://192.168.0.108:12080'
# 上传路径
-VITE_UPLOAD_URL='http://192.168.0.113:12080/admin-api/infra/file/upload'
+VITE_UPLOAD_URL='http://192.168.0.108:12080/admin-api/infra/file/upload'
# # 请求路径
# VITE_BASE_URL='http://dev.ccwin-in.com:25300/api'
@@ -46,3 +46,6 @@ VITE_JMREPORT_BASE_URL='http://192.168.0.108:12080'
# # 积木报表请求路径
# VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310'
+
+# 租户配置
+VITE_TENANT='["长春","成都"]'
\ No newline at end of file
diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue
index 6f79ce15e..67607c1dc 100644
--- a/src/views/login/components/LoginForm.vue
+++ b/src/views/login/components/LoginForm.vue
@@ -9,8 +9,16 @@
-
+
+
+
+
@@ -110,6 +118,7 @@
// 验证码开关
const captchaEnabled = ref(true);
const codeUrl = ref("");
+ const tenantArray = JSON.parse(import.meta.env.VITE_TENANT);
const LoginRules = {
tenantName: [required],
@@ -121,7 +130,7 @@
captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE,
tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE,
loginForm: {
- tenantName: '闻荫源码',
+ tenantName: tenantArray[0],
username: 'admin',
password: '123456',
captchaVerification: '',
diff --git a/src/views/login/components/MobileForm.vue b/src/views/login/components/MobileForm.vue
index fa42de03d..1d7038231 100644
--- a/src/views/login/components/MobileForm.vue
+++ b/src/views/login/components/MobileForm.vue
@@ -18,13 +18,21 @@
-
+ /> -->
+
+
+
@@ -117,6 +125,7 @@ const iconCircleCheck = useIcon({ icon: 'ep:circle-check' })
const { validForm } = useFormValid(formSmsLogin)
const { handleBackLogin, getLoginState } = useLoginState()
const getShow = computed(() => unref(getLoginState) === LoginStateEnum.MOBILE)
+const tenantArray = JSON.parse(import.meta.env.VITE_TENANT);
const rules = {
tenantName: [required],
@@ -132,7 +141,7 @@ const loginData = reactive({
},
loginForm: {
uuid: '',
- tenantName: '闻荫源码',
+ tenantName: tenantArray[0],
mobileNumber: '',
code: ''
}