Register.vue 3.2 KB

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