index.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815
  1. <template>
  2. <div class="appBox">
  3. <div class="mainBox">
  4. <div class="leftBox">
  5. <!--大标题-->
  6. <div class="titleBox">
  7. <div class="titleEnglish">Operation Management Platform</div>
  8. <div class="titleChinaeseBox">
  9. <span class="titleChinasesTop">政讯通<br></span>
  10. <span class="titleChinasesBottom">运营管理平台</span>
  11. </div>
  12. </div>
  13. <!--背景颜色-->
  14. <div class="yellow" />
  15. <div class="blue" />
  16. <!--人物图片-->
  17. <img src="@/assets/login/Picture.png" class="TitleImg">
  18. </div>
  19. <div class="rightBox">
  20. <!--form登陆框-->
  21. <div class="loginFormBox">
  22. <!--开始验证表单 start-->
  23. <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" autocomplete="on"
  24. label-position="left">
  25. <div class="inputBox greyBg">
  26. <img src="@/assets/login/id-card-outline.png" class="inputIcon">
  27. <el-form-item prop="username">
  28. <el-input ref="username"
  29. v-model="loginForm.username"
  30. placeholder="请输入手机号"
  31. name="username"
  32. type="text"
  33. tabindex="1"
  34. autocomplete="off"
  35. />
  36. </el-form-item>
  37. </div>
  38. <div class="inputBox greyBg">
  39. <img src="@/assets/login/bag-remove-outline.png" class="inputIcon">
  40. <el-tooltip v-model="capsTooltip" content="Caps lock is On" placement="right" manual>
  41. <el-form-item prop="password">
  42. <el-input :key="passwordType"
  43. ref="password"
  44. v-model="loginForm.password"
  45. :type="passwordType"
  46. placeholder="请输入密码"
  47. name="password"
  48. tabindex="2"
  49. autocomplete="off"
  50. />
  51. <span class="show-pwd" @click="showPwd">
  52. <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
  53. </span>
  54. </el-form-item>
  55. </el-tooltip>
  56. </div>
  57. <!-- <div class="inputBoxSpecial">
  58. <div class="inputBoxLeft greyBg">
  59. <img src="@/assets/login/hardware-chip-outline.png" class="inputIcon">
  60. <el-form-item prop="captcha">
  61. <el-input
  62. ref="captcha"
  63. v-model="loginForm.captcha"
  64. placeholder="图形验证码"
  65. name="captcha"
  66. type="text"
  67. tabindex="3"
  68. maxlength="4"
  69. autocomplete="off"
  70. />
  71. </el-form-item>
  72. </div>
  73. <div class="inputBoxRight greyBg">
  74. <div class="submitCode">
  75. <img :src="codeImg" class="codeImg" @click="getImgCode">
  76. </div>
  77. <div class="reloadBtn" @click="getImgCode">看不清?换一张图</div>
  78. </div>
  79. </div> -->
  80. <el-button :loading="loading" type="primary" class="loginBtn"
  81. @click.native.prevent="singleLogin">
  82. 登录
  83. </el-button>
  84. <!-- <div class="singleLogin" @click="goBackWebUrl"><i class="el-icon-refresh-right" /> 点此返回原网站</div> -->
  85. </el-form>
  86. <!--开始验证表单 end-->
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </template>
  92. <script>
  93. import { validUserPhone } from '@/utils/validate'
  94. import axios from 'axios'
  95. import BASEURL from '@/utils/baseUrl'
  96. import { getToken, getTokenTest, removeToken,setLoginStatus,setUserUrl } from '@/utils/auth'
  97. export default {
  98. name: 'Login',
  99. data() {
  100. // 配置验证规则:用于表单验证
  101. const validateUsername = (rule, value, callback) => {
  102. if (!validUserPhone(value)) {
  103. callback(new Error('请输入正确的手机号!'))
  104. } else {
  105. callback()
  106. }
  107. }
  108. const validatePassword = (rule, value, callback) => {
  109. if (value.length < 6) {
  110. callback(new Error('密码不能低于6位!'))
  111. } else {
  112. callback()
  113. }
  114. }
  115. const validateCode = (rule, value, callback) => {
  116. if (value.length < 4) {
  117. callback(new Error('图形验证码不能低于4位!'))
  118. } else {
  119. callback()
  120. }
  121. }
  122. // 本页基础数据
  123. return {
  124. loginForm: { // 1.用户使用哪些信息登录
  125. username: '', // 15210211200
  126. password: '', // 111111
  127. type: 1, //1=账号密码登录
  128. captcha: '',//验证码图片
  129. code: ''//验证code
  130. },
  131. loginRules: { // 2.配置from表单验证规则
  132. username: [{ required: true, trigger: 'blur', validator: validateUsername }],
  133. password: [{ required: true, trigger: 'blur', validator: validatePassword }],
  134. captcha: [{ required: true, trigger: 'blur', validator: validateCode }]
  135. },
  136. passwordType: 'password', // 3.密码域默认type 当显示密码的时候改为text
  137. capsTooltip: false,
  138. loading: false,
  139. showDialog: false,
  140. redirect: undefined,
  141. otherQuery: {},
  142. // 图像验证码
  143. captchaText: '', // 保存生成的验证码文本
  144. captchaInput: '', // 用户输入的验证码
  145. codeImg: '' // 图形验证码
  146. }
  147. },
  148. watch: {
  149. $route: {
  150. handler: function (route) {
  151. const query = route.query
  152. if (query) {
  153. this.redirect = query.redirect
  154. this.otherQuery = this.getOtherQuery(query)
  155. }
  156. },
  157. immediate: true
  158. }
  159. },
  160. // created() {
  161. // let token = getToken();
  162. // //查询登录状态
  163. // this.$store.dispatch('user/logoutStatus', {"token":token}).then( res => {
  164. // if(res.code==200){
  165. // //token有效,不执行操作
  166. // }else{
  167. // //如果token过期,就清理掉token
  168. // removeToken()
  169. // console.log("token已过期!")
  170. // //this.$message.error(res.message)
  171. // }
  172. // }).catch(() => {
  173. // this.$message.error("查询登录状态失败,请重新登录!")
  174. // })
  175. // },
  176. mounted() {
  177. this.getImgCode()
  178. },
  179. watch: {
  180. $route: {
  181. handler: function (route) {
  182. const query = route.query
  183. if (query) {
  184. this.redirect = query.redirect
  185. this.otherQuery = this.getOtherQuery(query)
  186. }
  187. },
  188. immediate: true
  189. }
  190. },
  191. methods: {
  192. // 检查输入状态
  193. checkCapslock(e) {
  194. const { key } = e
  195. this.capsTooltip = key && key.length === 1 && (key >= 'A' && key <= 'Z')
  196. },
  197. // 切换密码框的显示与隐藏
  198. showPwd() {
  199. if (this.passwordType === 'password') {
  200. this.passwordType = ''
  201. } else {
  202. this.passwordType = 'password'
  203. }
  204. this.$nextTick(() => {
  205. this.$refs.password.focus()
  206. })
  207. },
  208. // 提交表单并跳转
  209. handleLogin() {
  210. this.$refs.loginForm.validate(valid => {
  211. if (valid) {
  212. //console.log(this.loginForm)
  213. //开始登录
  214. this.loading = true
  215. this.$store.dispatch('user/login', this.loginForm)
  216. .then(res => {
  217. this.loading = false
  218. console.log(res)
  219. if (res.code == 0) {
  220. this.$message({
  221. type: 'error',
  222. message: res.message
  223. })
  224. } else if (res.code == 200) {
  225. console.log("登录成功,将跳转至详情页面!")
  226. this.$router.push({ path: this.redirect || '/', query: this.otherQuery })
  227. } else if (res.code != 0 && res.code != 200) {
  228. this.$message({
  229. type: 'error',
  230. message: res.message
  231. })
  232. }
  233. })
  234. .catch(() => {
  235. this.loading = false
  236. })
  237. } else {
  238. console.log('表单填写错误!请检查!')
  239. return false
  240. }
  241. })
  242. },
  243. // 请求图形验证码
  244. getImgCode() {
  245. const that = this
  246. this.$store.dispatch('user/getImgCode').then(res => {
  247. if (res.code == 200) {
  248. console.log(res)
  249. //that.codeImg = res.data
  250. that.codeImg = res.data.img;
  251. that.loginForm.code = res.data.code;
  252. console.log(that.loginForm)
  253. } else {
  254. this.$message.error("获取验证码失败,请稍后再试!")
  255. }
  256. }).catch(() => {
  257. this.loading = false
  258. })
  259. },
  260. getOtherQuery(query) {
  261. return Object.keys(query).reduce((acc, cur) => {
  262. if (cur !== 'redirect') {
  263. acc[cur] = query[cur]
  264. }
  265. return acc
  266. }, {})
  267. },
  268. // 单点登录 start ---------------------------------------->
  269. // 使用字符串操作提取 backurl 参数的值
  270. getBackUrl(url) {
  271. const params = url.split('?')[1]; // 获取问号后面的部分
  272. if (params) {
  273. const paramArray = params.split('&'); // 分割参数
  274. for (let param of paramArray) {
  275. const [key, value] = param.split('='); // 分割键值对
  276. if (key === 'backurl') {
  277. return decodeURIComponent(value); // 返回解码后的 backurl 值
  278. }
  279. }
  280. }
  281. return null; // 如果没有找到 backurl 参数,返回 null
  282. },
  283. //登录分路器 start ---------------------------------------->
  284. singleLogin() {
  285. //获得当前域名
  286. const urlString = window.location.href;
  287. // 创建一个URL对象
  288. const url = new URL(urlString);
  289. // 获取hash部分(即#后面的部分)
  290. const hash = url.hash;
  291. // 从hash中提取查询参数
  292. const hashParams = new URLSearchParams(hash.split('?')[1]);
  293. // 获取backurl参数的值
  294. const backurl = hashParams.get('backurl');
  295. // 获取backurl参数的值
  296. const userurl = hashParams.get('userurl');
  297. // 获取可能出现的内部值
  298. const system = hashParams.get('redirect');
  299. // 解码backurl
  300. const decodedBackurl = decodeURIComponent(backurl);
  301. const decodedUserurl = decodeURIComponent(userurl);
  302. // 第一种情况, 不含有backUrl或者userUrl 说明登录者是超级管理员
  303. if (hashParams.size == 0 || system == '/dashboard') {
  304. // 获取当前网址
  305. const currentUrl = window.location.origin.replace(/^https?:\/\//, '').split('/')[0];
  306. console.log("当前网址是:" + currentUrl);
  307. console.log("执行超级管理员登录!")
  308. this.login(1, currentUrl)
  309. setUserUrl(currentUrl, 86400)
  310. } else {
  311. // 第二种情况,含有backurl 说明是单点登录
  312. if (backurl != null) {
  313. console.log("执行单点登录!")
  314. const backurlObj = new URL(decodedBackurl);
  315. const back_url = backurlObj.hostname;
  316. this.login(2, back_url)
  317. } else if (userurl != null) {
  318. //第三种情况 含有userurl 说明是会员登录
  319. console.log(user_url)
  320. console.log("执行会员登录!")
  321. const backurlObj = new URL(decodedUserurl);
  322. const user_url = backurlObj.hostname;
  323. if (user_url == "") {
  324. this.$message.error("登录链接错误!")
  325. } else {
  326. console.log("当前登录链接是:" + user_url)
  327. this.login(3, user_url)
  328. }
  329. } else {
  330. //this.$message.error("检查登录链接失败,请从正规渠道登录!")
  331. //2025-3-21 不在验证其他可能的值,直接允许登录
  332. const currentUrl = window.location.origin.replace(/^https?:\/\//, '').split('/')[0];
  333. console.log("当前网址是:" + currentUrl);
  334. console.log("执行超级管理员登录!")
  335. this.login(1, currentUrl)
  336. setUserUrl(currentUrl, 86400)
  337. }
  338. }
  339. },
  340. // 登录分路器 end ---------------------------------------->
  341. // 登录 start ---------------------------------------->
  342. login(type, url) {
  343. console.log(BASEURL.WebCloginUrl)
  344. //超级管理员登录
  345. if (type == 1) {
  346. if (url == null || url == undefined || url == '') {
  347. this.loginForm.userurl = "localhost"
  348. } else {
  349. // 获取当前页面的 URL
  350. this.loginForm.userurl = url;
  351. }
  352. this.$refs.loginForm.validate(valid => {
  353. if (valid) {
  354. this.loading = true
  355. this.$store.dispatch('user/login', this.loginForm).then(res => {
  356. this.loading = false
  357. console.log(res)
  358. if (res.code == 0) {
  359. this.$message({
  360. type: 'error',
  361. message: res.message
  362. })
  363. } else if (res.code == 200 && res.token != '') {
  364. this.sendUrlServ()
  365. console.log("登录成功,将跳转至详情页面222!")
  366. this.$router.push({ path: this.redirect || '/', query: this.otherQuery })
  367. } else if (res.code != 0 && res.code != 200) {
  368. this.$message({
  369. type: 'error',
  370. message: res.message
  371. })
  372. } else if (res.token == '' || res.token == null || res.token == undefined) {
  373. this.$message({
  374. type: 'error',
  375. message: "登录失败!未能正确获取用户token,请重试!"
  376. })
  377. }
  378. })
  379. } else {
  380. console.log('表单填写错误!请检查!')
  381. return false;
  382. }
  383. })
  384. }
  385. //单点登录
  386. if (type == 2) {
  387. // 获取当前页面的 URL
  388. this.loginForm.backurl = url;
  389. this.$refs.loginForm.validate(valid => {
  390. if (valid) {
  391. this.loading = true
  392. this.$store.dispatch('user/login', this.loginForm)
  393. .then(res => {
  394. this.loading = false
  395. console.log(res)
  396. if (res.code == 0) {
  397. this.$message({
  398. type: 'error',
  399. message: res.message
  400. })
  401. } else if (res.code == 200 && res.token != '') {
  402. const currentUrl = window.location.href;
  403. const backurlValue = this.getBackUrl(currentUrl);
  404. console.log("单点登录成功,开始启动跳转!")
  405. console.log(backurlValue)
  406. console.log(res.data.token)
  407. this.sendUrlServ()
  408. //王鹏
  409. //window.location.href = 'http://admindev.bjzxtw.org.cn/auth/back_login.php?backurl=' + backurlValue + '&token=' + res.data.token; //dev返回链接
  410. //刘佳伟
  411. //window.location.href = BASEURL.webClogBackUrL + '?backurl=' + backurlValue + '&token=' + res.data.token; //pre返回地址
  412. //我
  413. window.location.href = backurlValue + '?backurl=' + backurlValue + '&admintoken=' + res.data.token; //pre返回地址
  414. } else if (res.code != 0 && res.code != 200) {
  415. this.$message({
  416. type: 'error',
  417. message: res.message
  418. })
  419. }
  420. })
  421. .catch(() => {
  422. this.loading = false
  423. })
  424. } else {
  425. console.log('表单填写错误!请检查!')
  426. return false
  427. }
  428. })
  429. }
  430. //会员登录
  431. if (type == 3) {
  432. this.loginForm.userurl = url;
  433. this.$refs.loginForm.validate(valid => {
  434. if (valid) {
  435. this.loading = true;
  436. this.$store.dispatch('user/login', this.loginForm).then(res => {
  437. this.loading = false
  438. console.log(res)
  439. if (res.code == 0 || res.code == -1) {
  440. this.$message({
  441. type: 'error',
  442. message: res.message
  443. })
  444. } else if (res.code == 200 && res.token != '') {
  445. this.sendUrlServ()
  446. console.log("登录成功,将跳转至详情页面!")
  447. this.$router.push({ path: this.redirect || '/', query: this.otherQuery })
  448. } else if (res.code != 0 && res.code != 200) {
  449. this.$message({
  450. type: 'error',
  451. message: res.message
  452. })
  453. } else if (res.token == '' || res.token == null || res.token == undefined) {
  454. this.$message({
  455. type: 'error',
  456. message: "登录失败!未能正确获取用户token,请重试!"
  457. })
  458. }
  459. })
  460. } else {
  461. console.log('表单填写错误!请检查!')
  462. return false;
  463. }
  464. })
  465. }
  466. },
  467. // 登录 end ---------------------------------------->
  468. // 返回原网站 start---------------------------------------->
  469. goBackWebUrl() {
  470. // 获得当前域名
  471. const urlString = window.location.href;
  472. // 创建一个URL对象
  473. const url = new URL(urlString);
  474. // 获取hash部分(即#后面的部分)
  475. const hash = url.hash;
  476. // 从hash中提取查询参数
  477. const hashParams = new URLSearchParams(hash.split('?')[1]);
  478. // 获取backurl参数的值
  479. const backurl = hashParams.get('backurl');
  480. // 解码backurl
  481. const decodedBackurl = decodeURIComponent(backurl);
  482. if (hashParams.size != 0 && backurl != null) {
  483. window.location.href = decodedBackurl
  484. } else {
  485. this.$message.error("无法返回原网站,请检查登录地址链接!")
  486. }
  487. },
  488. //登录成功通知后端 上面还有一个
  489. sendUrlServ() {
  490. //axios.get('http://admindev.bjzxtw.org.cn/auth/loginapi.php',{params: {
  491. // axios.get(BASEURL.WebCloginUrl,{params: {
  492. // token: this.$store.state.user.token
  493. // }}).then(res => {
  494. // console.log(res)
  495. // }).catch(err => {
  496. // console.log(err)
  497. // });
  498. // 新做的,待替换
  499. // this.$store.dispatch('user/loginapi', {
  500. // token: this.$store.state.user.token
  501. // }).then(res => {
  502. // console.log("单点登录成功!")
  503. // }).catch(err => {
  504. // console.log(err)
  505. // })
  506. },
  507. }
  508. }
  509. </script>
  510. <style scoped lang="less">
  511. .singleLogin {
  512. font-size: 18px;
  513. color: #666;
  514. cursor: pointer;
  515. margin-top: 30px;
  516. width: 400px;
  517. text-align: center;
  518. }
  519. /*整体盒子模型 使用display flex布局保持中间主体始终居中*/
  520. .appBox {
  521. clear: both;
  522. width: 100%;
  523. height: 100%;
  524. display: flex;
  525. align-items: center;
  526. /*中央盒子模型 在1920x1080下将会保持恒定的显示效果 低于这个分辨率左侧将会自动收缩*/
  527. .mainBox {
  528. width: 100%;
  529. max-width: 1920px;
  530. display: flex;
  531. justify-content: center;
  532. margin: 0 auto;
  533. .leftBox {
  534. width: 55%; //左侧自动收缩 最低1057 最高1920 1057/1920=55%
  535. max-width: 1057px;
  536. margin-right: 50px;
  537. max-height: 585px;
  538. height: 100vh; //自适应全屏高度
  539. position: relative;
  540. }
  541. .rightBox {
  542. max-width: 400px;
  543. height: 360px;
  544. position: relative;
  545. }
  546. }
  547. /*中央左侧main内容*/
  548. /*1.标题文字 start*/
  549. .titleBox {
  550. width: 516px;
  551. height: 280px;
  552. position: absolute;
  553. z-index: 9999;
  554. top: 5%;
  555. left: 2%;
  556. .titleEnglish {
  557. left: 0px;
  558. top: 238px;
  559. position: absolute;
  560. color: #333333;
  561. font-size: 32px;
  562. font-family: Microsoft YaHei;
  563. font-weight: 400;
  564. word-wrap: break-word
  565. }
  566. .titleChinaeseBox {
  567. left: 0px;
  568. top: 0px;
  569. position: absolute;
  570. .titleChinasesTop {
  571. color: #5570F1;
  572. font-size: 86px;
  573. font-family: Microsoft YaHei;
  574. font-weight: 700;
  575. word-wrap: break-word
  576. }
  577. .titleChinasesBottom {
  578. color: #333333;
  579. font-size: 86px;
  580. font-family: Microsoft YaHei;
  581. font-weight: 700;
  582. word-wrap: break-word
  583. }
  584. }
  585. }
  586. /*标题文字 end*/
  587. /*2.背景颜色 start*/
  588. .yellow,
  589. .blue {
  590. width: 226px;
  591. height: 226px;
  592. position: absolute;
  593. }
  594. .yellow {
  595. z-index: 1000;
  596. opacity: 0.45;
  597. top: 0;
  598. left: 0;
  599. background: #DDA82A;
  600. border-radius: 50%;
  601. filter: blur(120px)
  602. }
  603. .blue {
  604. z-index: 1001;
  605. bottom: 15%;
  606. left: 20%;
  607. background: #4461F2;
  608. border-radius: 50%;
  609. filter: blur(150px)
  610. }
  611. /*背景颜色 end*/
  612. /*3.背景图 start*/
  613. .TitleImg {
  614. display: block;
  615. position: absolute;
  616. z-index: 1100;
  617. right: 0;
  618. bottom: 0;
  619. @media (max-width: 1366px) and (max-height: 768px) {
  620. transform: scale(0.7); //稍微缩小
  621. }
  622. }
  623. /*背景图 end*/
  624. /*中央右侧main内容*/
  625. /*登录框 start*/
  626. .loginFormBox {
  627. margin-top: 15%;
  628. .inputBox {
  629. margin-bottom: 30px;
  630. .inputIcon {
  631. width: 24px;
  632. height: 24px;
  633. margin: 0 20px 0 20px;
  634. }
  635. .inputIconSmall {
  636. width: 18px;
  637. height: 18px;
  638. }
  639. }
  640. .inputBoxSpecial {
  641. justify-content: space-between;
  642. margin-bottom: 80px;
  643. }
  644. .inputBox,
  645. .inputBoxSpecial {
  646. height: 52px;
  647. width: 400px;
  648. box-sizing: border-box;
  649. align-items: center;
  650. display: flex;
  651. input {
  652. border: 0;
  653. background: transparent;
  654. font-size: 18x;
  655. }
  656. input:focus {
  657. outline: none;
  658. }
  659. }
  660. .greyBg {
  661. background: rgba(239, 241, 249, 0.60);
  662. border-radius: 8px;
  663. }
  664. .inputBoxLeft {
  665. width: 250px;
  666. height: 52px;
  667. box-sizing: border-box;
  668. align-items: center;
  669. display: flex;
  670. input {
  671. width: 150px;
  672. font-size: 16px;
  673. }
  674. .inputIcon {
  675. width: 24px;
  676. height: 24px;
  677. margin: 0 20px 0 20px;
  678. }
  679. }
  680. .inputBoxRight {
  681. width: 140px;
  682. height: 52px;
  683. position: relative;
  684. .submitCode {
  685. height: 52px;
  686. box-sizing: border-box;
  687. padding-top: 5px;
  688. padding-left: 10px;
  689. cursor: pointer;
  690. .codeImg {
  691. display: block;
  692. width: 120px;
  693. height: 42px;
  694. }
  695. }
  696. }
  697. .reloadBtn {
  698. color: #5570F1;
  699. font-size: 12px;
  700. font-family: Microsoft YaHei;
  701. font-weight: 400;
  702. word-wrap: break-word;
  703. position: absolute;
  704. bottom: -20px;
  705. right: 0;
  706. cursor: pointer
  707. }
  708. .loginBtn {
  709. width: 400px;
  710. height: 58px;
  711. background: #5570F1;
  712. box-shadow: 0px 4px 19px rgba(85, 112, 241, 0.40);
  713. border-radius: 12px;
  714. font-size: 24px;
  715. color: #fff;
  716. border: 0;
  717. }
  718. }
  719. }
  720. /*验证码*/
  721. .captcha-img {
  722. cursor: pointer;
  723. width: 120px;
  724. height: 40px;
  725. /* 调整验证码图片大小 */
  726. }
  727. .show-pwd {
  728. margin-left: 30px;
  729. }
  730. /*登录框 end*/
  731. /*此处修改了element-ui中的部分内置样式,但是通过css-scope可以保证不会污染到全局*/
  732. /*在index中使用deep或者>>>深度选择器来修改el-input的默认样式*/
  733. /deep/ .el-input__inner {
  734. background: transparent;
  735. width: 100%;
  736. border: 0;
  737. //border:0
  738. }
  739. /deep/ .el-form-item {
  740. margin-bottom: 0;
  741. }
  742. /deep/ .el-form-item__content {
  743. display: flex;
  744. width: 300px;
  745. }
  746. /deep/ .el-form-item__error {
  747. bottom: -34px;
  748. left: 15px;
  749. line-height: 30px;
  750. }
  751. </style>