|  | @@ -5,7 +5,8 @@
 | 
	
		
			
				|  |  |             ref="loginForm"
 | 
	
		
			
				|  |  |             :model="loginForm"
 | 
	
		
			
				|  |  |             label-width="0">
 | 
	
		
			
				|  |  | -    <el-form-item v-if="tenantMode" prop="tenantId">
 | 
	
		
			
				|  |  | +<!--    <el-form-item v-if="tenantMode" prop="tenantId">-->
 | 
	
		
			
				|  |  | +    <el-form-item v-if="saveTenantId == ''" prop="tenantId">
 | 
	
		
			
				|  |  |        <el-input size="small"
 | 
	
		
			
				|  |  |                  @keyup.enter.native="handleLogin"
 | 
	
		
			
				|  |  |                  v-model="loginForm.tenantId"
 | 
	
	
		
			
				|  | @@ -80,6 +81,7 @@
 | 
	
		
			
				|  |  |    import {getCaptcha} from "@/api/user";
 | 
	
		
			
				|  |  |    import {getTopUrl} from "@/util/util";
 | 
	
		
			
				|  |  |    import CryptoJS from '@/util/crypto'
 | 
	
		
			
				|  |  | +  import {getDomainName} from '@/api/login';
 | 
	
		
			
				|  |  |    export default {
 | 
	
		
			
				|  |  |      name: "userlogin",
 | 
	
		
			
				|  |  |      data() {
 | 
	
	
		
			
				|  | @@ -165,13 +167,20 @@
 | 
	
		
			
				|  |  |                }],
 | 
	
		
			
				|  |  |              },
 | 
	
		
			
				|  |  |            ]
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        saveTenantId: '',
 | 
	
		
			
				|  |  |        };
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    created() {
 | 
	
		
			
				|  |  | +    async created() {
 | 
	
		
			
				|  |  |        this.getTenant();
 | 
	
		
			
				|  |  |        this.refreshCode();
 | 
	
		
			
				|  |  | -      if(localStorage.getItem("tenantId")) this.loginForm.tenantId = CryptoJS.decrypt(localStorage.getItem("tenantId")) //租户ID
 | 
	
		
			
				|  |  | +      await getDomainName(window.location.hostname).then(res => {
 | 
	
		
			
				|  |  | +        this.saveTenantId = res.data.data.tenantId? res.data.data.tenantId: '';
 | 
	
		
			
				|  |  | +        this.loginForm.tenantId = res.data.data.tenantId? res.data.data.tenantId: '';
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +      if (this.saveTenantId == '') {
 | 
	
		
			
				|  |  | +        if(localStorage.getItem("tenantId")) this.loginForm.tenantId = CryptoJS.decrypt(localStorage.getItem("tenantId")) //租户ID
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |        if(localStorage.getItem("username")) this.loginForm.username = CryptoJS.decrypt(localStorage.getItem("username")) //用户名
 | 
	
		
			
				|  |  |        if(localStorage.getItem("password")) this.loginForm.password = CryptoJS.decrypt(localStorage.getItem("password")) //密码
 | 
	
		
			
				|  |  |        if(localStorage.getItem("rememberMe")) this.rememberMe = JSON.parse(localStorage.getItem("rememberMe"))
 | 
	
	
		
			
				|  | @@ -201,7 +210,8 @@
 | 
	
		
			
				|  |  |      computed: {
 | 
	
		
			
				|  |  |        ...mapGetters(["tagWel", "userInfo"])
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    props: [],
 | 
	
		
			
				|  |  | +    props: {
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      methods: {
 | 
	
		
			
				|  |  |        refreshCode() {
 | 
	
		
			
				|  |  |          if (this.website.captchaMode) {
 |