Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

forget-pwd-step1.vue 2.9KB

il y a 2 ans
il y a 2 ans
il y a 8 mois
il y a 2 ans
il y a 2 ans
il y a 8 mois
il y a 2 ans
il y a 1 an
il y a 2 ans
il y a 2 ans
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <!-- 注册第1步 -->
  2. <template>
  3. <view class="register-main">
  4. <view class="title">忘记密码</view>
  5. <view class="hint">请输入手机号</view>
  6. <view class="form-input">
  7. <view> +86</view>
  8. <image :src="`${$imgUrl}common/arror_down_black.png`" class="arror" mode="aspectFill"/>
  9. <input
  10. class="input"
  11. v-model="state.phone"
  12. focus
  13. placeholder="请输入手机号"
  14. placeholder-class="form-placeholder"
  15. type="number"
  16. maxlength="11"
  17. />
  18. </view>
  19. </view>
  20. <view class="btn">
  21. <submit-button
  22. title="验证手机号"
  23. @submit="nextStep"
  24. ></submit-button>
  25. </view>
  26. </template>
  27. <script setup lang="ts">
  28. import uCheckBox from "@/uni_modules/vk-uview-ui/components/u-checkbox/u-checkbox.vue";
  29. import { reactive } from "vue";
  30. import { checkStr, msg, navTo } from "@/utils/utils";
  31. import { sendMessage, regist } from "@/utils/network/api.js";
  32. import { request, requestNew } from "@/utils/network/request.js";
  33. const state = reactive({
  34. phone: "", //电话
  35. });
  36. /* 下一步 */
  37. const nextStep = () => {
  38. if (!state.phone) {
  39. msg("请输入手机号!");
  40. return;
  41. }
  42. if (!checkStr(state.phone, "mobile")) {
  43. msg("请输入正确的手机号!");
  44. return;
  45. }
  46. const options = {
  47. type: 2,
  48. data: {
  49. mobile: state.phone,
  50. businessType:2
  51. },
  52. method: "POST",
  53. showLoading: true,
  54. };
  55. requestNew(sendMessage, options)
  56. .then((res) => {
  57. msg("验证码发送成功!");
  58. // #ifdef MP-WEIXIN
  59. navTo(`/login/forget-pwd-step2?phone=${state.phone}`);
  60. // #endif
  61. // #ifdef MP-ALIPAY
  62. navTo(`/login/forget-pwd-step2-ali?phone=${state.phone}`);
  63. // #endif
  64. })
  65. .catch((err) => {
  66. console.log(err);
  67. });
  68. };
  69. </script>
  70. <style lang="scss" scoped>
  71. .register-main {
  72. border-top: 1rpx solid #dcdcdc;
  73. padding: 78rpx 30rpx 50rpx;
  74. .title {
  75. font-size: 32rpx;
  76. color: #333333;
  77. font-weight: 600;
  78. }
  79. .hint {
  80. font-size: 24rpx;
  81. color: #999999;
  82. margin-top: 20rpx;
  83. }
  84. .form-input {
  85. margin-top: 80rpx;
  86. display: flex;
  87. flex-direction: row;
  88. align-items: center;
  89. height: 90rpx;
  90. border-bottom: 1rpx solid #dcdcdc;
  91. padding: 0rpx 12rpx;
  92. font-size: 28rpx;
  93. color: #333333;
  94. &:last-child {
  95. margin-top: 50rpx;
  96. }
  97. .input {
  98. flex: 1;
  99. padding-right: 48rpx;
  100. background: transparent;
  101. }
  102. .arror {
  103. width: 28rpx;
  104. height: 25rpx;
  105. margin-left: 16rpx;
  106. margin-right: 40rpx;
  107. }
  108. .eye {
  109. width: 48rpx;
  110. height: 48rpx;
  111. }
  112. }
  113. .form-placeholder {
  114. color: #999999;
  115. }
  116. .agreement {
  117. font-size: 24rpx;
  118. display: flex;
  119. align-items: center;
  120. margin-top: 60rpx;
  121. .txt-grey {
  122. color: #666666;
  123. }
  124. .txt-green {
  125. color: #00b38b;
  126. }
  127. :deep(.u-checkbox) {
  128. margin-right: -20rpx;
  129. }
  130. }
  131. }
  132. .btn {
  133. margin: 200rpx 40rpx 0px;
  134. }
  135. </style>