commission--yt-commit
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
class="flex-col justify-start items-start text-wrapper view input"
|
||||
placeholder="请输入手机号"
|
||||
maxlength="11"
|
||||
type="number"
|
||||
model:value="{{phone}}"
|
||||
bindinput="onPhoneInput"
|
||||
/>
|
||||
@ -26,6 +27,7 @@
|
||||
class="flex-col justify-start items-start text-wrapper_2 view_2 input_1"
|
||||
placeholder="请输入验证码"
|
||||
maxlength="6"
|
||||
type="number"
|
||||
model:value="{{code}}"
|
||||
bindinput="onCodeInput"
|
||||
/>
|
||||
|
@ -10,7 +10,9 @@ Page({
|
||||
isAgree: false, // 用户协议是否勾选
|
||||
countdown: 0, // 剩余秒数
|
||||
codeButtonText: '获取验证码',
|
||||
_timer: null
|
||||
_timer: null,
|
||||
defaultType: true, //
|
||||
passwordType: true
|
||||
},
|
||||
|
||||
// 切换到“密码登录”,只清空表单字段
|
||||
|
@ -22,14 +22,18 @@
|
||||
|
||||
<!-- 手机号输入 -->
|
||||
<view class="flex-col self-stretch">
|
||||
<view class="flex-col justify-start relative section">
|
||||
<view class="flex-col justify-start relative section parentstyle ">
|
||||
<view class='centerStyle'>
|
||||
<input
|
||||
class="flex-col justify-start items-start text-wrapper view input"
|
||||
placeholder="请输入手机号"
|
||||
maxlength="11"
|
||||
type="number"
|
||||
model:value="{{phone}}"
|
||||
bindinput="onPhoneInput"
|
||||
/>
|
||||
<image src='{{defaultType? "": ""}}' class='imageStyle' bindtap='eyeStatus'></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 密码 / 验证码 输入 + 获取验证码按钮 -->
|
||||
|
@ -69,7 +69,7 @@
|
||||
}
|
||||
.section_2 {
|
||||
margin-right: 4.93rpx;
|
||||
padding: 20.63rpx 16.88rpx 18.75rpx;
|
||||
padding: 12.63rpx 16.88rpx 9.75rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 9.38rpx;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
@ -160,4 +160,29 @@
|
||||
.checkbox .wx-checkbox-input {
|
||||
width: 37.5rpx;
|
||||
height: 37.5rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.parentstyle {
|
||||
/* display: flex; */
|
||||
/* align-items: center; */
|
||||
/* border: 1rpx solid #e0e0e0; */
|
||||
border-radius: 10rpx;
|
||||
/* box-shadow: 0 0 5rpx #e0e0e0; */
|
||||
/* margin: 30rpx 38px; */
|
||||
/* padding: 20rpx; */
|
||||
}
|
||||
|
||||
.parentstyle .imageStyle {
|
||||
width: 41rpx;
|
||||
height: 41rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.parentstyle .centerStyle {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
|
@ -94,11 +94,11 @@ Page({
|
||||
async onRegister() {
|
||||
// 调用通用校验,失败时已提示并 return
|
||||
if (!validate(this.data, {
|
||||
nickname: '请输入昵称',
|
||||
phone: '请输入手机号',
|
||||
captcha: '请输入验证码',
|
||||
inviteCode: '请输入邀请码',
|
||||
password: '请输入密码'
|
||||
nickname: '昵称不能为空',
|
||||
phone: '手机号不能为空',
|
||||
captcha: '验证码不能为空',
|
||||
inviteCode: '邀请码不能为空',
|
||||
password: '密码不能为空'
|
||||
})) {
|
||||
return;
|
||||
}
|
||||
@ -108,6 +108,10 @@ Page({
|
||||
return;
|
||||
}
|
||||
const { nickname, phone, captcha, inviteCode, password } = this.data;
|
||||
wx.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
const res = await requestAsync({
|
||||
url: baseUrl + '/userInfo/register',
|
||||
method: 'POST',
|
||||
@ -120,12 +124,14 @@ Page({
|
||||
userPassword: password
|
||||
}
|
||||
});
|
||||
console.log('注册信息---->',res.data);
|
||||
if (res.data.code === 1) {
|
||||
wx.showToast({
|
||||
title: '注册成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
duration: 1000,
|
||||
});
|
||||
wx.hideLoading()
|
||||
setTimeout(() => {
|
||||
wx.navigateTo({
|
||||
url: '/pages/loginModule/pwdLogin/pwdLogin',
|
||||
@ -139,6 +145,7 @@ Page({
|
||||
title: res.data.message || '注册失败',
|
||||
icon: 'none'
|
||||
});
|
||||
wx.hideLoading()
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user