| 
					
				 | 
			
			
				@@ -6,6 +6,12 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <h3 class="title">互联网医院医生端</h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-radio-group v-model="loginForm.type"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-radio-button label="1">医生</el-radio-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-radio-button label="2">药剂师</el-radio-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-radio-group> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-form-item prop="account"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-input v-model="loginForm.account" type="text" auto-complete="off" placeholder="账号"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" /> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -79,7 +85,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         password: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         rememberMe: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         code: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        uuid: "" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        uuid: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        type:'1', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       loginRules: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         account: [ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -118,8 +125,10 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getCookie() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const account = Cookies.get("account"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const password = Cookies.get("password"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      const rememberMe = Cookies.get('rememberMe') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const rememberMe = Cookies.get('rememberMe'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 使用扩展运算符保留原来 loginForm 中的属性,包括 type 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.loginForm = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ...this.loginForm, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         account: account === undefined ? this.loginForm.account : account, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         password: password === undefined ? this.loginForm.password : decrypt(password), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         rememberMe: rememberMe === undefined ? false : Boolean(rememberMe) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -138,7 +147,10 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Cookies.remove("password"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Cookies.remove('rememberMe'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.loginForm.type=1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          // 记录登录类型以便 Sidebar Logo 动态展示标题 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            localStorage.setItem('loginType', this.loginForm.type) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } catch (e) {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.$store 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             .dispatch("Login", this.loginForm) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             .then((res) => { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -174,8 +186,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     overflow: hidden; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     background: #ffffff; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .img-box{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      width: 420px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      height: 420px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      width: 460px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      height: 460px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       img{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         width: 100%; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         height: 100%; 
			 |