index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. <template>
  2. <view>
  3. <sanshuiModal ref="ssModal" :mode="_parentMode" :position="_parentPosition" @change="changeModal">
  4. <view class="digital-keyboard-modal" :class="'digital-keyboard-modal-' + _mode">
  5. <view class="dk-close" v-if="_mode !== 1 && _mode !== 4" @click="close()">
  6. <icon type="clear" color="#333" :size="u50"></icon>
  7. </view>
  8. <swiper class="dk-swiper" :current="current">
  9. <swiper-item @touchmove.prevent.stop>
  10. <view class="dk-title">{{_titleObj.title}}</view>
  11. <view class="dk-subtitle">{{_titleObj.subTitle}}</view>
  12. <view class="pwd-box clearfix" @click="getKeyboard">
  13. <view class="pwd-text" v-for="(item,index) in _digits" :key="index" :data-index="index" :class="{active:(activeInput == index)}">{{payPassWord[index]}}</view>
  14. </view>
  15. </swiper-item>
  16. <!-- 设置新支付密码 -->
  17. <block v-if="_mode === 2 || _mode === 5">
  18. <swiper-item @touchmove.prevent.stop>
  19. <view class="dk-title">{{_titleObj.title}}</view>
  20. <view class="dk-subtitle">{{_titleObj.twoSubTitle}}</view>
  21. <view class="pwd-box clearfix" @click="getKeyboard">
  22. <view class="pwd-text" v-for="(item,index) in _digits" :key="index" :data-index="index" :class="{active:(activeInput==index)}">{{payPassWord[index]}}</view>
  23. </view>
  24. </swiper-item>
  25. </block>
  26. <!-- 修改支付密码 -->
  27. <block v-else-if="_mode === 3">
  28. <swiper-item @touchmove.prevent.stop>
  29. <view class="dk-title">{{_titleObj.twoTitle}}</view>
  30. <view class="dk-subtitle">{{_titleObj.twoSubTitle}}</view>
  31. <view class="pwd-box clearfix" @click="getKeyboard">
  32. <view class="pwd-text" v-for="(item,index) in _digits" :key="index" :data-index="index" :class="{active:(activeInput==index)}">{{payPassWord[index]}}</view>
  33. </view>
  34. </swiper-item>
  35. <swiper-item @touchmove.prevent.stop>
  36. <view class="dk-title">{{_titleObj.threeTitle}}</view>
  37. <view class="dk-subtitle">{{_titleObj.threeSubTitle}}</view>
  38. <view class="pwd-box clearfix" @click="getKeyboard">
  39. <view class="pwd-text" v-for="(item,index) in _digits" :key="index" :data-index="index" :class="{active:(activeInput==index)}">{{payPassWord[index]}}</view>
  40. </view>
  41. </swiper-item>
  42. </block>
  43. </swiper>
  44. <block v-if="_mode !== 1 && _mode !== 4">
  45. <view class="pwd-tips">支付密码为6位数字,用于提现、设置密保、添加银行卡等操作,可保障资金安全</view>
  46. <view class="pwd-tips pwd-tips-errot">{{msgText}}</view>
  47. </block>
  48. <view class="pwd-forget">
  49. <text v-if="_forget && _mode === 1" @click="forgetPwd">忘记支付密码</text>
  50. </view>
  51. <view class="digital-keyboard" :class="{'digital-keyboard-show' : dkFlag || _mode === 1 || _mode === 4}">
  52. <view class="dk-down" v-if="_mode !== 1 && _mode !== 4">
  53. <block v-if="showPrevText">
  54. <view class="dk-submit dk-return" @click="changeSwiper(-1)">上一步</view>
  55. </block>
  56. <view class="dk-down-icon" @click="changeKeyboard(!dkFlag)"></view>
  57. <block v-if="trigger === 'auto' && !(_mode === 2 && current === 0)">
  58. <view class="dk-submit" @click="submit(true)">完成</view>
  59. </block>
  60. </view>
  61. <view class="digital-key-box clearfix">
  62. <view class="num" v-for="item in digitalList" :key="item" :class="{'no-num':(item === '' || item === '-1')}"
  63. @click="getKeyNumber(item)">{{item}}</view>
  64. </view>
  65. </view>
  66. </view>
  67. </sanshuiModal>
  68. </view>
  69. </template>
  70. <script>
  71. //依赖的弹窗模块
  72. import sanshuiModal from '@/components/sanshui-modal'
  73. export default {
  74. components: {
  75. sanshuiModal
  76. },
  77. data() {
  78. return {
  79. activeInput: 0,//当前输入的下标
  80. digitalList: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '', '0', '-1'],//键盘
  81. paymentPwd: '',//支付密码内容
  82. dkFlag: true,//支付密码键盘的显示与隐藏
  83. current: 0,
  84. paymentPwds: [],//上一次支付密码内容,历史支付密码,
  85. msgText: '',
  86. u50: uni.upx2px(50)
  87. };
  88. },
  89. props: {
  90. value: {
  91. type: String,
  92. default: ''
  93. },
  94. digits: {
  95. type: [Number, String],
  96. default: 6
  97. },
  98. forget: {
  99. type: Boolean,
  100. default: true
  101. },
  102. /*
  103. * 可选值说明(这一个顺序最好不要改,跟当前步骤步进行有关系,自动提交要用到mode跟current的判断 是否要自动提交)
  104. * 1 支付密码校验(用于校验安全)
  105. * 2 设置支付密码(2步 输入=》确认输入)
  106. * 3 修改支付密码(3步 原支付密码=》输入=》确认输入)
  107. * 4 找回登录密码(同mode = 1一样,就怕后端校验接口不一样而额外添加的一个mode)
  108. * 5 重置支付密码
  109. */
  110. mode: {
  111. type: [Number, String],
  112. default: 1
  113. },
  114. /*
  115. * 可选值说明
  116. * hand 手动
  117. * auto 自动
  118. */
  119. trigger: {
  120. type: String,
  121. default: 'auto'
  122. },
  123. userName: {
  124. type: String,
  125. default: ''
  126. }
  127. },
  128. computed: {
  129. payPassWord () {
  130. var payPassWord = this.paymentPwd.split('') || [];
  131. payPassWord.fill('*');
  132. return payPassWord;
  133. },
  134. _forget () {
  135. return String(this.forget) === 'false' ? false : true;
  136. },
  137. _digits () {
  138. return isNaN(this.digits) ? 6 : parseInt(this.digits);
  139. },
  140. _mode () {
  141. if(isNaN(this.mode) || !this.mode){
  142. return 1;
  143. }
  144. return +this.mode
  145. },
  146. _titleObj () {
  147. let arr = [
  148. {
  149. title: '输入支付密码',
  150. subTitle: '请输入支付密码'
  151. },
  152. {
  153. title: '设置支付密码',
  154. subTitle: '请设置支付密码',
  155. twoSubTitle: '请再次输入支付密码以确认'
  156. },
  157. {
  158. title: '修改支付密码',
  159. twoTitle: '设置支付密码',
  160. threeTitle: '设置支付密码',
  161. subTitle: '请输入支付密码 以验证身份',
  162. twoSubTitle: '请设置新的支付密码',
  163. threeSubTitle: '请再次输入支付密码以确认',
  164. },
  165. {
  166. title: '输入支付密码',
  167. subTitle: '请输入支付密码'
  168. },
  169. {
  170. title: '重置支付密码',
  171. subTitle: '请输入支付密码',
  172. twoSubTitle: '请再次输入支付密码以确认'
  173. }
  174. ]
  175. return arr[this._mode-1];
  176. },
  177. _parentMode () {
  178. return this._mode === 1 || this._mode === 4 ? 'full' : 'cover';
  179. },
  180. _parentPosition () {
  181. return this._mode === 1 || this._mode === 4 ? 'bottom' : 'middle';
  182. },
  183. showPrevText () {
  184. return this.current >= (this._mode - 1) || (this._mode === 5 && this.current > 0) ? true : false;
  185. }
  186. },
  187. methods: {
  188. // 模态框显示或者关闭的回调
  189. changeModal (e) {// 返回是一个Boolean值
  190. if(e){
  191. this.current = 0;
  192. this.changeKeyboard();//默认拉起键盘
  193. }else{
  194. this.changeKeyboard(false);//默认拉起键盘
  195. this.clearAll();
  196. }
  197. },
  198. // 开关键盘
  199. changeKeyboard(flag = true) {
  200. this.dkFlag = flag;
  201. !flag && (this.activeInput = -1);
  202. },
  203. /*
  204. pro可选址
  205. show 显示
  206. hide 隐藏
  207. toggle 动态判断
  208. */
  209. modalFun(pro){
  210. this.$refs.ssModal[pro]();
  211. },
  212. clear () {
  213. this.paymentPwd = '';
  214. this.activeInput = 0;
  215. this.paymentPwds.splice(this.current, 1);
  216. },
  217. clearAll () {
  218. this.paymentPwd = '';
  219. this.activeInput = 0;
  220. this.current = 0;
  221. this.paymentPwds = [];
  222. },
  223. showError (msg) {
  224. if(!msg) return this.msgText = '';
  225. if(this._mode !== 1 && this._mode !== 4){
  226. this.msgText = msg;
  227. }else{
  228. uni.showToast({
  229. title: msg
  230. })
  231. }
  232. },
  233. forgetPwd () {
  234. console.log('这里是忘记密码跳转逻辑');
  235. uni.navigateTo({
  236. url:"/pages/user/safe-pass"
  237. })
  238. },
  239. cancel () {
  240. this.$emit('cancel');
  241. },
  242. close () {
  243. let tips = '';
  244. if(this._mode === 2){
  245. tips = '您是否要放弃设置支付密码';
  246. }else if(this._mode === 5){
  247. tips = '您是否要放弃重置支付密码';
  248. }else{
  249. tips = '您是否要放弃修改支付密码';
  250. }
  251. uni.showModal({
  252. title: '关闭提示',
  253. content: tips,
  254. confirmText: '我再想想',
  255. cancelText: '关闭',
  256. success: (res) => {
  257. if(!res.confirm){
  258. this.modalFun('hide');
  259. }
  260. }
  261. })
  262. },
  263. submit (clickFlag){//clickFlag主动点击
  264. if(this.trigger !== 'auto' && !clickFlag) return;
  265. if(this.paymentPwd.length !== this._digits){
  266. this.showError('请输入' + this._digits + '位支付密码');
  267. }else{
  268. this.showError('');
  269. if(this._mode === 5 || this._mode === 4 || this.current >= (this._mode - 1)){
  270. if(this._mode === 5 && this.current === 0){//下一步,再次输入
  271. return this.changeSwiper(1);
  272. }
  273. if(this.current > 0){//需要校验2次支付密码的是否相等
  274. if(this.paymentPwd !== this.paymentPwds[this.current - 1]){
  275. this.showError('两次支付密码输入不一致');
  276. setTimeout(() => {
  277. this.paymentPwd = '';
  278. this.paymentPwds[this.current] = '';
  279. this.activeInput = 0;
  280. }, 300)
  281. return ;
  282. }
  283. this.showError('');
  284. if(this._mode === 2){//设置支付密码
  285. uni.showLoading({
  286. title: '正在设置密码'
  287. });
  288. // 如果不把逻辑卸载这里面,直接把setTimeout删除即可
  289. setTimeout(() => {//模拟请求,把这个换成ajax请求哈,或者emit出去 外面去请求,但是建议都集成在这边 省的写一堆重置代码
  290. uni.hideLoading();
  291. let response = {//模拟返回
  292. code: 1,
  293. value: this.paymentPwd
  294. }
  295. if(response.code === 1){
  296. this.$emit('submit', {//这里是传出去给调用者的,参数任意下,只要能区分就行
  297. type: 'reset',
  298. value: this.paymentPwd
  299. });
  300. this.modalFun('hide');
  301. }
  302. }, 1000)
  303. }else{//修改支付密码
  304. uni.showLoading({
  305. title: '正在重置密码'
  306. });
  307. // 如果不把逻辑卸载这里面,直接把setTimeout删除即可
  308. setTimeout(() => {//模拟请求,把这个换成ajax请求哈,或者emit出去 外面去请求,但是建议都集成在这边 省的写一堆重置代码
  309. uni.hideLoading();
  310. let response = {//模拟返回
  311. code: 1,
  312. msg: '重置新支付密码成功'
  313. }
  314. if(response.code === 1){
  315. this.$emit('submit', {
  316. type: 'modify',
  317. value: this.paymentPwd
  318. });
  319. this.modalFun('hide');
  320. }
  321. }, 1000)
  322. }
  323. return ;
  324. }
  325. this.checkSafePwd('check');
  326. }else{
  327. if(this._mode === 3 && this.current === 0){//校验支付密码正确性
  328. this.checkSafePwd('verify');
  329. return ;
  330. }
  331. this.changeSwiper(1);
  332. }
  333. }
  334. },
  335. checkSafePwd(type) {
  336. uni.showLoading({
  337. title: '校验支付密码中'
  338. });
  339. setTimeout(() => {//模拟请求,把这个换成ajax请求哈,或者emit出去 外面去请求,但是建议都集成在这边 省的写一堆重置代码
  340. uni.hideLoading();
  341. let response = {//模拟返回
  342. code: 1,
  343. msg: '密码正确'
  344. }
  345. if(response.code === 1){
  346. if(type === 'check'){
  347. this.$emit('submit', {//设置或者重置新支付密码
  348. type: 'check',
  349. value: this.paymentPwd
  350. });
  351. this.modalFun('hide');
  352. }else{
  353. this.changeSwiper(1);//执行下一步
  354. }
  355. }else{
  356. this.clear();
  357. if(type !== 'check'){
  358. this.showError(response.msg);
  359. }
  360. }
  361. }, 1000)
  362. },
  363. changeSwiper (num) {
  364. if(isNaN(num)){
  365. num = 1;
  366. }
  367. this.current += num;
  368. this.paymentPwd = this.paymentPwds[this.current] || '';
  369. let activeInput = this.paymentPwd.length
  370. this.activeInput = activeInput - (activeInput >= this._digits ? 1 : 0);
  371. },
  372. getKeyNumber (val) {
  373. let paymentPwdArr = this.paymentPwd.split('');
  374. if (val === '' || (val != -1 && paymentPwdArr.length === this._digits)) { //空或者已经达到最大值
  375. if(paymentPwdArr.length === this._digits && this.trigger === 'auto'){
  376. this.submit();
  377. return ;
  378. }
  379. return false;
  380. } else if (val != -1) { //数字输入
  381. paymentPwdArr.splice(this.activeInput, 0, val);
  382. this.activeInput++;
  383. this.paymentPwd = paymentPwdArr.join('');
  384. this.paymentPwds[this.current] = this.paymentPwd;
  385. if(paymentPwdArr.length === this._digits && this.trigger === 'auto'){
  386. this.submit();
  387. return ;
  388. }
  389. } else { //删除
  390. if (this.activeInput >= 0) {
  391. this.activeInput !== 0 && this.activeInput--;
  392. paymentPwdArr.splice(this.activeInput, 1);
  393. this.paymentPwd = paymentPwdArr.join('');
  394. this.paymentPwds[this.current] = this.paymentPwd;
  395. }
  396. }
  397. },
  398. getKeyboard (e) {
  399. let index = e && e.target.dataset.index;
  400. if (index === undefined) {
  401. this.activeInput = 0;
  402. this.changeKeyboard(false);
  403. return ;
  404. }
  405. var _length = this.paymentPwd.length;
  406. this.activeInput = index <= _length ? index : _length;
  407. this.changeKeyboard();
  408. }
  409. }
  410. }
  411. </script>
  412. <style lang="scss">
  413. .digital-keyboard-modal{
  414. height: 100%;
  415. background-color: #fff;
  416. &.digital-keyboard-modal-1, &.digital-keyboard-modal-4 {
  417. height: auto;
  418. border-radius: 20px 20px 0px 0px;
  419. background: #fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA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TP3HAvWs38ULqL5e4fArk73jDDc3dq7WjuzqoZKvCMeribaIpU+L9CN21juyavFfP+xQvVu/BhJrEGMWSUiTdEYnrHzzLB7+gw/6b6LnbDuXmjjeWSnuZv2ok7Wo/zqIQHAC/AOfVYQ4Dk7uhsB7b+l2u93hBJtc3EnVsFuLdtSvuWCKIrpjYx4A2QcV7RV8CeQegsT71z92/UztTwHLKtP2zpxFPP84N0w4RNQNnDuWYq0rkll0RXVFOzE8PdwlsgxLLyvKqiKCvLe3gUge+vpowFJQQcYAlQwdN/BwiBBTBlgDv7QZBSJWfRU1XluWURUhSznTtMbM1UFV0adn++ACbBE/VCNNgnAAAAAElFTkSuQmCC) center top / 100% auto no-repeat;
  420. padding-padding: 0;
  421. padding-padding: constant(safe-area-inset-top);
  422. padding-padding: env(safe-area-inset-top);
  423. }
  424. &.digital-keyboard-modal-2, &.digital-keyboard-modal-5, &.digital-keyboard-modal-3{
  425. padding-top: 180rpx;
  426. .dk-title{
  427. color: #000;
  428. }
  429. .digital-keyboard{
  430. width: 100%;
  431. position: fixed;
  432. bottom: 0;
  433. left: 0;
  434. position: fixed;
  435. left: 0;
  436. bottom: 0;
  437. }
  438. }
  439. .dk-title {
  440. font-size: 36rpx;
  441. font-weight: 800;
  442. color: #fff;
  443. line-height: 90rpx;
  444. text-align: center;
  445. }
  446. .dk-swiper{
  447. height: 260rpx;
  448. }
  449. .dk-submit{
  450. position: absolute;
  451. right: 0;
  452. top: 0;
  453. padding: 0 20rpx;
  454. color: #38f;
  455. font-size: 28rpx;
  456. line-height: 70rpx;
  457. }
  458. .dk-return{
  459. right: auto;
  460. left: 0;
  461. }
  462. .dk-close{
  463. position: fixed;
  464. left: 30rpx;
  465. top: 30rpx;
  466. }
  467. .dk-subtitle {
  468. font-size: 24rpx;
  469. color: rgba(152, 152, 148, 1);
  470. line-height: 3;
  471. text-align: center;
  472. }
  473. .dk-down{
  474. text-align: center;
  475. line-height: 70rpx;
  476. box-shadow: 0 0 0 2rpx #eee;
  477. .dk-down-icon{
  478. border-left: 1px solid #bbb;
  479. border-bottom: 1px solid #bbb;
  480. width: 40rpx;
  481. height: 40rpx;
  482. display: inline-block;
  483. transform: scale(.5) rotate(-45deg);
  484. }
  485. }
  486. .pwd-tips{
  487. color: #666;
  488. font-size: 24rpx;
  489. line-height: 1.5;
  490. padding: 15rpx 100rpx;
  491. }
  492. .pwd-tips-errot{
  493. color: #ff4242;
  494. font-size: 30rpx;
  495. text-align: center;
  496. }
  497. .pwd-forget {
  498. font-size: 24rpx;
  499. color: #26C6B3;
  500. padding: 20rpx 0 30rpx;
  501. text-align: center;
  502. line-height: 33rpx;
  503. }
  504. .digital-keyboard{
  505. box-shadow: 0 -1rpx 0 3rpx #eee;
  506. width: 100%;
  507. transition: all .2s linear;
  508. transform: translateY(100%);
  509. }
  510. /* 键盘 */
  511. .digital-key-box {
  512. box-shadow: 0 0 0 2rpx #eee;
  513. position: relative;
  514. overflow: hidden;
  515. width: 100%;
  516. }
  517. .digital-keyboard-show{
  518. transform: translateY(0);
  519. }
  520. .num {
  521. transition: all .2s linear;
  522. float: left;
  523. background-color: #fff;
  524. box-shadow: 0 0 0 2rpx #eee;
  525. width: 33.33333333%;
  526. cursor: pointer;
  527. height: 100rpx;
  528. text-align: center;
  529. color: #333;
  530. line-height: 100rpx;
  531. font-size: 55rpx;
  532. font-weight: bold;
  533. position: relative;
  534. overflow: hidden;
  535. &:after {
  536. content: "";
  537. display: block;
  538. position: absolute;
  539. width: 100%;
  540. height: 100%;
  541. top: 0;
  542. left: 0;
  543. pointer-events: none;
  544. //设置径向渐变
  545. background-image: radial-gradient(circle, rgba(0, 0, 0, .65) 20%, transparent 20%);
  546. background-repeat: no-repeat;
  547. background-position: 50%;
  548. transform: scale(5);
  549. opacity: 0;
  550. transition: transform .2s ease-in-out, opacity .3s ease-in-out;
  551. }
  552. &:active:after {
  553. transform: scale(0);
  554. opacity: .5;
  555. //设置初始状态
  556. transition: 0s;
  557. }
  558. }
  559. .num:nth-of-type(3n+1) {
  560. border-bottom: 0;
  561. border-left: 0;
  562. }
  563. .num:nth-of-type(3n+2) {
  564. border-bottom: 0;
  565. border-left: 0;
  566. border-right: 0;
  567. }
  568. .num.no-num {
  569. background-color: #f2f2f2;
  570. font-size: 0;
  571. }
  572. .num:last-child {
  573. background: #f2f2f2 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAilBMVEUAAADLy8vLy8vLy8vMzMzMzMzY2NjMzMzMzMzQ0NDOzs7MzMzMzMzNzc3Pz8/T09PMzMzNzc3Nzc3Nzc3Ly8vMzMzMzMzMzMzOzs7MzMzNzc3MzMzOzs7Ozs7Q0NDMzMzMzMzMzMzOzs7Ozs7Ly8vMzMzMzMzMzMzMzMzOzs7MzMzMzMzMzMzMzMzKmFAsAAAALXRSTlMAQICZ9vAD+uoMG+eyRCsHwV5RJfvhjEw2yGdWMiEX7NWjOhL83JKGeinNu3IVbGIkAAADJklEQVR42u2Z2XLiQAxFBY3xBhgw+2IWkxAg+v/fm6lJKgGBkbrHKl76PFJQOm7crWsZPB6Px+PxeDwej0dGsm/UzB7kZJMIFYiOCYhYz1GJcCCqP0Y9hsCSp6jIJgaGXoSqLLn6G9TlCE9ZbVAZA8+YBcigK7BvIYOuQIOpry3QDZFBV2DK1NcWmI6QQVdgyNTXFlgekEFXYCD8cTeG4Rafcl7GUDQjO4EFSggG399+tlsn7a+OVqlp3OuffvbrqLo+fBPP5QKfKKJxdcdgBR9XmS6UCnygiIhfs8NNq+0IBSYoFGDv2tEUrtnJBCYoZUYMuLR1Fgm8o5gOs3NJ3pyiRMCgBQ1ydoY3eZdcfy+QCOzQhqBHumcLf2gRu3WEvEB7h3ZEOclvwY/bDG4oxsgLtDtoS0rW4JQ+/jx5Q0aA1BcTrEilf1c6Tu68GAH7+pVrvUXcFnf/DC+QXdCNVhduiPv9WJAsqUDWR1dGZL9lmV2yNF/a6M7h98RxSZbmt1U6s4BKlshhnOvTruuYbIzN+cvkDqdkYaCoI/++wwOOKBJYYB3s4A6DMoEd1mPQBqfObuCCtdBpu402DPTrWgBKHskEOlgDxnm8ZuBdYxP8tmFeoIuodhCVc8na8ZruzSC7CAQaITLwDZkiz3mG6ZjWkaTs2T1pmf+cRqUnEoneaEyDZcgKuM/j0vz+vm/NgOZ1RsDdYLymO//hXbEPWAGYuRikyePBejglBqeIEXCbyganqsH6iBr0AkbAZS5N/+vVpjqqQvfACDhM5pfP4v9hKExHxvndRIfGf+Z87PMCkNsYJOThnAvLe0bA9v3QnAx22R6Vixr5WmzQvznsRnxYHjAC1u/o8qvrF+SEMmUErA3m5c3jF2dgxFkqkRpEs6+G28QnXArmGcFUBimeVjOG9p4JPZtjDpBNrNJk8Ya1so1s42yxRU14ASgZA2UB3kBfAMozMigLQMwYKAswgxt9AWZ0pS/ADO8UBF5mYMDNQF9APMLVGbCRIb4iC3itQZjAaw2OAC81OGcgMZigEiYGGeWwqcDnCjwej8fj8Xg8Ho/nL38AXRgT/6dxCesAAAAASUVORK5CYII=) center center / auto 50rpx no-repeat;
  574. }
  575. .pwd-box {
  576. padding-left: 10rpx;
  577. position: relative;
  578. text-align: center;
  579. }
  580. .pwd-text {
  581. position: relative;
  582. line-height: 110rpx;
  583. vertical-align: middle;
  584. text-align: center;
  585. font-size: 50rpx;
  586. font-weight: bold;
  587. width: 92rpx;
  588. height: 92rpx;
  589. margin-right: 10rpx;
  590. display: inline-block;
  591. box-shadow: 0 0 0 2rpx #ccc;
  592. overflow: hidden;
  593. }
  594. .pwd-text.active:after {
  595. -webkit-animation: twinkle 1s infinite;
  596. animation: twinkle 1s infinite;
  597. height: 70%;
  598. width: 4rpx;
  599. content: '';
  600. position: absolute;
  601. top: 15%;
  602. left: 50%;
  603. margin-left: -2rpx;
  604. background-color: #4fa5e1;
  605. }
  606. @keyframes twinkle {
  607. from {
  608. background-color: #4fa5e1;
  609. }
  610. to {
  611. background-color: transparent;
  612. }
  613. }
  614. }
  615. </style>