diff --git a/.env.development b/.env.development index 6161f509..6216ebf9 100644 --- a/.env.development +++ b/.env.development @@ -1,2 +1,5 @@ VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api -VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api \ No newline at end of file +VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api + +# 租户配置 +VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]' \ No newline at end of file diff --git a/.env.hella13 b/.env.hella13 index 3512fc6e..ac6a95bc 100644 --- a/.env.hella13 +++ b/.env.hella13 @@ -1,2 +1,5 @@ VITE_BASE_URL=http://172.21.32.13:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.21.32.13:81/admin-api \ No newline at end of file +VITE_BASE_URL_IMAGE=http://172.21.32.13:81/admin-api + +# 租户配置 +VITE_TENANT='[{"text":"长春","value":1}]' \ No newline at end of file diff --git a/.env.hella14 b/.env.hella14 index ba00ae52..496e1c4a 100644 --- a/.env.hella14 +++ b/.env.hella14 @@ -1,2 +1,5 @@ VITE_BASE_URL=http://172.21.32.14:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api \ No newline at end of file +VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api + +# 租户配置 +VITE_TENANT='[{"text":"长春","value":1}]' \ No newline at end of file diff --git a/.env.hella15 b/.env.hella15 index 054fde1c..b7e31d84 100644 --- a/.env.hella15 +++ b/.env.hella15 @@ -1,2 +1,5 @@ VITE_BASE_URL=http://172.21.32.15:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.21.32.15:81/admin-api \ No newline at end of file +VITE_BASE_URL_IMAGE=http://172.21.32.15:81/admin-api + +# 租户配置 +VITE_TENANT='[{"text":"长春","value":1}]' \ No newline at end of file diff --git a/.env.hella16 b/.env.hella16 index f53c372b..0f02f522 100644 --- a/.env.hella16 +++ b/.env.hella16 @@ -1,2 +1,5 @@ VITE_BASE_URL=http://172.21.32.16:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.21.32.16:81/admin-api \ No newline at end of file +VITE_BASE_URL_IMAGE=http://172.21.32.16:81/admin-api + +# 租户配置 +VITE_TENANT='[{"text":"长春","value":1}]' \ No newline at end of file diff --git a/.env.hella8 b/.env.hella8 index 0cc65e7d..d9348e22 100644 --- a/.env.hella8 +++ b/.env.hella8 @@ -1,2 +1,5 @@ VITE_BASE_URL=http://172.22.32.8:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.22.32.8:81/admin-api \ No newline at end of file +VITE_BASE_URL_IMAGE=http://172.22.32.8:81/admin-api + +# 租户配置 +VITE_TENANT='[{"text":"成都","value":2}]' \ No newline at end of file diff --git a/.env.hella9 b/.env.hella9 index d399e4d7..f032d6e2 100644 --- a/.env.hella9 +++ b/.env.hella9 @@ -1,2 +1,5 @@ VITE_BASE_URL=http://172.22.32.9:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api \ No newline at end of file +VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api + +# 租户配置 +VITE_TENANT='[{"text":"成都","value":2}]' \ No newline at end of file diff --git a/.env.test b/.env.test index c00b9fbb..c86eaa90 100644 --- a/.env.test +++ b/.env.test @@ -1,3 +1,6 @@ VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api -VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api \ No newline at end of file +VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api + +# 租户配置 +VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]' \ No newline at end of file diff --git a/src/api/httpRequest3.js b/src/api/httpRequest3.js index 29dd44a6..569f7345 100644 --- a/src/api/httpRequest3.js +++ b/src/api/httpRequest3.js @@ -3,7 +3,7 @@ import storage from '../common/utils/storage' function service(options = {}) { var token = storage.getStorage(storage.constant.token) - var tenantId = 1 + var tenantId = storage.getStorage('tenantId') // if(getApp()!=undefined){ // tenantId = getApp().globalData.tenantId // } diff --git a/src/api/request2.js b/src/api/request2.js index 44430cd5..7e8d277a 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -17,7 +17,7 @@ export function getCaptchaImage(params) { /** * 登录方法 */ -export function login(username, password, code, uuid) { +export function login(username, password, code, uuid,tenantName) { return request({ url: baseApi + '/system/auth/login', headers: { @@ -28,7 +28,8 @@ export function login(username, password, code, uuid) { username, password, code, - uuid + uuid, + tenantName } }) } diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 56faac26..0130e291 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -1,377 +1,391 @@ - - - + + \ No newline at end of file diff --git a/src/store/modules/user.js b/src/store/modules/user.js index dab7585d..06a8cb07 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -50,9 +50,9 @@ const user = { const password = userInfo.password const code = userInfo.code const uuid = userInfo.uuid - + const tenantName = userInfo.tenantName return new Promise((resolve, reject) => { - login(username, password, code, uuid).then(res => { + login(username, password, code, uuid,tenantName).then(res => { if(res.data){ res = res.data; // 设置 token