|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- <!-- 注册第1步 -->
- <template>
- <view class="register-main">
- <view class="title">修改手机号</view>
- <view class="hint">请输入ETC预留手机号</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="请输入ETC预留手机号" placeholder-class="form-placeholder"
- type="number" maxlength="11" />
- </view>
- <view class="form-input">
- <input class="input" v-model="state.code" focus placeholder="请输入验证码" placeholder-class="form-placeholder"
- type="number" maxlength="6" />
- <verification-code :mobile="state.phone" :type="2" :customerId="state.customerId"></verification-code>
- </view>
- </view>
-
- <view class="btn">
- <submit-button title="下一步" @submit="nextStep"></submit-button>
- </view>
- </template>
-
- <script setup lang="ts">
- import {
- reactive
- } from "vue";
- import {
- checkStr,
- msg,
- navTo
- } from "@/utils/utils";
- import {
- etcSmsCodeValid
- } from "@/utils/network/api.js";
- import {requestNew} from "@/utils/network/request.js";
- import { onLoad } from "@dcloudio/uni-app"
- const state = reactive({
- phone: "", //电话
- checked: false, //是否勾选阅读协议
- code:"",
- customerId:"",
- userType:"",
- changeMobileType:"",// 修改手机号类型
- });
-
-
- const checkboxChange = (e) => {
- console.log(e);
- state.checked = !state.checked;
- };
-
- // 去协议页面
- const toRead = () => {
- navTo("/login/agreement")
- }
-
- /* 下一步 */
- const nextStep = () => {
- if (!state.phone) {
- msg("请输入手机号!");
- return;
- }
- if (!checkStr(state.phone, "mobile")) {
- msg("请输入正确的手机号!");
- return;
- }
-
- const options = {
- type: 2,
- data: {
- mobile: state.phone,
- customerId: state.customerId,
- code: state.code,
- changeMobileType: state.changeMobileType,
-
- },
- method: "POST",
- showLoading: true,
- };
- requestNew(etcSmsCodeValid, options)
- .then((res) => {
- navTo(`/subpackage/personal-center/setting/personal-information/change-phone-newphone?phone=${state.phone}&orderId=${res.orderId}`);
- })
- .catch((err) => {
- console.log(err);
- });
- };
- onLoad((options) => {
- state.customerId=options.customerId
- state.userType=options.userType
- state.changeMobileType=options.changeMobileType
-
- })
- </script>
-
- <style lang="scss" scoped>
- .tips {
- color: red;
- padding: 30rpx 20rpx 0rpx 0rpx;
- font-size: 30rpx;
- }
-
- .group {
- display: flex;
- align-items: center;
- }
-
- .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>
|