Modifyphnoe.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <view>
  3. <!-- <titlenav></titlenav> -->
  4. <view class="register">
  5. <view class="title">{{ forget ? '修改手机号' : '绑定新号码' }}</view>
  6. <view class="name">{{ forget ? '修改手机号即同时修改登录账户名称' : '请绑定新的号码,修改后登录即用新号码' }}</view>
  7. <view class="content" v-if="!forget">
  8. <image src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-23-15-00-09YCjgycbL.png" mode="widthFix"></image>
  9. <view class="border"><input class="inputNm" placeholder="请输入手机号" type="number" v-model="form.phone" /></view>
  10. </view>
  11. <view class="phone" v-if="forget">
  12. <view class="text1">189****7474</view>
  13. <view class="text2">修改手机号需先验证当前手机号</view>
  14. </view>
  15. <view class="content content2">
  16. <image src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/2021-09-23-15-56-51fUQmIfWc.png" mode="widthFix"></image>
  17. <view class="border code">
  18. <input class="inputNm" placeholder="请输入验证码" type="number" v-model="form.code" />
  19. <view class="code2" @click="send">{{ time === 0 ? '发送验证码' : `重新发送${time}s` }}</view>
  20. </view>
  21. </view>
  22. <u-button type="primary">{{ forget ? '下一步' : '确定' }}</u-button>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import { mapState } from 'vuex';
  28. import Titlenav from '../components/Titlenav.vue';
  29. export default {
  30. components: {
  31. Titlenav
  32. },
  33. data() {
  34. return {
  35. form: {},
  36. time: 0,
  37. forget: false
  38. };
  39. },
  40. onLoad(options) {
  41. this.forget = options.forget;
  42. },
  43. computed: {
  44. ...mapState(['systemInfo'])
  45. },
  46. methods: {
  47. send() {
  48. console.log(this.form);
  49. this.sendCode(this.form.phone);
  50. }
  51. }
  52. };
  53. </script>
  54. <style lang="scss" scoped>
  55. .register {
  56. /deep/ .uni-input-placeholder {
  57. font-size: 14px;
  58. font-weight: 400;
  59. color: #c8c9cc;
  60. line-height: 24px;
  61. }
  62. /deep/ .u-btn {
  63. height: 48px;
  64. font-size: 14px;
  65. margin: 60px 26px 12px;
  66. }
  67. margin: 10px 20px 0;
  68. .title {
  69. font-size: 24px;
  70. font-weight: bold;
  71. color: #000000;
  72. line-height: 33px;
  73. margin-bottom: 10px;
  74. }
  75. .name {
  76. font-size: 13px;
  77. font-weight: 400;
  78. color: #aaabad;
  79. line-height: 22px;
  80. margin-bottom: 50px;
  81. }
  82. .phone {
  83. margin: 0 26px;
  84. .text1 {
  85. font-size: 20px;
  86. font-weight: bold;
  87. color: #000000;
  88. line-height: 28px;
  89. }
  90. .text2 {
  91. font-size: 14px;
  92. font-weight: 400;
  93. color: #939599;
  94. line-height: 24px;
  95. }
  96. }
  97. .content {
  98. display: flex;
  99. align-items: center;
  100. margin: 0 26px;
  101. .border {
  102. border-bottom: 1px solid #f2f3f5;
  103. width: 100%;
  104. margin-left: 10px;
  105. &.code {
  106. display: flex;
  107. align-items: center;
  108. justify-content: space-between;
  109. }
  110. .inputNm {
  111. height: 44px;
  112. }
  113. .code2 {
  114. font-size: 13px;
  115. font-weight: 400;
  116. color: #214bbe;
  117. line-height: 18px;
  118. }
  119. }
  120. &.content2 {
  121. margin: 20px 26px 6px;
  122. }
  123. image {
  124. width: 24px;
  125. height: 24px;
  126. }
  127. }
  128. }
  129. </style>