更改验证码接口

This commit is contained in:
唐明明
2022-06-15 14:36:28 +08:00
parent a3221cfe18
commit e5cd4c5f41
8 changed files with 7604 additions and 7590 deletions

View File

@@ -17,6 +17,15 @@ const smsAuth = (data) =>{
})
}
// 获取带有邀请码可填写的邀请码接口
const getInvitationSms = (data) =>{
return request({
url: "user/auth/new_verify",
method: 'POST',
data: data
})
}
// 获取验证码
const getSms = (data) =>{
return request({
@@ -51,6 +60,7 @@ const secretService = (name) =>{
export {
smsAuth,
getInvitationSms,
getSms,
userFigure,
createUser,

View File

@@ -13,8 +13,8 @@
<input v-model="code" type="number" maxlength="4" placeholder="输入验证码">
<button :disabled="getSms" size="mini" @click="getPhoneCode()">{{sendCode}}</button>
</view>
<view class="auth-input">
<input v-model="parentId" placeholder="输入邀请码">
<view class="auth-input" v-if="isShowParent">
<input v-model="parentId" placeholder="输入邀请码,选填">
</view>
<view class="auth-button">
<button @click="login('code')">登录</button>
@@ -32,7 +32,7 @@
<script>
import {
smsAuth,
getSms
getInvitationSms
} from '@/apis/interfaces/auth.js'
export default {
data() {
@@ -41,7 +41,8 @@
code : '',
parentId : '',
getSms : false,
sendCode: '获取验证码'
sendCode : '获取验证码',
isShowParent: false
};
},
mounted() {
@@ -56,13 +57,14 @@
})
let outTime;
let smsTime = 60;
getSms({
getInvitationSms({
mobileNo: this.phone,
}).then(res => {
uni.showToast({
title: res,
title: res.message,
icon: "none",
});
this.isShowParent = res.is_show_parent
this.getSms = true;
this.sendCode = smsTime + 's后重新获取';
outTime = setInterval(() => {

View File

@@ -11,8 +11,9 @@
</view>
<view class="capacity-block">
<view class="capacity-block-title">
<view class="title">成员产率({{group.effect}}/{{group.count}})<text>{{group.capacity}}GLF/h</text></view>
<view class="more" @click="onInvitation">邀请更多好友</view>
<view class="title">成员产率({{group.effect}}/{{group.count}})<text</text></view>
<view class="capacity-block-glf">{{group.capacity}}GLF/h</view>
<!-- <view class="more" @click="onInvitation">邀请更多好友</view> -->
</view>
<view class="capacity-block-table">
<view class="header">
@@ -36,7 +37,7 @@
<view class="flex-item">{{partner.vip_text}}</view>
</view>
<view class="flex">
<view class="flex-item">{{partner.novip}}人在线(会员)</view>
<view class="flex-item">{{partner.novip}}人在线(普通用户)</view>
<view class="flex-item">{{partner.novip_text}}</view>
</view>
</view>

View File

@@ -104,9 +104,7 @@
<script>
import { life, sign } from '@/apis/interfaces/life.js'
var account;
export default {
data() {
return {
@@ -132,6 +130,7 @@
base_seconds: 0,
timeData : {},
isSign : false,
isAccount : false,
};
},
onShow() {
@@ -145,7 +144,10 @@
// 倒计时结束
TimeFinish(){
this.isSign = false
if(this.isAccount){
this.isAccount = false;
clearInterval(account)
}
},
// 共力人生
getLife(){
@@ -176,10 +178,13 @@
this.$nextTick(() => {
try{
// 计算数值
if(!this.isAccount){
this.isAccount = true;
account = setInterval(() =>{
let newGlz = (Number(this.glz) + this.base_seconds)
this.glz = newGlz.toFixed(4)
}, 1000)
}
// 签到开始倒计时
this.$refs.countDown.start();
}catch(e){
@@ -232,6 +237,7 @@
try{
clearInterval(account)
this.$refs.countDown.pause();
this.isAccount = false;
}catch(err){
uni.showToast({
title: err,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long