|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- <!-- 注册第1步 -->
- <template>
- <view class="register-main">
- <view class="title">忘记密码</view>
- <view class="hint">请输入手机号</view>
-
- <view class="form-input">
- <view> +86</view>
- <image :src="`${$imgUrl}common/arror_down_black.png`" class="arror" />
- <input
- class="input"
- v-model="state.phone"
- focus
- placeholder="请输入手机号"
- placeholder-class="form-placeholder"
- type="number"
- maxlength="11"
- />
- </view>
- </view>
-
- <view class="btn">
- <submit-button
- title="验证手机号"
- @submit="nextStep"
- ></submit-button>
- </view>
- </template>
-
- <script setup lang="ts">
- import uCheckBox from "@/uni_modules/vk-uview-ui/components/u-checkbox/u-checkbox.vue";
- import { reactive } from "vue";
- import { checkStr, msg, navTo } from "@/utils/utils";
- import { sendCode, regist } from "@/utils/network/api.js";
- import { request } from "@/utils/network/request.js";
-
- const state = reactive({
- phone: "", //电话
- });
-
- /* 下一步 */
- const nextStep = () => {
- if (!state.phone) {
- msg("请输入手机号!");
- return;
- }
- if (!checkStr(state.phone, "mobile")) {
- msg("请输入正确的手机号!");
- return;
- }
-
- const options = {
- type: 2,
- data: { mobile: state.phone },
- method: "POST",
- showLoading: true,
- };
- request(sendCode, options)
- .then((res) => {
- msg("验证码发送成功!");
- navTo(`/login/forget-pwd-step2?phone=${state.phone}`);
- })
- .catch((err) => {
- console.log(err);
- });
- };
- </script>
-
- <style lang="scss" scoped>
- .register-main {
- border-top: 1rpx solid #dcdcdc;
- padding: 78rpx 30rpx 50rpx;
- .title {
- font-size: 32rpx;
- color: #333333;
- font-weight: 600;
- }
- .hint {
- font-size: 24rpx;
- color: #999999;
- margin-top: 20rpx;
- }
-
- .form-input {
- margin-top: 80rpx;
- display: flex;
- flex-direction: row;
- align-items: center;
- height: 90rpx;
- border-bottom: 1rpx solid #dcdcdc;
- padding: 0rpx 12rpx;
- font-size: 28rpx;
- color: #333333;
- &:last-child {
- margin-top: 50rpx;
- }
- .input {
- flex: 1;
- padding-right: 48rpx;
- background: transparent;
- }
- .arror {
- width: 28rpx;
- height: 25rpx;
- margin-left: 16rpx;
- margin-right: 40rpx;
- }
- .eye {
- width: 48rpx;
- height: 48rpx;
- }
- }
- .form-placeholder {
- color: #999999;
- }
-
- .agreement {
- font-size: 24rpx;
- display: flex;
- align-items: center;
- margin-top: 60rpx;
- .txt-grey {
- color: #666666;
- }
-
- .txt-green {
- color: #00b38b;
- }
- :deep(.u-checkbox) {
- margin-right: -20rpx;
- }
- }
- }
- .btn {
- margin: 200rpx 40rpx 0px;
- }
- </style>
|