loginOne.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. <template>
  2. <div class="login-page scrollbar-box">
  3. <img class="logo-img" :src="rectangleLogo">
  4. <div class="title-img-box">
  5. <div>
  6. <img class="title-img" src="@/assets/ZDimages/login/title_icon_one.png">
  7. <!--<p>v 2.0</p>-->
  8. </div>
  9. </div>
  10. <div class="form-box">
  11. <div class="form-title-box">
  12. <p class="form-title-null"></p>
  13. <p class="form-title-p" :class="loginType==1?'form-title-p-color':''" @click="loginTypeClick(1)">密码登录</p>
  14. <p class="form-title-p" :class="loginType==2?'form-title-p-color':''" @click="loginTypeClick(2)">短信登录</p>
  15. <p class="form-title-null"></p>
  16. </div>
  17. <el-form ref="loginForm"v-show="loginType == 1"
  18. :model="loginForm" :rules="loginRules" class="login-form-one">
  19. <div class="username-input-box" :class="userTypeCode == 1||userTypeCode == 4?'username-input-box-code':''">
  20. <img src="@/assets/ZDimages/login/icon_dl_zh.png" alt="">
  21. <input type="text" v-model="loginForm.username" placeholder="请输入账号" maxlength="20" @keyup.enter="handleLogin(1)">
  22. </div>
  23. <div class="password-input-box" :class="userTypeCode == 2||userTypeCode == 4?'username-input-box-code':''">
  24. <img src="@/assets/ZDimages/login/icon_dl_mm.png" alt="">
  25. <input type="password" v-model="loginForm.password" placeholder="请输入密码" maxlength="20" @keyup.enter="handleLogin">
  26. </div>
  27. <p class="text-p">{{text}}</p>
  28. <div class="code-input-box">
  29. <div class="code-input-left-box" :class="userTypeCode == 3||userTypeCode == 5?'username-input-box-code':''">
  30. <img src="@/assets/ZDimages/login/icon_dl_yzm.png" alt="">
  31. <input type="text" v-model="loginForm.code" placeholder="请输入验证码" maxlength="4" @keyup.enter="handleLogin(1)">
  32. </div>
  33. <div class="login-code">
  34. <img :src="codeUrl" @click="getCodeOne" class="login-code-img"/>
  35. </div>
  36. </div>
  37. <el-form-item>
  38. <el-button
  39. class="form-button-p"
  40. :loading="loading"
  41. size="medium"
  42. height="50"
  43. @click.native.prevent="handleLogin(1)"
  44. >
  45. <span v-if="!loading">登 录</span>
  46. <span v-else>登 录 中...</span>
  47. </el-button>
  48. <div style="float: right;" v-if="register">
  49. <router-link class="link-type" :to="'/register'">立即注册</router-link>
  50. </div>
  51. </el-form-item>
  52. </el-form>
  53. <el-form ref="loginFormTwo" v-show="loginType == 2"
  54. :model="loginFormTwo" :rules="loginRulesTwo" class="login-form-two">
  55. <div class="username-input-box">
  56. <img src="@/assets/ZDimages/medicUniversity-3_1/user.png" alt="">
  57. <p>
  58. <span>+86</span>
  59. <span>丨</span>
  60. </p>
  61. <input type="text" v-model="loginFormTwo.username" placeholder="请输入联系方式"
  62. onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"
  63. maxlength="11">
  64. </div>
  65. <p class="text-p">{{textTwo}}</p>
  66. <div class="code-input-box">
  67. <div class="code-input-left-box">
  68. <img src="@/assets/ZDimages/medicUniversity-3_1/code.png" alt="">
  69. <input type="text" v-model="loginFormTwo.password" placeholder="请输入验证码"
  70. onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"
  71. maxlength="6">
  72. </div>
  73. <div class="login-code" :class="codeNum>0?'login-code-one':'login-code-two'" @click="getCode">
  74. 获取验证码 {{codeNum>0?'('+codeNum+')':''}}
  75. <!--<img :src="codeUrl" @click="getCode" class="login-code-img"/>-->
  76. </div>
  77. </div>
  78. <el-form-item>
  79. <el-button
  80. class="form-button-p"
  81. :loading="loading"
  82. size="medium"
  83. height="50"
  84. @click.native.prevent="handleLogin(2)"
  85. >
  86. <span v-if="!loading">登 录</span>
  87. <span v-else>登 录 中...</span>
  88. </el-button>
  89. </el-form-item>
  90. </el-form>
  91. </div>
  92. <p class="introduction-p">技术支持:江苏忠江智能科技有限公司</p>
  93. </div>
  94. </template>
  95. <script>
  96. import Cookies from "js-cookie";
  97. import { encrypt, decrypt } from '@/utils/jsencrypt'
  98. import store from '@/store'
  99. import { getCodeImg,initPage,sendCode,phoneLogin } from "@/api/login";
  100. import { getRouters } from "@/api/menu";
  101. import { getLogoInfo } from "@/api/system/publicConfig";
  102. export default {
  103. name: "login",
  104. data() {
  105. return {
  106. loading:false,
  107. loginType:1,
  108. //账号登录
  109. loginForm: {
  110. username: "",
  111. password: "",
  112. rememberMe: false,
  113. code: "",
  114. uuid: "",
  115. },
  116. text:"",
  117. userTypeCode:"",
  118. codeUrl: "",
  119. captchaOnOff: true,
  120. register: false,
  121. redirect: undefined,
  122. loginRules: {
  123. // username: [
  124. // { required: true, trigger: "blur", message: "请输入您的账号" }
  125. // ],
  126. // password: [
  127. // { required: true, trigger: "blur", message: "请输入您的密码" }
  128. // ],
  129. // code: [{ required: true, trigger: "change", message: "请输入验证码" }]
  130. },
  131. //手机登录
  132. loginFormTwo:{
  133. username:"",
  134. password:"",
  135. },
  136. textTwo:"",
  137. rectangleLogo:localStorage.getItem('rectangleLogo'),
  138. loginRulesTwo:{
  139. username: [
  140. { required: true, message: "请输入手机号码", trigger: "blur" },
  141. { required: true, message: "请输入手机号码", validator: this.spaceJudgment, trigger: "blur" }
  142. ],
  143. password: [
  144. { required: true, message: "请输入验证码", trigger: "blur" },
  145. { required: true, message: "请输入验证码", validator: this.spaceJudgment, trigger: "blur" }
  146. ],
  147. },
  148. timer:null,
  149. codeButtonType:true,
  150. codeNum:"",
  151. }
  152. },
  153. watch: {
  154. $route: {
  155. handler: function(route) {
  156. this.redirect = route.query && route.query.redirect;
  157. },
  158. immediate: true
  159. }
  160. },
  161. created(){
  162. localStorage.setItem('windowHref',window.location.href)
  163. this.getCodeOne();
  164. this.getCookie();
  165. },
  166. mounted(){
  167. this.getLogoInfo();
  168. this.initPage();
  169. },
  170. methods: {
  171. /***************************************账号登录部分***************************************/
  172. getCodeOne() {
  173. getCodeImg().then(res => {
  174. this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff;
  175. if (this.captchaOnOff) {
  176. this.codeUrl = "data:image/gif;base64," + res.img;
  177. this.loginForm.uuid = res.uuid;
  178. }
  179. });
  180. },
  181. getCookie() {
  182. const username = Cookies.get("username");
  183. const password = Cookies.get("password");
  184. const rememberMe = Cookies.get('rememberMe')
  185. this.loginForm = {
  186. username: username === undefined ? this.loginForm.username : username,
  187. password: password === undefined ? this.loginForm.password : decrypt(password),
  188. rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
  189. };
  190. },
  191. /***************************************手机号登录部分***************************************/
  192. loginTypeClick(type){
  193. if(type!=this.loginType){
  194. this.loginType = type;
  195. }
  196. },
  197. getCode(){
  198. if(this.checkPhone(this.loginFormTwo.username)){
  199. if(this.codeButtonType){
  200. sendCode(this.loginFormTwo.username).then(response => {
  201. if(response.code != 200){
  202. this.textTwo = "*"+response.msg;
  203. if(response.code == 530){
  204. this.textTwo = "*"+response.msg;
  205. }
  206. }else {
  207. this.textTwo = "";
  208. // this.msgSuccess('发送成功');
  209. this.codeButtonType = false;
  210. this.time();
  211. }
  212. });
  213. }
  214. }
  215. },
  216. //定时器
  217. time(){
  218. let self = this;
  219. let time = 30;
  220. self.codeNum = parseInt(time);
  221. this.timer = window.setInterval(refreshCount, 1000);
  222. function refreshCount() {
  223. if(time<=0){
  224. self.codeNum = parseInt(time);
  225. self.codeButtonType = true;
  226. window.clearInterval(self.timer);
  227. }else{
  228. time--;
  229. self.codeNum = parseInt(time);
  230. }
  231. }
  232. },
  233. //手机号验证
  234. checkPhone(value) {
  235. if (!value) {
  236. this.textTwo = '*手机号不能为空哦~';
  237. return false
  238. } else {
  239. const reg = /^1[3|4|5|7|8|9][0-9]\d{8}$/;
  240. if (reg.test(value)) {
  241. this.textTwo = '';
  242. console.log("*0")
  243. return true
  244. } else {
  245. this.textTwo = '*请输入正确的手机号码';
  246. return false
  247. }
  248. }
  249. },
  250. //登录
  251. handleLogin(type){
  252. let self = this;
  253. if(type == 1){
  254. if(this.loginForm.username.length<1){
  255. this.text = "*请输入账号";
  256. this.userTypeCode = "1";
  257. return
  258. }else if(this.loginForm.password.length<1){
  259. this.text = "*请输入密码";
  260. this.userTypeCode = "2";
  261. return
  262. }else if(!this.loginForm.code||this.loginForm.code.length<1){
  263. this.text = "*请输入验证码";
  264. this.userTypeCode = "3";
  265. return
  266. }
  267. this.text = "";
  268. this.userTypeCode = "";
  269. this.$refs.loginForm.validate(valid => {
  270. if (valid) {
  271. this.loading = true;
  272. if (this.loginForm.rememberMe) {
  273. Cookies.set("username", this.loginForm.username, { expires: 30 });
  274. Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
  275. Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
  276. } else {
  277. Cookies.remove("username");
  278. Cookies.remove("password");
  279. Cookies.remove('rememberMe');
  280. }
  281. this.$store.dispatch("Login", this.loginForm).then((res) => {
  282. if(res.code != 200){
  283. this.text = "*"+res.msg;
  284. if(res.code == 530){
  285. this.userTypeCode = "4";
  286. }else if(res.code == 503){
  287. this.userTypeCode = "5";
  288. }
  289. this.getCodeOne();
  290. this.loading = false;
  291. return
  292. }
  293. if(res.data.type){
  294. localStorage.setItem('userType',res.data.type)
  295. localStorage.setItem('userId',res.data.user_id)
  296. localStorage.setItem('identity',res.data.screen_token);
  297. localStorage.setItem('identityType',res.data.screen_type);
  298. }
  299. this.fullScreen();
  300. if(res.data.type == 22){
  301. getRouters().then(response => {
  302. // let routeData = JSON.parse(localStorage.getItem("routeData"))
  303. let routeData = response.data;
  304. for(let i=0;i<routeData.length;i++){
  305. if (routeData[i].children&&!routeData[i].hidden&&routeData[i].alwaysShow){
  306. for(let o=0;o<routeData[i].children.length;o++){
  307. if(!routeData[i].children[o].alwaysShow&&!routeData[i].children[o].hidden){
  308. let urlText = routeData[i].path + '/' + routeData[i].children[o].path;
  309. console.log("urlText=1",urlText)
  310. this.$router.push({ path: this.redirect || urlText }).catch(()=>{});
  311. return
  312. }else{
  313. if(routeData[i].children[o].children){
  314. for(let x=0;x<routeData[i].children[o].children.length;x++){
  315. if(!routeData[i].children[o].children[x].alwaysShow&&!routeData[i].children[o].children[x].hidden){
  316. let urlText = routeData[i].path + '/' + routeData[i].children[o].path + '/' + routeData[i].children[o].children[x].path;
  317. console.log("urlText=2",urlText)
  318. this.$router.push({ path: this.redirect || urlText }).catch(()=>{});
  319. return
  320. }
  321. }
  322. }
  323. }
  324. }
  325. }
  326. }
  327. });
  328. } else {
  329. // this.$router.push({ path: this.redirect || "/chemicalLibrary/medicUniversityHome" }).catch(()=>{});
  330. this.$router.push({ path: this.redirect || "/chemicalLibrary/medicUniversityHome" }).catch(()=>{});
  331. }
  332. }).catch(() => {
  333. this.loading = false;
  334. if (this.captchaOnOff) {
  335. this.getCodeOne();
  336. }
  337. });
  338. }
  339. });
  340. }else if(type == 2){
  341. if(this.checkPhone(this.loginFormTwo.username)){
  342. if(!this.loginFormTwo.password){
  343. this.textTwo = '*请输入正确的验证码';
  344. return
  345. }
  346. this.textTwo = "";
  347. this.$refs.loginFormTwo.validate(valid => {
  348. if (valid) {
  349. this.loading = true;
  350. this.loginFormTwo.authType = 'mobile'
  351. this.$store.dispatch("LoginPhone", this.loginFormTwo).then((res) => {
  352. if(res.code != 200){
  353. this.textTwo = "*"+res.msg;
  354. if(res.code == 530){
  355. this.textTwo = "*"+res.msg;
  356. }else if(res.code == 503){
  357. this.textTwo = "*"+res.msg;
  358. }
  359. this.loading = false;
  360. return
  361. }
  362. if(res.data.type){
  363. localStorage.setItem('userType',res.data.type)
  364. localStorage.setItem('userId',res.data.user_id)
  365. localStorage.setItem('identity',res.data.screen_token);
  366. localStorage.setItem('identityType',res.data.screen_type);
  367. }
  368. this.fullScreen();
  369. if(res.data.type == 22){
  370. // this.$router.push({ path: this.redirect || "/comprehensive/system/mine" }).catch(()=>{});
  371. getRouters().then(response => {
  372. // let routeData = JSON.parse(localStorage.getItem("routeData"))
  373. let routeData = response.data;
  374. for(let i=0;i<routeData.length;i++){
  375. if (routeData[i].children&&!routeData[i].hidden&&routeData[i].alwaysShow){
  376. for(let o=0;o<routeData[i].children.length;o++){
  377. if(!routeData[i].children[o].alwaysShow&&!routeData[i].children[o].hidden){
  378. let urlText = routeData[i].path + '/' + routeData[i].children[o].path;
  379. this.$router.push({ path: this.redirect || urlText }).catch(()=>{});
  380. return
  381. }else{
  382. if(routeData[i].children[o].children){
  383. for(let x=0;x<routeData[i].children[o].children.length;x++){
  384. if(!routeData[i].children[o].children[x].alwaysShow&&!routeData[i].children[o].children[x].hidden){
  385. let urlText = routeData[i].path + '/' + routeData[i].children[o].path + '/' + routeData[i].children[o].children[x].path;
  386. this.$router.push({ path: this.redirect || urlText }).catch(()=>{});
  387. return
  388. }
  389. }
  390. }
  391. }
  392. }
  393. }
  394. }
  395. });
  396. } else {
  397. this.$router.push({ path: this.redirect || "/chemicalLibrary/medicUniversityHome" }).catch(()=>{});
  398. }
  399. }).catch(() => {
  400. this.loading = false;
  401. });
  402. }
  403. });
  404. }
  405. }
  406. },
  407. /***************************************公共部分***************************************/
  408. //获取首页配置
  409. initPage(){
  410. initPage().then(response => {
  411. if(response.data){
  412. localStorage.setItem('initPage',true);
  413. }else{
  414. localStorage.setItem('initPage',false);
  415. }
  416. });
  417. },
  418. //获取公共配置数据
  419. getLogoInfo(){
  420. getLogoInfo().then(response => {
  421. this.rectangleLogo = response.data.rectangleLogo;
  422. localStorage.setItem('circularLogo',response.data.circularLogo)
  423. localStorage.setItem('rectangleLogo',response.data.rectangleLogo)
  424. localStorage.setItem('videoCover',response.data.videoCover)
  425. });
  426. },
  427. //全屏
  428. fullScreen() {
  429. var element = document.documentElement;
  430. if (element.requestFullscreen) {
  431. element.requestFullscreen();
  432. } else if (element.msRequestFullscreen) {
  433. element.msRequestFullscreen();
  434. } else if (element.mozRequestFullScreen) {
  435. element.mozRequestFullScreen();
  436. } else if (element.webkitRequestFullscreen) {
  437. element.webkitRequestFullscreen();
  438. }
  439. },
  440. //退出全屏
  441. exitFullscreen() {
  442. if (document.exitFullscreen) {
  443. document.exitFullscreen();
  444. } else if (document.msExitFullscreen) {
  445. document.msExitFullscreen();
  446. } else if (document.mozCancelFullScreen) {
  447. document.mozCancelFullScreen();
  448. } else if (document.webkitExitFullscreen) {
  449. document.webkitExitFullscreen();
  450. }
  451. },
  452. },
  453. beforeDestroy() {
  454. //清除定时器
  455. clearInterval(this.timer);
  456. console.log("beforeDestroy");
  457. },
  458. destroyed() {
  459. //清除定时器
  460. clearInterval(this.timer);
  461. console.log("destroyed");
  462. }
  463. }
  464. </script>
  465. <style rel="stylesheet/scss" lang="scss">
  466. .login-page{
  467. height: 100%;
  468. width:100%;
  469. background-image: url("../assets/ZDimages/login/icon_dl_bbg.png");
  470. background-repeat:no-repeat;
  471. background-size: cover;
  472. -webkit-background-size: cover;
  473. -o-background-size: cover;
  474. position: relative;
  475. *{
  476. margin:0;
  477. }
  478. .logo-img{
  479. position: absolute;
  480. top:29px;
  481. left:52px;
  482. width:250px;
  483. height:55px;
  484. }
  485. .title-img-box{
  486. position: absolute;
  487. top:74px;
  488. left:50%;
  489. margin-left:-580px;
  490. width:1180px;
  491. height:230px;
  492. div{
  493. position: relative;
  494. img{
  495. width:1180px;
  496. height:230px;
  497. }
  498. p{
  499. position: absolute;
  500. top:72px;
  501. right:300px;
  502. width:50px;
  503. height:26px;
  504. line-height:26px;
  505. text-align: center;
  506. background: #0045AF;
  507. color:#fff;
  508. font-size:14px;
  509. border-radius:70px;
  510. }
  511. }
  512. }
  513. .form-box{
  514. width:680px;
  515. height:520px;
  516. background-image: url("../assets/ZDimages/login/img_dlk_bg_one.png");
  517. position: absolute;
  518. top:290px;
  519. left:50%;
  520. margin-left:-340px;
  521. .form-title-box{
  522. height:52px;
  523. display: flex;
  524. .form-title-null{
  525. flex:1;
  526. }
  527. .form-title-p{
  528. padding:0 30px;
  529. line-height:52px;
  530. font-size:20px;
  531. text-align: center;
  532. color:#fff;
  533. font-weight:700;
  534. cursor: pointer;
  535. }
  536. .form-title-p-color{
  537. color:#00ffff;
  538. }
  539. }
  540. .login-form-one {
  541. .form-title-p{
  542. line-height:52px;
  543. font-size:24px;
  544. text-align: center;
  545. color:#fff;
  546. font-weight:700;
  547. }
  548. .username-input-box-code:hover{
  549. box-shadow: 0 0 4px 1px rgba(255,39,39,1)!important;
  550. }
  551. .username-input-box-code{
  552. border: 1px solid #FF6A6A!important;
  553. }
  554. .username-input-box:hover{
  555. box-shadow: 0 0 4px 1px rgba(0, 255, 252, 1);
  556. }
  557. .username-input-box{
  558. width:480px;
  559. height:60px;
  560. border: 1px solid #00FFFC;
  561. border-radius: 10px;
  562. background: rgba(0, 13, 41, 0.2);
  563. margin: 40px auto 32px;
  564. display: flex;
  565. overflow: hidden;
  566. img{
  567. height:20px;
  568. width:20px;
  569. margin:20px;
  570. }
  571. input:-webkit-autofill {
  572. //input 背景色 #0C2034根据自己需要替换
  573. -webkit-box-shadow : 0 0 0px 1000px rgba(1,25,67,1) inset !important;
  574. //input字体颜色 颜色根据自己要求替换
  575. -webkit-text-fill-color: #FFFFFF !important;
  576. }
  577. input{
  578. flex:1;
  579. border:none;
  580. outline:none;
  581. background-color: transparent !important;
  582. color: #dedede;
  583. font-size:16px;
  584. }
  585. ::placeholder{
  586. color:#999999 ;
  587. font-size:16px;
  588. }
  589. }
  590. .password-input-box:hover{
  591. box-shadow: 0 0 4px 1px rgba(0, 255, 252, 1);
  592. }
  593. .password-input-box{
  594. width:480px;
  595. height:60px;
  596. border: 1px solid #00FFFC;
  597. border-radius: 10px;
  598. background: rgba(0, 13, 41, 0.2);
  599. margin: 0 auto;
  600. display: flex;
  601. overflow: hidden;
  602. img{
  603. height:20px;
  604. width:20px;
  605. margin:20px;
  606. }
  607. input:-webkit-autofill {
  608. //input 背景色 #0C2034根据自己需要替换
  609. -webkit-box-shadow : 0 0 0px 1000px rgba(1,25,67,1) inset !important;
  610. //input字体颜色 颜色根据自己要求替换
  611. -webkit-text-fill-color: #FFFFFF !important;
  612. }
  613. input{
  614. flex:1;
  615. border:none;
  616. outline:none;
  617. background-color: transparent !important;
  618. color: #dedede;
  619. font-size:16px;
  620. }
  621. ::placeholder{
  622. color:#999999 ;
  623. font-size:16px;
  624. }
  625. }
  626. .text-p{
  627. width:480px;
  628. height:59px;
  629. line-height: 59px;
  630. margin: 0 auto;
  631. font-size: 14px;
  632. font-family: Microsoft YaHei;
  633. color: #DC1616;
  634. }
  635. .code-input-box{
  636. width:480px;
  637. height:60px;
  638. display: flex;
  639. margin: 0 auto;
  640. .code-input-left-box:hover{
  641. box-shadow: 0 0 4px 1px rgba(0, 255, 252, 1);
  642. }
  643. .code-input-left-box{
  644. width:330px;
  645. height:60px;
  646. border: 1px solid #00FFFC;
  647. border-radius: 10px;
  648. background: rgba(0, 13, 41, 0.2);
  649. display: flex;
  650. overflow: hidden;
  651. img{
  652. height:20px;
  653. width:20px;
  654. margin:20px;
  655. }
  656. input:-webkit-autofill {
  657. -webkit-box-shadow: 0 0 0 1000px white inset !important;
  658. }
  659. input{
  660. flex:1;
  661. border:none;
  662. outline:none;
  663. background-color: transparent !important;
  664. color: #dedede;
  665. font-size:16px;
  666. }
  667. ::placeholder{
  668. color:#999999 ;
  669. font-size:16px;
  670. }
  671. }
  672. .login-code{
  673. width:124px;
  674. height:50px;
  675. margin:6px 0 0 25px;
  676. img {
  677. width:124px;
  678. height:50px;
  679. cursor: pointer;
  680. vertical-align: middle;
  681. }
  682. }
  683. }
  684. .form-button-p{
  685. font-size:16px;
  686. display: block;
  687. width:480px;
  688. height: 60px;
  689. background: #0045AF;
  690. color:#fff;
  691. border:none;
  692. border-radius: 10px;
  693. margin:34px auto 0;
  694. }
  695. }
  696. .login-form-two{
  697. .username-input-box:hover{
  698. box-shadow: 0 0 4px 1px rgba(0, 255, 252, 1);
  699. }
  700. .username-input-box{
  701. width:480px;
  702. height:60px;
  703. border: 1px solid #00FFFC;
  704. border-radius: 10px;
  705. background: rgba(0, 13, 41, 0.2);
  706. margin: 70px auto 0;
  707. display: flex;
  708. overflow: hidden;
  709. img{
  710. height:20px;
  711. width:20px;
  712. margin:19px 30px 19px 20px;
  713. }
  714. p{
  715. color: #999999;
  716. line-height:60px;
  717. span:nth-child(1){
  718. }
  719. span:nth-child(2){
  720. margin:0 10px;
  721. }
  722. }
  723. input:-webkit-autofill {
  724. //input 背景色 #0C2034根据自己需要替换
  725. -webkit-box-shadow : 0 0 0px 1000px rgba(1,25,67,1) inset !important;
  726. //input字体颜色 颜色根据自己要求替换
  727. -webkit-text-fill-color: #FFFFFF !important;
  728. }
  729. input{
  730. flex:1;
  731. border:none;
  732. outline:none;
  733. background-color: transparent !important;
  734. color: #dedede;
  735. font-size:16px;
  736. }
  737. ::placeholder{
  738. color:#999999 ;
  739. font-size:16px;
  740. }
  741. }
  742. .text-p{
  743. width:480px;
  744. height:59px;
  745. line-height: 59px;
  746. margin: 0 auto;
  747. font-size: 14px;
  748. font-family: Microsoft YaHei;
  749. color: #DC1616;
  750. }
  751. .code-input-box{
  752. width:480px;
  753. height:60px;
  754. display: flex;
  755. margin: 0 auto;
  756. .code-input-left-box:hover{
  757. box-shadow: 0 0 4px 1px rgba(0, 255, 252, 1);
  758. }
  759. .code-input-left-box{
  760. width:300px;
  761. height:60px;
  762. border: 1px solid #00FFFC;
  763. border-radius: 10px;
  764. background: rgba(0, 13, 41, 0.2);
  765. display: flex;
  766. overflow: hidden;
  767. img{
  768. height:20px;
  769. width:20px;
  770. margin:19px 30px 19px 20px;
  771. }
  772. input:-webkit-autofill {
  773. -webkit-box-shadow: 0 0 0 1000px white inset !important;
  774. }
  775. input{
  776. flex:1;
  777. border:none;
  778. outline:none;
  779. background-color: transparent !important;
  780. color: #dedede;
  781. font-size:16px;
  782. }
  783. ::placeholder{
  784. color:#999999 ;
  785. font-size:16px;
  786. }
  787. }
  788. .login-code-one{
  789. background: #999;
  790. color:#fff;
  791. }
  792. .login-code-two{
  793. background: #0045AF;
  794. color:#fff;
  795. }
  796. .login-code{
  797. width:160px;
  798. height:60px;
  799. line-height:60px;
  800. cursor: pointer;
  801. margin-left:20px;
  802. border-radius:10px;
  803. font-size:14px;
  804. text-align: center;
  805. }
  806. }
  807. .form-button-p{
  808. font-size:16px;
  809. display: block;
  810. width:480px;
  811. height: 60px;
  812. background: #0045AF;
  813. color:#fff;
  814. border:none;
  815. border-radius: 10px;
  816. margin:50px auto 0;
  817. }
  818. }
  819. }
  820. .introduction-p{
  821. width:100%;
  822. text-align: center;
  823. color:#fff;
  824. font-size:16px;
  825. line-height:44px;
  826. position: absolute;
  827. left:0;
  828. bottom:0;
  829. }
  830. }
  831. </style>