change-psw.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view class="change-psw">
  3. <custom-nav :title="title"></custom-nav>
  4. <view class="content">
  5. <view class="item">
  6. <input type="text" maxlength="12" v-mode="old" :password="show1" placeholder="请输入旧密码" />
  7. <text v-if="!show1" class="cuIcon-attentionfill" @tap="switchPSW(1)"></text>
  8. <text v-else class="cuIcon-attentionforbid" @tap="switchPSW(1)"></text>
  9. </view>
  10. <view class="item">
  11. <input type="text" maxlength="12" v-mode="new1" :password="show2" placeholder="请输入6-12位新密码" />
  12. <text v-if="!show2" class="cuIcon-attentionfill" @tap="switchPSW(2)"></text>
  13. <text v-else class="cuIcon-attentionforbid" @tap="switchPSW(2)"></text>
  14. </view>
  15. <view class="item">
  16. <input type="text" maxlength="12" v-mode="new2" :password="show3" placeholder="请再次输入6-12位新密码" />
  17. <text v-if="!show3" class="cuIcon-attentionfill" @tap="switchPSW(3)"></text>
  18. <text v-else class="cuIcon-attentionforbid" @tap="switchPSW(3)"></text>
  19. </view>
  20. <view class="big-btn bg">修改密码</view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. title: '修改密码',
  29. old: '',
  30. new1: '',
  31. new2: '',
  32. show1: true,
  33. show2: true,
  34. show3: true,
  35. }
  36. },
  37. methods: {
  38. switchPSW(index) {
  39. if (index === 1) {
  40. this.show1 = !this.show1
  41. } else if (index === 2) {
  42. this.show2 = !this.show2
  43. } else if (index === 3) {
  44. this.show3 = !this.show3
  45. }
  46. }
  47. }
  48. }
  49. </script>
  50. <style lang="scss">
  51. .change-psw {
  52. @include page();
  53. .content {
  54. .item {
  55. @include flex();
  56. height: 90rpx;
  57. width: 690rpx;
  58. font-size: 32rpx;
  59. margin: 20rpx auto;
  60. background: #FFFFFF;
  61. justify-content: flex-start;
  62. input {
  63. flex: 1;
  64. height: 100%;
  65. padding: 0 40rpx;
  66. box-sizing: border-box;
  67. }
  68. text {
  69. @include flex();
  70. width: 90rpx;
  71. height: 100%;
  72. font-size: 38rpx;
  73. &.cuIcon-attentionfill {
  74. color: $app-base-color;
  75. }
  76. }
  77. }
  78. }
  79. }
  80. </style>