| | |
| | | <u-form :model="codeForm" ref="validateCodeForm"> |
| | | <view v-if="!validateFlage"> |
| | | <u-form-item label-width="120" label="手机号" prop="mobile"> |
| | | <u-input maxlength="11" v-model="codeForm.mobile" placeholder="请输入您的手机号" /> |
| | | <u-input maxlength="15" v-model="codeForm.mobile" placeholder="请输入您的手机号" /> |
| | | </u-form-item> |
| | | |
| | | <u-form-item class="sendCode" label-width="120" prop="code" label="验证码"> |
| | | <!-- <u-form-item class="sendCode" label-width="120" prop="code" label="验证码"> |
| | | <u-input v-model="codeForm.code" placeholder="请输入验证码" /> |
| | | <u-verification-code unique-key="page-edit" :seconds="seconds" @end="end" @start="start" |
| | | ref="uCode" @change="codeChange"></u-verification-code> |
| | | <view @tap="getCode" class="text-tips">{{ tips }}</view> |
| | | </u-form-item> |
| | | </u-form-item> --> |
| | | |
| | | <view class="submit" @click="validatePhone">绑定</view> |
| | | <myVerification keep-running @send="verification" class="verification" ref="verification" |
| | |
| | | sendMobile, |
| | | bindMobile |
| | | } from "@/api/login"; |
| | | |
| | | import storage from "@/utils/storage.js"; |
| | | import myVerification from "@/pages/mine/verification/verification.vue"; //验证 |
| | | import uuid from "@/utils/uuid.modified.js"; |
| | | export default { |
| | |
| | | flage: false, //是否验证码验证 |
| | | codeForm: { |
| | | mobile: "", //手机号 |
| | | code: "", //验证码 |
| | | code: "111111", //验证码 |
| | | username: "", //用户名 |
| | | }, |
| | | tips: "", //提示 |
| | |
| | | } |
| | | } |
| | | }, |
| | | 'codeForm.mobile': function(newVal, oldVal) { |
| | | // 当手机号变化时,自动去除空格 |
| | | if (newVal && typeof newVal === 'string') { |
| | | this.codeForm.mobile = newVal.replace(/\s/g, ''); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | duration: 2000, |
| | | icon: "none", |
| | | }); |
| | | let userInfo = storage.getUserInfo() |
| | | userInfo.mobile = this.codeForm.mobile; |
| | | storage.setUserInfo(userInfo) |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1, |