index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822
  1. <template>
  2. <div class="login-wrap">
  3. <div class="logo" :class="{ logoleave: jumpAnimate }">
  4. <img src="@assets/img/icon_logo2.png" />
  5. </div>
  6. <div class="login-title">
  7. <h1 class="title-name">智慧社区管理平台</h1>
  8. <!-- <p class="title-lang">Smart community management platform</p> -->
  9. <p class="title-lang">SMART COMMUNITY MANAGEMENT PLATFORM</p>
  10. </div>
  11. <div class="ms-login ms-login1" :class="{ 'ms-login1leave': jumpAnimate }" v-show="!isSelectTenant">
  12. <div class="ms-main">
  13. <div class="login-topImg paTop10"><img src="@assets/img/loginPop/img1.png" alt="" /></div>
  14. <el-tabs v-model="activeName" @tab-click="handleClick" class="login-body">
  15. <el-tab-pane label="账号登录" name="accountNumber" class="regist_class">
  16. <el-form>
  17. <div class="form-item">
  18. <el-input
  19. type="text"
  20. placeholder="请输入账号"
  21. required="required"
  22. v-model="accountNumberData.mobile"
  23. maxlength="11"
  24. @focus="namefocus = true"
  25. @blur="onnamefocus"
  26. clearable
  27. >
  28. </el-input>
  29. </div>
  30. <div class="form-item">
  31. <el-input
  32. type="password"
  33. placeholder="请输入密码"
  34. v-model="accountNumberData.password"
  35. @focus="phonefocus = true"
  36. @blur="onphonefocus"
  37. clearable
  38. >
  39. </el-input>
  40. </div>
  41. <div class="form-item">
  42. <el-input
  43. type="text"
  44. placeholder="请输入手机验证码"
  45. v-model="accountNumberData.smsCode"
  46. @focus="smsCodefocus = true"
  47. @blur="onsmsCodefocus"
  48. >
  49. </el-input>
  50. <el-button
  51. type="text"
  52. v-if="accountNumberData.time"
  53. class="el-fl-right codeImg sms-code sms-code-istime"
  54. :disabled="!!accountNumberData.time"
  55. @click="getCode"
  56. >
  57. {{ `${accountNumberData.time}s后重新获取` }}</el-button
  58. >
  59. <el-button
  60. type="text"
  61. v-else
  62. class="el-fl-right codeImg sms-code sms-code-notime"
  63. :disabled="!!accountNumberData.time"
  64. @click="getCode"
  65. >
  66. 获取验证码</el-button
  67. >
  68. </div>
  69. <div class="remember">
  70. <el-checkbox v-model="rememberName">记住账号</el-checkbox>
  71. </div>
  72. <span class="tips" v-if="accountNumberData.errMsg">{{ accountNumberData.errMsg }}</span>
  73. <el-button type="primary" class="btn" @click="accountNumberSubmit" v-preventReClick>登录</el-button>
  74. </el-form>
  75. </el-tab-pane>
  76. <el-tab-pane label="手机登录" name="login" class="login_class">
  77. <el-form>
  78. <div class="form-item">
  79. <el-input
  80. type="text"
  81. placeholder="请输入手机号"
  82. required="required"
  83. v-model="loginData.mobile"
  84. maxlength="11"
  85. @focus="mobilefocus = true"
  86. @blur="onmobilefocus"
  87. clearable
  88. >
  89. </el-input>
  90. </div>
  91. <div class="form-item">
  92. <el-input
  93. type="text"
  94. placeholder="请输入校验码"
  95. required="required"
  96. v-model="loginData.code"
  97. @focus="codefocus = true"
  98. @blur="oncodefocus"
  99. >
  100. </el-input>
  101. <img class="el-fl-right codeImg codeImg-item" :src="loginData.codeUrl" @click="refreshCode" />
  102. </div>
  103. <div class="form-item">
  104. <el-input
  105. type="text"
  106. placeholder="请输入手机验证码"
  107. v-model="loginData.smsCode"
  108. @focus="smsCodefocus = true"
  109. @blur="onsmsCodefocus"
  110. >
  111. </el-input>
  112. <el-button
  113. type="text"
  114. v-if="loginData.time"
  115. class="el-fl-right codeImg sms-code sms-code-istime"
  116. :disabled="!!loginData.time"
  117. @click="getCode"
  118. >
  119. {{ `${loginData.time}s后重新获取` }}</el-button
  120. >
  121. <el-button
  122. type="text"
  123. v-else
  124. class="el-fl-right codeImg sms-code sms-code-notime"
  125. :disabled="!!loginData.time"
  126. @click="getCode"
  127. >
  128. 获取验证码</el-button
  129. >
  130. </div>
  131. <span class="tips" v-if="loginData.errMsg">{{ loginData.errMsg }}</span>
  132. <el-button type="primary" class="btn mgTop16" @click="loginSubmit">登录</el-button>
  133. </el-form>
  134. </el-tab-pane>
  135. </el-tabs>
  136. <div class="login-buttonImg paTop10"><img src="@assets/img/loginPop/img2.png" alt="" /></div>
  137. </div>
  138. </div>
  139. <select-tenant :selectDta="loginInfoArr" :class="{ 'ms-login1leave': jumpAnimate }" v-show="isSelectTenant"></select-tenant>
  140. </div>
  141. </template>
  142. <script>
  143. import SelectTenant from '@/components/ToggleTenant';
  144. let timer;
  145. const phoneRegExp = /^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|147)\d{8}$/,
  146. codeRegExp = /^\d{4}$/;
  147. export default {
  148. components: {
  149. SelectTenant
  150. },
  151. data() {
  152. return {
  153. isSelectTenant: false,
  154. loginInfoArr: [],
  155. // 获取url地址后面的参数
  156. activeName: 'accountNumber',
  157. urlQuery: '',
  158. activeIndex: '1',
  159. loginData: {
  160. mobile: '17800000001', //手机号
  161. code: '', //校验码
  162. codeUrl: '',
  163. smsCode: '2020', //手机校验码
  164. time: 0,
  165. random: '', //用于重新获取数字校验码的随机数
  166. errMsg: ''
  167. },
  168. accountNumberData: {
  169. mobile: '',
  170. password: '',
  171. smsCode: '2020', //手机校验码
  172. time: 0,
  173. random: '', //用于重新获取数字校验码的随机数
  174. errMsg: ''
  175. },
  176. rememberName: false,
  177. registerData: {
  178. registered: false,
  179. name: '',
  180. mobile: '',
  181. errMsg: '',
  182. roleType: '',
  183. roleTypeOptions: [
  184. {
  185. id: 1,
  186. label: '水表厂家用户'
  187. },
  188. {
  189. id: 2,
  190. label: '自来水公司用户'
  191. },
  192. {
  193. id: 3,
  194. label: '城市合伙人'
  195. }
  196. ]
  197. },
  198. mobilefocus: false,
  199. codefocus: false,
  200. smsCodefocus: false,
  201. namefocus: false,
  202. phonefocus: false,
  203. tanasfocus: false,
  204. jumpAnimate: false
  205. };
  206. },
  207. methods: {
  208. onmobilefocus() {
  209. if (this.loginData.mobile.length === 0) {
  210. this.mobilefocus = false;
  211. }
  212. },
  213. oncodefocus() {
  214. if (this.loginData.code.length === 0) {
  215. this.codefocus = false;
  216. }
  217. },
  218. onsmsCodefocus() {
  219. if (this.loginData.smsCode.length === 0) {
  220. this.smsCodefocus = false;
  221. }
  222. },
  223. onnamefocus() {
  224. if (this.registerData.name.length === 0) {
  225. this.namefocus = false;
  226. }
  227. },
  228. onphonefocus() {
  229. if (this.registerData.mobile.length === 0) {
  230. this.phonefocus = false;
  231. }
  232. },
  233. ontanasfocus() {
  234. if (this.registerData.roleType.length === 0) {
  235. this.tanasfocus = false;
  236. }
  237. },
  238. ontanaschange(val) {
  239. if (val.length === 0) {
  240. this.tanasfocus = false;
  241. }
  242. },
  243. //获取随机数
  244. getRandom() {
  245. const CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  246. for (var r, chars = CHARS, uuid = new Array(36), rnd = 0, i = 0; 36 > i; i++) {
  247. 8 == i || 13 == i || 18 == i || 23 == i
  248. ? (uuid[i] = '-')
  249. : 14 == i
  250. ? (uuid[i] = '4')
  251. : (2 >= rnd && (rnd = (33554432 + 16777216 * Math.random()) | 0),
  252. (r = 15 & rnd),
  253. (rnd >>= 4),
  254. (uuid[i] = chars[19 == i ? (3 & r) | 8 : r]));
  255. }
  256. return uuid.join('');
  257. },
  258. refreshCode() {
  259. this.loginData.random = this.getRandom();
  260. this.loginData.codeUrl = `/sc-user-auth/validateCode/image?random=${this.loginData.random}`;
  261. },
  262. //获取手机验证码
  263. getCode() {
  264. const { mobile, code, random } = this.loginData;
  265. let errorMsg = '';
  266. if (!codeRegExp.test(code)) {
  267. errorMsg = '您输入的图形验证码有误,请重新输入';
  268. }
  269. if (!code) {
  270. errorMsg = '请输入图形验证码';
  271. }
  272. if (!phoneRegExp.test(mobile)) {
  273. errorMsg = '您输入的手机号码格式有误,请重新输入';
  274. }
  275. if (!mobile) {
  276. errorMsg = '请输入手机号码';
  277. }
  278. if (errorMsg) {
  279. this.loginData.errMsg = errorMsg;
  280. return;
  281. }
  282. this.loginData.errMsg = '';
  283. this.$http
  284. .postForm('/sms/v2/send', {
  285. mobile,
  286. code,
  287. random
  288. })
  289. .then(({ status, msg }) => {
  290. this.$message({
  291. type: status === 0 ? 'success' : 'error',
  292. message: msg
  293. });
  294. if (status === 0) {
  295. this.loginData.time = 60;
  296. timer = setInterval(() => {
  297. this.loginData.time -= 1;
  298. if (this.loginData.time == 0) {
  299. clearInterval(timer);
  300. }
  301. }, 1000);
  302. }
  303. });
  304. },
  305. registerSubmit() {
  306. const params = { ...this.registerData };
  307. if (!params.name) {
  308. this.registerData.errMsg = '· 请输入姓名';
  309. return;
  310. }
  311. if (!params.mobile) {
  312. this.registerData.errMsg = '· 请输入手机号';
  313. return;
  314. }
  315. if (!phoneRegExp.test(params.mobile)) {
  316. this.registerData.errMsg = '· 请输入正确的手机号';
  317. return;
  318. }
  319. if (!params.roleType) {
  320. this.registerData.errMsg = '· 请输入用户类型';
  321. return;
  322. }
  323. let registparams = {
  324. username: params.name,
  325. phone: params.mobile,
  326. userType: params.roleType
  327. };
  328. this.$http.post('/user/insertRegister', registparams).then(({ status, data, msg }) => {
  329. if (status === 0) {
  330. this.registerData.errMsg = '';
  331. this.$message({
  332. type: 'success',
  333. message: '注册成功,请登录'
  334. });
  335. this.activeName = 'accountNumber';
  336. } else {
  337. this.$message({
  338. type: 'err',
  339. message: '注册失败'
  340. });
  341. }
  342. });
  343. },
  344. accountNumberSubmit() {
  345. let errorMsg = '';
  346. const params = { ...this.accountNumberData };
  347. if (!codeRegExp.test(params.smsCode)) {
  348. errorMsg = '· 您输入的手机验证码有误,请重新输入';
  349. }
  350. if (!params.smsCode) {
  351. errorMsg = '· 请输入手机检验码';
  352. }
  353. if (!params.password) {
  354. errorMsg = '· 请输入密码';
  355. }
  356. if (!params.mobile) {
  357. errorMsg = '· 请输入账号';
  358. }
  359. if (errorMsg) {
  360. this.accountNumberData.errMsg = errorMsg;
  361. return;
  362. }
  363. if (this.rememberName) {
  364. localStorage.setItem('accountNumberName', params.mobile);
  365. } else {
  366. localStorage.removeItem('accountNumberName');
  367. }
  368. this.$http.postForm('/user/mobileLogin', params).then(({ status, data, msg }) => {
  369. if (status === 0 && data) {
  370. localStorage.setItem('SC_token', data.token.access_token);
  371. this.loginInfoArr = data.loginInfo;
  372. if (data.loginInfo.length > 1) {
  373. this.isSelectTenant = true;
  374. } else {
  375. console.log('this.loginInfoArr', this.loginInfoArr);
  376. this.$store.commit('setloginInfo', data.loginInfo[0]);
  377. this.jumpAnimate = true;
  378. window.sessionStorage.setItem('loginJson', JSON.stringify(this.loginInfoArr));
  379. window.sessionStorage.setItem('loginJsonActive', JSON.stringify(this.loginInfoArr[0]));
  380. setTimeout(() => {
  381. this.$router.push({
  382. path: '/nav'
  383. });
  384. }, 1500);
  385. }
  386. } else {
  387. this.$message.error(msg);
  388. if (msg === '您输入的手机验证码已过期,请重新输入') {
  389. self.refreshCode();
  390. self.loginData.code = '';
  391. }
  392. }
  393. });
  394. },
  395. loginSubmit() {
  396. let errorMsg = '';
  397. const params = { ...this.loginData };
  398. if (!codeRegExp.test(params.smsCode)) {
  399. errorMsg = '· 您输入的手机验证码有误,请重新输入';
  400. }
  401. if (!params.smsCode) {
  402. errorMsg = '· 请输入手机检验码';
  403. }
  404. if (!codeRegExp.test(params.code)) {
  405. errorMsg = '· 您输入的图形验证码有误,请重新输入';
  406. }
  407. if (!params.code) {
  408. errorMsg = '· 请输入图形验证码';
  409. }
  410. if (!phoneRegExp.test(params.mobile)) {
  411. errorMsg = '· 请输入正确的手机号';
  412. }
  413. if (!params.mobile) {
  414. errorMsg = '· 请输入手机号';
  415. }
  416. if (errorMsg) {
  417. this.loginData.errMsg = errorMsg;
  418. return;
  419. }
  420. this.$http.postForm('/user/smsCodeLogin', params).then(({ status, data, msg }) => {
  421. if (status === 0 && data) {
  422. localStorage.setItem('SC_token', data.token.access_token);
  423. this.loginInfoArr = data.loginInfo;
  424. if (data.loginInfo.length > 1) {
  425. this.isSelectTenant = true;
  426. } else {
  427. console.log('this.loginInfoArr', this.loginInfoArr);
  428. this.$store.commit('setloginInfo', data.loginInfo[0]);
  429. this.jumpAnimate = true;
  430. window.sessionStorage.setItem('loginJson', JSON.stringify(this.loginInfoArr));
  431. window.sessionStorage.setItem('loginJsonActive', JSON.stringify(this.loginInfoArr[0]));
  432. setTimeout(() => {
  433. this.$router.push({
  434. path: '/nav'
  435. });
  436. }, 1500);
  437. }
  438. } else {
  439. this.$message.error(msg);
  440. if (msg === '您输入的手机验证码已过期,请重新输入') {
  441. self.refreshCode();
  442. self.loginData.code = '';
  443. }
  444. }
  445. });
  446. }
  447. },
  448. created() {
  449. let that = this;
  450. document.onkeydown = function (e) {
  451. e = window.event || e;
  452. if (that.$route.path == '/login' && (e.code == 'Enter' || e.code == 'enter') && that.activeName == 'accountNumber') {
  453. that.loginSubmit(); //登录函数
  454. }
  455. };
  456. this.refreshCode();
  457. localStorage.removeItem('menupath');
  458. localStorage.removeItem('ms_username');
  459. localStorage.removeItem('SC_token');
  460. // sessionStorage.removeItem('tabs');
  461. sessionStorage.clear();
  462. const accountNumberName = localStorage.getItem('accountNumberName') || '';
  463. this.accountNumberData.mobile = accountNumberName;
  464. this.rememberName = !!accountNumberName;
  465. }
  466. };
  467. </script>
  468. <style lang="scss" scoped>
  469. /deep/.el-input__inner {
  470. font-family: Microsoft YaHei;
  471. height: 48px;
  472. line-height: 10px;
  473. border-radius: 6px;
  474. background: #1d212a;
  475. border: 1px solid rgba(255, 255, 255, 0.3);
  476. color: #ffffff;
  477. font-size: 16px;
  478. font-weight: 400;
  479. &:focus {
  480. border: 1px solid #0eaeff;
  481. border-radius: 6px;
  482. }
  483. // opacity: 0.3;
  484. }
  485. /deep/.el-form-item {
  486. margin-bottom: 30px;
  487. }
  488. /deep/.el-tabs {
  489. // position: relative;
  490. // position: absolute;
  491. // top: 10px;
  492. width: 100%;
  493. // padding: 0px 30px 30px 30px;
  494. // height: 360px;
  495. .el-tabs__header {
  496. margin: 0;
  497. }
  498. .el-tabs__content {
  499. .el-form .form-item {
  500. }
  501. }
  502. .el-tabs__nav-wrap::after {
  503. display: none;
  504. }
  505. .el-tabs__nav {
  506. width: 100%;
  507. .el-tabs__bar {
  508. height: 0;
  509. }
  510. .el-tabs__active-bar {
  511. background-color: transparent;
  512. // background: url(../../assets/img/line_selected.png) no-repeat;
  513. // height: 2px;
  514. // background: #0EAEFF;
  515. // width: 48px !important;
  516. // left: 25%;
  517. // transform: translateX(-50%) !important;
  518. // background-position: center;
  519. }
  520. .el-tabs__item {
  521. width: 50%;
  522. color: #ffffff33;
  523. text-align: center;
  524. padding: 0;
  525. }
  526. .el-tabs__item.is-active {
  527. color: #ffffff;
  528. &::after {
  529. display: block;
  530. content: '';
  531. position: absolute;
  532. width: 48px;
  533. left: 50%;
  534. transform: translateX(-50%);
  535. height: 2px;
  536. background: #0eaeff;
  537. bottom: 0;
  538. }
  539. }
  540. }
  541. }
  542. /deep/ .right-tabbox-newnotice /deep/.el-tabs__nav-wrap::after {
  543. position: static !important;
  544. }
  545. // 改版
  546. // 动画
  547. @-webkit-keyframes lightfadeout {
  548. 0% {
  549. opacity: 0;
  550. }
  551. 100% {
  552. opacity: 1;
  553. }
  554. }
  555. @keyframes lightfadeout {
  556. 0% {
  557. opacity: 0;
  558. }
  559. 100% {
  560. opacity: 1;
  561. }
  562. }
  563. @-webkit-keyframes lightfadeoutleave {
  564. 0% {
  565. opacity: 1;
  566. }
  567. 100% {
  568. opacity: 0;
  569. }
  570. }
  571. @keyframes lightfadeoutleave {
  572. 0% {
  573. opacity: 1;
  574. }
  575. 100% {
  576. opacity: 0;
  577. }
  578. }
  579. .login-wrap .logo {
  580. position: absolute;
  581. top: 120px;
  582. left: 130px;
  583. margin: 0;
  584. opacity: 0;
  585. animation-name: lightfadeout;
  586. animation-duration: 0.267s;
  587. animation-timing-function: linear;
  588. animation-delay: 1.267s;
  589. animation-iteration-count: 1;
  590. animation-fill-mode: forwards;
  591. }
  592. .login-wrap .logo > img {
  593. width: 150px;
  594. height: 40px;
  595. }
  596. .login-wrap .logoleave {
  597. opacity: 1;
  598. animation-name: lightfadeoutleave;
  599. animation-duration: 0.267s;
  600. animation-timing-function: linear;
  601. animation-delay: 0.3s;
  602. animation-iteration-count: 1;
  603. animation-fill-mode: forwards;
  604. }
  605. .ms-login1 {
  606. opacity: 0;
  607. animation-name: lightfadeout;
  608. animation-duration: 0.5s;
  609. animation-timing-function: linear;
  610. animation-delay: 0.5s;
  611. animation-iteration-count: 1;
  612. animation-fill-mode: forwards;
  613. }
  614. .ms-login1leave {
  615. opacity: 1;
  616. animation-name: lightfadeoutleave;
  617. animation-duration: 0.5s;
  618. animation-timing-function: linear;
  619. animation-delay: 0.5s;
  620. animation-iteration-count: 1;
  621. animation-fill-mode: forwards;
  622. }
  623. /deep/.el-input__inner {
  624. &::placeholder {
  625. font-size: 16px;
  626. font-family: Microsoft YaHei;
  627. font-weight: 400;
  628. color: #ffffff33;
  629. }
  630. }
  631. .prefix-img {
  632. height: 18px;
  633. position: absolute;
  634. top: 15px;
  635. padding: 0 10px 0 14px;
  636. }
  637. .center-middle {
  638. width: 1660px;
  639. height: 430px;
  640. position: absolute;
  641. top: 23%;
  642. left: 50%;
  643. transform: translate(-50%, -50%);
  644. }
  645. .suffix-img {
  646. position: absolute;
  647. top: 15px;
  648. right: 0;
  649. padding: 0 10px 0 14px;
  650. }
  651. /deep/.el-input--prefix .el-input__inner {
  652. padding-left: 44px;
  653. }
  654. .login-wrap .ms-main .form-item .codeImg-item {
  655. width: 110px;
  656. height: 34px;
  657. background: #97a3c1;
  658. opacity: 0.8;
  659. border-radius: 4px;
  660. }
  661. .login-wrap .ms-main .form-item .sms-code {
  662. border-left: 1px solid rgba(38, 133, 242, 0.3);
  663. padding-left: 26px;
  664. font-size: 16px;
  665. font-family: Microsoft YaHei;
  666. font-weight: 400;
  667. color: rgba(14, 174, 255, 1);
  668. }
  669. .login-wrap .ms-main .form-item .sms-code-notime {
  670. width: 110px;
  671. padding-left: 10px;
  672. }
  673. .login-wrap .ms-main .form-item .sms-code-istime {
  674. font-size: 16px;
  675. font-family: Microsoft YaHei;
  676. font-weight: 400;
  677. color: rgba(255, 255, 255, 0.4);
  678. }
  679. .login-wrap .ms-main .btn {
  680. border: none;
  681. }
  682. .define-el-select {
  683. /deep/ .el-input__suffix {
  684. display: none;
  685. }
  686. }
  687. .login-wrap .ms-main .form-item .btn-select {
  688. padding: 0 10px 0 20px;
  689. pointer-events: none;
  690. img {
  691. width: 18px;
  692. height: 18px;
  693. }
  694. }
  695. </style>
  696. <style lang="scss" scoped >
  697. .login-wrap {
  698. min-width: 1280px;
  699. width: 100%;
  700. height: 100%;
  701. background: url(../../assets/img/loginPop/bg.png) center no-repeat;
  702. background-size: cover;
  703. overflow: hidden;
  704. position: relative;
  705. .ms-login {
  706. position: absolute;
  707. top: 50%;
  708. right: 215px;
  709. transform: translateY(-50%);
  710. }
  711. .login-title {
  712. position: absolute;
  713. top: 226px;
  714. left: 130px;
  715. color: white;
  716. font-family: PingFangSC-Semibold;
  717. .title-name {
  718. font-size: 60px;
  719. }
  720. .title-lang {
  721. font-size: 17.5px;
  722. display: inline-block;
  723. // margin-left: 60px;
  724. // transform: scale(1.35, 0.9);
  725. // -ms-transform: scale(1.35, 0.9);
  726. // -webkit-transform: scale(1.35, 0.9);
  727. // -moz-transform: scale(1.35, 0.9);
  728. // -o-transform: scale(1.35, 0.9);
  729. margin-left: 30px;
  730. transform: scale(1.15, 0.8);
  731. -ms-transform: scale(1.15, 0.8);
  732. -webkit-transform: scale(1.15, 0.8);
  733. -moz-transform: scale(1.15, 0.8);
  734. -o-transform: scale(1.15, 0.8);
  735. }
  736. }
  737. .ms-main {
  738. width: 400px;
  739. border: 1px solid rgba(240, 238, 241, 0.2);
  740. border-radius: 10px;
  741. opacity: 0.8;
  742. height: 468px;
  743. background: linear-gradient(0deg, #101327 0%, #29314c 100%);
  744. box-shadow: 0px 10px 80px 0px rgba(0, 0, 0, 0.15);
  745. .login-topImg,
  746. .login-buttonImg {
  747. width: 100%;
  748. text-align: center;
  749. }
  750. .login-buttonImg {
  751. position: absolute;
  752. bottom: 0;
  753. }
  754. .login-body {
  755. padding: 15px 30px 0 30px;
  756. .tips {
  757. color: #f25050;
  758. font-size: 14px;
  759. display: inline-block;
  760. margin-bottom: 10px;
  761. }
  762. .btn {
  763. width: 100%;
  764. background: linear-gradient(-90deg, #0098ef 0%, #0eaeff 100%);
  765. border-radius: 6px;
  766. height: 48px;
  767. font-size: 20px;
  768. font-family: Microsoft YaHei;
  769. font-weight: 400;
  770. color: #ffffff;
  771. }
  772. .remember {
  773. margin-bottom: 30px;
  774. }
  775. }
  776. .form-item {
  777. margin: 24px 0;
  778. height: 48px;
  779. display: flex;
  780. align-items: center;
  781. position: relative;
  782. .codeImg {
  783. position: absolute;
  784. right: 10px;
  785. }
  786. .code {
  787. border-left: 1px solid #2887f2;
  788. height: 20px;
  789. line-height: 0px;
  790. padding-left: 10px;
  791. }
  792. .el-select {
  793. width: 100%;
  794. }
  795. .icon {
  796. position: absolute;
  797. top: 18px;
  798. left: 6px;
  799. }
  800. }
  801. }
  802. }
  803. .paTop10 {
  804. padding-top: 10px;
  805. }
  806. .mgTop16 {
  807. margin-top: 16px;
  808. }
  809. </style>