change-pass.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <view class="change-pass-box">
  3. <en-nav title="实名认证" :title-color="'#333'" ></en-nav>
  4. <view class="change-pass-data">
  5. <view class="phone-data">
  6. <view class="phone-text sys-color-black sys-weight-600 ">+1888****4188</view>
  7. <view class="phone-but sys-color-black sys-background-yellow">获取验证码</view>
  8. </view>
  9. <view class="from-text from-item">
  10. <input type="number" class="from-input sys-color-black" v-model="code" placeholder="请输入验证码"></input>
  11. </view>
  12. <view class="from-text from-item">
  13. <input type="password" class="from-input sys-color-black" v-model="password" placeholder="请设置密码"></input>
  14. </view>
  15. <view class="warn-text sys-color-gray-9">
  16. 请输入至少6个数字,字母和符号组成的密码
  17. </view>
  18. </view>
  19. <view class="login-bottom">
  20. <view class="login-but sys-color-white sys-background-black sys-selected-but" @click="setNextStep" :class="{'sys-unselected-but':!isOK,'apply-shake':isShakeBut}">下一步</view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import EnNav from "@/components/en-utils/en-nav/en-nav";
  26. import tools from "@/service/tools";
  27. export default {
  28. name: "change-pass",
  29. components: {EnNav},
  30. props: {},
  31. data() {
  32. return {
  33. code:'',
  34. password:'',
  35. isOK:false,
  36. isShakeBut:false,
  37. }
  38. },
  39. watch: {
  40. 'code':function (){
  41. this.verifyIsOK()
  42. },
  43. 'password':function (){
  44. this.verifyIsOK()
  45. },
  46. },
  47. mounted() {
  48. },
  49. methods: {
  50. verifyIsOK(){
  51. this.isOK = this.code!=='' && this.password.length>=6;
  52. },
  53. setNextStep(){
  54. if(this.isOK){
  55. uni.redirectTo({
  56. 'url':'/pages/my/set'
  57. })
  58. }else {
  59. tools.error('请完善信息')
  60. this.isShakeBut=true
  61. setTimeout(()=>{
  62. this.isShakeBut=false
  63. },500)
  64. }
  65. },
  66. }
  67. }
  68. </script>
  69. <style scoped lang="scss">
  70. .change-pass-box{
  71. min-height: 100vh;
  72. .change-pass-data{
  73. padding: 0 32rpx;
  74. .phone-data{
  75. margin-top: 48rpx;
  76. display: flex;
  77. justify-content: space-between;
  78. .phone-text{
  79. font-size: 44rpx;
  80. height: 60rpx;
  81. line-height: 60rpx;
  82. }
  83. .phone-but{
  84. height: 60rpx;
  85. border-radius: 200rpx;
  86. padding: 0 16rpx;
  87. line-height: 60rpx;
  88. }
  89. }
  90. .from-text{
  91. width: 100%;
  92. padding-bottom: 40rpx;
  93. border-bottom: 1rpx solid #E0E0E0;
  94. .from-input{
  95. font-size: 32rpx;
  96. height: 44rpx;
  97. line-height: 44rpx;
  98. }
  99. .from-input::placeholder{
  100. color: #999999;
  101. }
  102. }
  103. .from-item{
  104. margin-top: 60rpx;
  105. }
  106. .warn-text{
  107. margin-top: 24rpx;
  108. font-size: 24rpx;
  109. }
  110. }
  111. .login-bottom{
  112. padding-bottom: calc(58rpx + env(safe-area-inset-bottom));
  113. position: absolute;
  114. bottom: 0;
  115. left: 68rpx;
  116. width:calc(100vw - 136rpx);
  117. .login-but{
  118. margin-top: 120rpx;
  119. }
  120. }
  121. }
  122. </style>