loginOne.vue 29 KB

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