login.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904
  1. <template>
  2. <div class="login-wrapper">
  3. <!-- <div class="login-title">
  4. <img src="../assets/img/login/35.png" alt=""/>
  5. </div> -->
  6. <div class="login-main">
  7. <div class="main-left">
  8. <img src="../assets/img/login/36.png" alt="" />
  9. </div>
  10. <div class="main-right">
  11. <div class="login-content">
  12. <div v-if="isPhoneLogin" class="login-phone">
  13. <div class="login-phone-content">
  14. <div class="phone-content-left">
  15. <img src="../assets/img/login/37.png" alt="" />
  16. </div>
  17. <div class="phone-content-right">
  18. <input
  19. v-model="phone"
  20. type="number"
  21. maxlength="11"
  22. placeholder="请输入手机号"
  23. />
  24. <span
  25. class="get-code"
  26. :class="{ disable: disabled }"
  27. @click="getVcode"
  28. >{{ vText }}</span
  29. >
  30. </div>
  31. </div>
  32. <div class="login-phone-code">
  33. <div class="phone-code-left">
  34. <img src="../assets/img/login/40.png" alt="" />
  35. </div>
  36. <div class="phone-code-right">
  37. <input
  38. v-model="vCode"
  39. type="text"
  40. maxlength="6"
  41. placeholder="请输入6位验证码"
  42. />
  43. </div>
  44. </div>
  45. </div>
  46. <div v-else class="login-account">
  47. <div class="login-account-content">
  48. <div class="account-content-left">
  49. <img src="../assets/img/login/39.png" alt="" />
  50. </div>
  51. <div class="account-content-right">
  52. <input
  53. v-model="account"
  54. type="text"
  55. maxlength="11"
  56. placeholder="请输入用户名或手机号"
  57. />
  58. </div>
  59. </div>
  60. <div class="login-account-code">
  61. <div class="account-code-left">
  62. <img src="../assets/img/login/38.png" alt="" />
  63. </div>
  64. <div class="account-code-right">
  65. <input
  66. v-model="password"
  67. type="password"
  68. placeholder="请输入登录密码"
  69. />
  70. </div>
  71. </div>
  72. </div>
  73. <el-radio class='login-radio' v-model="role" label="user">普通用户</el-radio>
  74. <el-radio class='login-radio' v-model="role" label="admin">管理员&nbsp;&nbsp;&nbsp;&nbsp;</el-radio>
  75. <!-- <el-radio v-model="role" label="user">普通用户</el-radio>
  76. <el-radio v-model="role" label="admin">管理员</el-radio> -->
  77. <!-- <div class="switch-login" @click="switchLogin">
  78. <img :src="isPhoneLogin ? phoneIcon : accountIcon" alt="" />
  79. </div> -->
  80. <div class="login">
  81. <img @click="login()" src="../assets/img/login/50.png" alt="" />
  82. </div>
  83. <div class="register">
  84. <img
  85. @click.stop="showSignBox"
  86. src="../assets/img/login/51.png"
  87. alt=""
  88. />
  89. <img
  90. @click.stop="showForgetBox"
  91. v-if="!isPhoneLogin"
  92. src="../assets/img/login/52.png"
  93. alt=""
  94. />
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <!--注册账号弹窗-->
  100. <van-dialog v-model="showSign" title="" :show-confirm-button="false">
  101. <img
  102. class="sign-box-close"
  103. @click="signBoxClose"
  104. src="../assets/img/login/44.png"
  105. alt=""
  106. />
  107. <div class="sign-box">
  108. <div class="sign-box-title">
  109. <img src="../assets/img/login/43.png" alt="" />
  110. </div>
  111. <div class="sign-box-account">
  112. <img src="../assets/img/login/45.png" alt="" />
  113. <input type="text" v-model="phone" placeholder="请设置您的账号" />
  114. </div>
  115. <div class="sign-box-password">
  116. <img src="../assets/img/login/41.png" alt="" />
  117. <input
  118. type="password"
  119. v-model="password"
  120. placeholder="请设置您的密码"
  121. />
  122. </div>
  123. <div class="sign-box-sure">
  124. <img src="../assets/img/login/41.png" alt="" />
  125. <input
  126. type="password"
  127. v-model="repeatPassword"
  128. placeholder="请确认您的密码"
  129. />
  130. </div>
  131. <div class="sign-submit" @click="register">
  132. <img src="../assets/img/login/42.png" alt="" />
  133. </div>
  134. </div>
  135. </van-dialog>
  136. <!--忘记密码弹窗-->
  137. <van-dialog v-model="showForget" title="" :show-confirm-button="false">
  138. <img
  139. class="forget-box-close"
  140. @click="forgetBoxClose"
  141. src="../assets/img/login/44.png"
  142. alt=""
  143. />
  144. <div class="forget-box">
  145. <div class="forget-box-title">
  146. <img src="../assets/img/login/54.png" alt="" />
  147. </div>
  148. <div class="forget-box-password">
  149. <img src="../assets/img/login/41.png" alt="" />
  150. <input type="text" placeholder="请设置您的密码" />
  151. </div>
  152. <div class="forget-box-sure">
  153. <img src="../assets/img/login/41.png" alt="" />
  154. <input type="text" placeholder="请确认您的密码" />
  155. </div>
  156. <div class="forget-box-code">
  157. <div class="forget-box-code-left">
  158. <img src="../assets/img/login/53.png" alt="" />
  159. <input type="text" placeholder="请输入您的手机号码" />
  160. <img class="get-code" src="../assets/img/login/55.png" alt="" />
  161. </div>
  162. <div class="forget-box-code-right">
  163. <input type="text" placeholder="请输入验证码" />
  164. </div>
  165. </div>
  166. <div class="forget-submit">
  167. <img src="../assets/img/login/56.png" alt="" />
  168. </div>
  169. </div>
  170. </van-dialog>
  171. </div>
  172. </template>
  173. <script>
  174. import mixinFun from "../mixin/mixinFun";
  175. import { oSessionStorage } from "../utils/utils";
  176. import PhoneIcon from "@/assets/img/login/48.png";
  177. import AccountIcon from "@/assets/img/login/49.png";
  178. var md5 = require("md5");
  179. export default {
  180. name: "login",
  181. components: {},
  182. mixins: [mixinFun],
  183. data() {
  184. return {
  185. role:'user',
  186. isPhoneLogin: false,
  187. phoneIcon: PhoneIcon,
  188. accountIcon: AccountIcon,
  189. showSign: false, //注册弹窗显示
  190. showForget: false, //忘记密码弹窗显示
  191. phone: "", //电话号码
  192. // checkCode: "",
  193. account: "", //账号
  194. password: "", //密码
  195. repeatPassword: "", //确认密码
  196. vCode: "", //验证码
  197. vText: "获取验证码", //倒计时文案
  198. disabled: false, //验证码按钮禁用
  199. timer: null,
  200. };
  201. },
  202. created() {},
  203. mounted() {
  204. window.screen.orientation.lock("landscape-primary");
  205. //获取路径上的参数 //注册的时候将参数传过去
  206. //如果不传则是undefined
  207. //注册的时候尽量使用一种方式,账号密码的方式,因为一个人同时用两种会当为俩客户。
  208. //注册信息需要哪些?
  209. //管理员在哪下载二维码
  210. },
  211. activated() {},
  212. methods: {
  213. switchLogin() {
  214. this.isPhoneLogin = !this.isPhoneLogin;
  215. },
  216. login() {
  217. if (this.isPhoneLogin) {
  218. // 手机号验证码登陆
  219. if (!this.phone) {
  220. this.$toast.fail("请输入手机号");
  221. return;
  222. } else if (!this.myPhoneReg.test(this.phone)) {
  223. this.$toast.fail("请输入正确的手机号");
  224. return;
  225. } else if (!this.vCode) {
  226. this.$toast.fail("请输入验证码");
  227. return;
  228. }
  229. //登陆接口调用
  230. this.$http.post(
  231. "v1/system/login",
  232. {
  233. phone: this.phone,
  234. password: this.password,
  235. type: 1,
  236. authCode: this.vCode,
  237. },
  238. (res) => {
  239. if (res && res.code == 200) {
  240. oSessionStorage.setItem(
  241. "userInfo",
  242. JSON.stringify(res.data.user)
  243. );
  244. oSessionStorage.setItem("token", res.data.token);
  245. this.$router.push({ path: "/home" });
  246. } else {
  247. this.$toast.fail(res.msg);
  248. }
  249. }
  250. );
  251. } else {
  252. // 账号密码登陆
  253. if (!this.account) {
  254. this.$toast.fail("请输入账号");
  255. return;
  256. } else if (!this.password) {
  257. this.$toast.fail("请输入密码");
  258. return;
  259. }
  260. this.goLogin();
  261. }
  262. },
  263. showSignBox() {
  264. this.showSign = true;
  265. },
  266. signBoxClose() {
  267. this.showSign = false;
  268. },
  269. showForgetBox() {
  270. this.showForget = true;
  271. },
  272. forgetBoxClose() {
  273. this.showForget = false;
  274. },
  275. goLogin() {
  276. this.$http.post(
  277. "/v1/system/login",
  278. {
  279. phone: this.account,
  280. password: md5(this.password),
  281. authCode: this.authCode,
  282. type: 0,
  283. },
  284. (res) => {
  285. if (res && res.code == 200) {
  286. oSessionStorage.setItem("userInfo", JSON.stringify(res.data.user));
  287. oSessionStorage.setItem("token", res.data.token);
  288. //如果类型返回的是0则为普通用户
  289. //如果类型返回的是1则为管理员用户
  290. if (res.data.user.roleType === "0") {
  291. this.$router.push({ path: "/home" });
  292. // this.$router.push({ path: "/manageMain" });
  293. } else {
  294. this.$router.push({ path: "/manageMain" });
  295. }
  296. } else {
  297. this.$toast.fail(res.msg);
  298. }
  299. }
  300. );
  301. },
  302. // 获取短信验证码
  303. getVcode() {
  304. if (!this.phone) {
  305. this.$toast("请输入手机号码");
  306. return;
  307. } else if (!this.myPhoneReg.test(this.phone)) {
  308. this.$toast.fail("请输入正确的手机号");
  309. return;
  310. }
  311. this.disabled = true;
  312. this.$http.get(`v1/system/verificationCode/${this.phone}`, {}, (res) => {
  313. // this.vCode = res.data;
  314. if (res && res.code == 200) {
  315. this.countDown();
  316. this.$toast("短信验证码已发送到您的手机");
  317. } else {
  318. this.disabled = false;
  319. this.$toast.fail(res.msg);
  320. }
  321. });
  322. },
  323. // 倒计时
  324. countDown() {
  325. let time = 60;
  326. this.disabled = true;
  327. this.vText = time + "s";
  328. this.timer = setInterval(() => {
  329. if (time <= 0) {
  330. clearInterval(this.timer);
  331. this.vText = "重新获取";
  332. this.disabled = false;
  333. } else {
  334. time--;
  335. this.vText = time + "s";
  336. }
  337. }, 1000);
  338. },
  339. register() {
  340. this.$http.post(
  341. "v1/system/registerUser",
  342. {
  343. phone: this.phone,
  344. password: md5(this.password),
  345. confirmPassword: md5(this.repeatPassword),
  346. },
  347. (res) => {
  348. if (res && res.code == 200) {
  349. this.$toast.success(res.msg);
  350. this.showSign = false;
  351. // this.$router.push({ path: "/" });
  352. } else {
  353. this.$toast.fail(res.msg);
  354. }
  355. }
  356. );
  357. },
  358. },
  359. // beforeRouteEnter(to, from, next){
  360. // next(vm => {
  361. // if(from.path != "" && from.path != ""){
  362. // vm.phone = ""
  363. // vm.sms = ""
  364. // }
  365. // })
  366. // },
  367. };
  368. </script>
  369. <style scoped>
  370. .login-radio>>> .el-radio__label {
  371. font-size: 0.27333rem !important;
  372. }
  373. </style>
  374. <style lang="less" scoped>
  375. @import "../styles/theme.less";
  376. .login-wrapper {
  377. max-width: 100%;
  378. height: 100%;
  379. background: url(../assets/img/login/46.png) no-repeat center top;
  380. -webkit-background-size: 100% 100%;
  381. background-size: 100% 100%;
  382. position: relative;
  383. overflow: hidden;
  384. .login-title {
  385. position: absolute;
  386. left: 5px;
  387. top: 0;
  388. /*width: 110px;*/
  389. width: 22vmax;
  390. img {
  391. width: 100%;
  392. }
  393. }
  394. .login-main {
  395. width: 100%;
  396. height: 100%;
  397. .flex();
  398. .flex-direction(row);
  399. .flex-wrap(nowrap);
  400. .justify-content(space-around);
  401. .align-items(center);
  402. .main-left {
  403. /*width: 40%;*/
  404. /*height: 90%;*/
  405. width: 42vmax;
  406. height: 90vmin;
  407. img {
  408. width: 100%;
  409. }
  410. }
  411. .main-right {
  412. /*width: 45%;*/
  413. /*height: 95%;*/
  414. width: 47vmax;
  415. height: 95vmin;
  416. background: url(../assets/img/login/47.png) no-repeat center top;
  417. -webkit-background-size: 100% 100%;
  418. background-size: 100% 100%;
  419. position: relative;
  420. .login-content {
  421. width: 100%;
  422. height: 100%;
  423. box-sizing: border-box;
  424. padding: 35vmin 10vmax 10vmin 8vmax;
  425. /*background: #00b5a9;*/
  426. /*opacity: .5;*/
  427. .login-phone {
  428. width: 100%;
  429. /*background: red;*/
  430. .login-phone-content,
  431. .login-phone-code {
  432. width: 100%;
  433. /*height: 30px;*/
  434. height: 10vmin;
  435. box-sizing: border-box;
  436. /*padding: 4px;*/
  437. padding: 1vmin;
  438. /*background: #2EB2F8;*/
  439. .flex();
  440. .flex-direction(row);
  441. .flex-wrap(nowrap);
  442. .justify-content(space-between);
  443. .align-items(center);
  444. .phone-content-left,
  445. .phone-code-left {
  446. width: 25%;
  447. }
  448. .phone-content-right,
  449. .phone-code-right {
  450. height: 100%;
  451. width: 74%;
  452. background: #fff;
  453. border-radius: 10px;
  454. box-sizing: border-box;
  455. padding: 5px;
  456. input {
  457. width: 100%;
  458. height: 100%;
  459. background: none;
  460. font-size: 11px;
  461. }
  462. input::placeholder {
  463. font-size: 11px;
  464. }
  465. input::-webkit-input-placeholder {
  466. // chrome、safari私有属性
  467. font-size: 11px;
  468. }
  469. input::-moz-input-placeholder {
  470. // firefox浏览器私有属性
  471. font-size: 11px;
  472. }
  473. input::-ms-input-placeholder {
  474. // IE浏览器私有属性
  475. font-size: 11px;
  476. }
  477. }
  478. .phone-content-right {
  479. position: relative;
  480. .get-code {
  481. display: inline-block;
  482. width: 45%;
  483. position: absolute;
  484. font-size: 8px;
  485. color: #ff9d5b;
  486. /*top: 5px;*/
  487. top: 50%;
  488. transform: translateY(-50%);
  489. right: 0;
  490. background: #fff;
  491. z-index: 100;
  492. cursor: pointer;
  493. border-radius: 5px;
  494. }
  495. .disable {
  496. pointer-events: none;
  497. /*background: #666;*/
  498. }
  499. }
  500. }
  501. .login-phone-content {
  502. }
  503. .login-phone-code {
  504. }
  505. }
  506. .login-account {
  507. width: 100%;
  508. .login-account-content,
  509. .login-account-code {
  510. width: 100%;
  511. /*height: 30px;*/
  512. height: 10vmin;
  513. box-sizing: border-box;
  514. /*padding: 4px;*/
  515. padding: 1vmin;
  516. .flex();
  517. .flex-direction(row);
  518. .flex-wrap(nowrap);
  519. .justify-content(space-between);
  520. .align-items(center);
  521. .account-content-left,
  522. .account-code-left {
  523. width: 25%;
  524. img {
  525. width: 70%;
  526. }
  527. }
  528. .account-content-right,
  529. .account-code-right {
  530. height: 100%;
  531. width: 74%;
  532. background: #fff;
  533. border-radius: 10px;
  534. box-sizing: border-box;
  535. padding: 5px;
  536. input {
  537. width: 100%;
  538. height: 100%;
  539. background: none;
  540. font-size: 11px;
  541. }
  542. input::placeholder {
  543. font-size: 11px;
  544. }
  545. input::-webkit-input-placeholder {
  546. // chrome、safari私有属性
  547. font-size: 11px;
  548. }
  549. input::-moz-input-placeholder {
  550. // firefox浏览器私有属性
  551. font-size: 11px;
  552. }
  553. input::-ms-input-placeholder {
  554. // IE浏览器私有属性
  555. font-size: 11px;
  556. }
  557. }
  558. }
  559. }
  560. .login-radio{
  561. margin-top:8px;
  562. margin-bottom:8px;
  563. }
  564. .switch-login {
  565. .flex();
  566. .flex-direction(row);
  567. .flex-wrap(nowrap);
  568. .justify-content(flex-end);
  569. .align-items(center);
  570. box-sizing: border-box;
  571. padding: 3px;
  572. img {
  573. width: 45%;
  574. }
  575. }
  576. .login {
  577. .flex();
  578. .flex-direction(row);
  579. .flex-wrap(nowrap);
  580. .justify-content(center);
  581. .align-items(center);
  582. box-sizing: border-box;
  583. padding: 4px 0;
  584. img {
  585. width: 50%;
  586. }
  587. }
  588. .register {
  589. .flex();
  590. .flex-direction(row);
  591. .flex-wrap(nowrap);
  592. .justify-content(space-around);
  593. .align-items(center);
  594. padding: 2px 0;
  595. /*box-sizing: border-box;*/
  596. /*padding: 4px 0;*/
  597. img {
  598. width: 25%;
  599. }
  600. }
  601. }
  602. }
  603. }
  604. /*弹窗样式*/
  605. .van-dialog {
  606. top: 50%;
  607. width: 60%;
  608. height: 85%;
  609. background: #ffecaf;
  610. border: 8px solid #ffa920;
  611. -webkit-border-radius: 30px;
  612. overflow: unset;
  613. /deep/.van-dialog__content {
  614. width: 100%;
  615. height: 100%;
  616. position: relative;
  617. }
  618. }
  619. .sign-box-close {
  620. position: absolute;
  621. width: 20px;
  622. top: -15px;
  623. right: -30px;
  624. z-index: 10000;
  625. }
  626. .sign-box {
  627. width: 100%;
  628. height: 100%;
  629. box-sizing: border-box;
  630. /*background: #ffecaf;*/
  631. /*border: 8px solid #ffa920;*/
  632. /*-webkit-border-radius: 30px;*/
  633. /*border-radius: 30px;*/
  634. padding: 3vh 8vh;
  635. .sign-box-title,
  636. .sign-box-account,
  637. .sign-box-password,
  638. .sign-box-sure,
  639. .sign-submit {
  640. .flex();
  641. .flex-direction(row);
  642. .flex-wrap(nowrap);
  643. .align-items(center);
  644. }
  645. .sign-box-title {
  646. .justify-content(center);
  647. margin-bottom: 5px;
  648. img {
  649. width: 15%;
  650. }
  651. }
  652. .sign-box-account,
  653. .sign-box-password,
  654. .sign-box-sure {
  655. .justify-content(space-between);
  656. box-sizing: border-box;
  657. height: 10vmin;
  658. /*padding: 1.6vh 3vh 1.6vh 3vh;*/
  659. padding: 0 5px;
  660. background-color: #fff;
  661. -webkit-border-radius: 30px;
  662. border-radius: 60px;
  663. margin-bottom: 10px;
  664. line-height: 30px;
  665. box-shadow: 0 4px #ff9758;
  666. img {
  667. width: 9%;
  668. }
  669. input {
  670. width: 80%;
  671. height: 100%;
  672. background: none;
  673. font-size: 12px;
  674. }
  675. input::placeholder {
  676. font-size: 12px;
  677. color: #f7db86;
  678. }
  679. input::-webkit-input-placeholder {
  680. // chrome、safari私有属性
  681. font-size: 12px;
  682. color: #f7db86;
  683. }
  684. input::-moz-input-placeholder {
  685. // firefox浏览器私有属性
  686. font-size: 12px;
  687. color: #f7db86;
  688. }
  689. input::-ms-input-placeholder {
  690. // IE浏览器私有属性
  691. font-size: 12px;
  692. color: #f7db86;
  693. }
  694. }
  695. }
  696. .forget-box-close {
  697. position: absolute;
  698. width: 20px;
  699. top: -15px;
  700. right: -30px;
  701. z-index: 10000;
  702. }
  703. .forget-box {
  704. width: 100%;
  705. height: 100%;
  706. box-sizing: border-box;
  707. /*background: #ffecaf;*/
  708. /*border: 8px solid #ffa920;*/
  709. /*-webkit-border-radius: 30px;*/
  710. /*border-radius: 30px;*/
  711. padding: 3vh 8vh;
  712. .forget-box-title,
  713. .forget-box-password,
  714. .forget-box-sure,
  715. .forget-submit,
  716. .forget-box-code {
  717. .flex();
  718. .flex-direction(row);
  719. .flex-wrap(nowrap);
  720. .align-items(center);
  721. }
  722. .forget-box-title {
  723. .justify-content(center);
  724. margin-bottom: 5px;
  725. img {
  726. width: 30%;
  727. }
  728. }
  729. .forget-box-password,
  730. .forget-box-sure {
  731. .justify-content(space-between);
  732. box-sizing: border-box;
  733. height: 10vmin;
  734. /*padding: 1.6vh 3vh 1.6vh 3vh;*/
  735. padding: 0 5px;
  736. background-color: #fff;
  737. -webkit-border-radius: 30px;
  738. border-radius: 60px;
  739. margin-bottom: 10px;
  740. line-height: 30px;
  741. box-shadow: 0 4px #ff9758;
  742. img {
  743. width: 9%;
  744. }
  745. input {
  746. width: 80%;
  747. height: 100%;
  748. background: none;
  749. font-size: 12px;
  750. }
  751. input::placeholder {
  752. font-size: 12px;
  753. color: #f7db86;
  754. }
  755. input::-webkit-input-placeholder {
  756. // chrome、safari私有属性
  757. font-size: 12px;
  758. color: #f7db86;
  759. }
  760. input::-moz-input-placeholder {
  761. // firefox浏览器私有属性
  762. font-size: 12px;
  763. color: #f7db86;
  764. }
  765. input::-ms-input-placeholder {
  766. // IE浏览器私有属性
  767. font-size: 12px;
  768. color: #f7db86;
  769. }
  770. }
  771. .forget-box-code {
  772. .justify-content(space-between);
  773. .forget-box-code-left {
  774. .flex();
  775. .flex-direction(row);
  776. .flex-wrap(nowrap);
  777. .justify-content(space-between);
  778. .align-items(center);
  779. position: relative;
  780. box-sizing: border-box;
  781. width: 65%;
  782. height: 10vmin;
  783. /*padding: 1.6vh 3vh 1.6vh 3vh;*/
  784. padding: 0 5px;
  785. background-color: #fff;
  786. -webkit-border-radius: 30px;
  787. border-radius: 60px;
  788. margin-bottom: 10px;
  789. line-height: 30px;
  790. box-shadow: 0 4px #ff9758;
  791. img {
  792. width: 12%;
  793. }
  794. input {
  795. width: 80%;
  796. background: none;
  797. font-size: 12px;
  798. }
  799. input::placeholder {
  800. font-size: 12px;
  801. color: #f7db86;
  802. }
  803. input::-webkit-input-placeholder {
  804. // chrome、safari私有属性
  805. font-size: 12px;
  806. color: #f7db86;
  807. }
  808. input::-moz-input-placeholder {
  809. // firefox浏览器私有属性
  810. font-size: 12px;
  811. color: #f7db86;
  812. }
  813. input::-ms-input-placeholder {
  814. // IE浏览器私有属性
  815. font-size: 12px;
  816. color: #f7db86;
  817. }
  818. .get-code {
  819. width: 30%;
  820. position: absolute;
  821. top: 50%;
  822. transform: translateY(-50%);
  823. right: 5px;
  824. background: #fff;
  825. z-index: 10000;
  826. border-radius: 5px;
  827. }
  828. }
  829. .forget-box-code-right {
  830. box-sizing: border-box;
  831. width: 30%;
  832. height: 10vmin;
  833. padding: 0 2px;
  834. background-color: #fff;
  835. -webkit-border-radius: 30px;
  836. border-radius: 60px;
  837. margin-bottom: 10px;
  838. line-height: 30px;
  839. box-shadow: 0 4px #ff9758;
  840. input {
  841. width: 90%;
  842. background: none;
  843. font-size: 12px;
  844. }
  845. input::placeholder {
  846. font-size: 12px;
  847. color: #f7db86;
  848. }
  849. input::-webkit-input-placeholder {
  850. // chrome、safari私有属性
  851. font-size: 12px;
  852. color: #f7db86;
  853. }
  854. input::-moz-input-placeholder {
  855. // firefox浏览器私有属性
  856. font-size: 12px;
  857. color: #f7db86;
  858. }
  859. input::-ms-input-placeholder {
  860. // IE浏览器私有属性
  861. font-size: 12px;
  862. color: #f7db86;
  863. }
  864. }
  865. }
  866. }
  867. }
  868. </style>