6170分享设备页面功能开发
This commit is contained in:
@ -55,15 +55,14 @@
|
||||
<script>
|
||||
import {
|
||||
login,
|
||||
sendRegisterSms
|
||||
resourceSmsCode
|
||||
} from '@/api/common/login.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showView: false,
|
||||
//codebtn: '获取验证码',
|
||||
phone: '13058067817', //手机号码
|
||||
code: "123456", //验证码
|
||||
code: "", //验证码
|
||||
agreed: false,
|
||||
isCounting: false,
|
||||
countdown: 0,
|
||||
@ -92,15 +91,20 @@
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
// 调用发送验证码接口
|
||||
await sendRegisterSms({
|
||||
phoneNumber: this.phone
|
||||
await resourceSmsCode({
|
||||
phonenumber: this.phone
|
||||
})
|
||||
//倒计时
|
||||
// 更新倒计时状态
|
||||
this.isCounting = true;
|
||||
this.showView = true;
|
||||
this.countdown = 60
|
||||
const timer = setInterval(() => {
|
||||
this.countdown--
|
||||
if (this.countdown <= 0) clearInterval(timer)
|
||||
if (this.countdown <= 0) {
|
||||
clearInterval(timer)
|
||||
this.isCounting = false;
|
||||
this.showView = false;
|
||||
}
|
||||
}, 1000)
|
||||
uni.showToast({
|
||||
title: '验证码已发送',
|
||||
@ -146,7 +150,7 @@
|
||||
tenantId: '894078' //租户ID
|
||||
})
|
||||
if (res.code == 200) {
|
||||
console.log(res,'ressss');
|
||||
console.log(res, 'ressss');
|
||||
uni.hideLoading()
|
||||
uni.setStorageSync('token', res.data.access_token) // 缓存token
|
||||
uni.setStorageSync('clientID', res.data.client_id) // 缓存token
|
||||
@ -257,7 +261,7 @@
|
||||
}
|
||||
|
||||
.blue {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
color: rgb(187, 230, 0);
|
||||
}
|
||||
|
||||
.agreement {
|
||||
|
Reference in New Issue
Block a user