添加了修改头像的功能
This commit is contained in:
@ -157,6 +157,16 @@ Page({
|
||||
wx.showToast({ title: '姓名只能为中英文', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验身份证号
|
||||
const idCardReg = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
|
||||
if (!idCardReg.test(idcard)) {
|
||||
wx.showToast({
|
||||
title: '身份证号格式不正确',
|
||||
icon: 'none'
|
||||
})
|
||||
return ;
|
||||
}
|
||||
|
||||
// 提交表单数据到后端
|
||||
wx.request({
|
||||
@ -175,7 +185,7 @@ Page({
|
||||
success: res => {
|
||||
console.log('后端返回的申请---->', res);
|
||||
if (res.data.code === 1) {
|
||||
wx.showToast({ title: '验证通过,提交成功', icon: 'success' });
|
||||
wx.showToast({ title: '提交成功', icon: 'success' });
|
||||
|
||||
// 清空表单内容
|
||||
this.setData({
|
||||
@ -189,7 +199,7 @@ Page({
|
||||
credential: '' // 清空凭证
|
||||
});
|
||||
} else {
|
||||
wx.showToast({ title: '系统错误', icon: 'error' });
|
||||
wx.showToast({ title: res.data.message, icon: 'none' });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -54,6 +54,7 @@
|
||||
bindinput="onInput"
|
||||
data-field="code"
|
||||
value="{{code}}"
|
||||
maxlength="6"
|
||||
/>
|
||||
<view
|
||||
class="flex-col justify-start items-center shrink-0 text-wrapper_3 ml-16"
|
||||
|
@ -9,9 +9,11 @@
|
||||
padding: 67.5rpx 49.69rpx 84.38rpx 51.56rpx;
|
||||
background-color: #ffffff;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
overflow: auto;
|
||||
height: calc(100vh - 1rpx);
|
||||
}
|
||||
.image {
|
||||
width: 232.5rpx;
|
||||
@ -84,7 +86,7 @@
|
||||
background-color: #ffffff00;
|
||||
}
|
||||
.section_3 {
|
||||
padding: 19.69rpx 16.88rpx;
|
||||
padding: 30.69rpx 16.88rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 9.38rpx;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
@ -169,7 +171,7 @@
|
||||
padding: 13.13rpx 16.26rpx 15rpx 16.26rpx;
|
||||
}
|
||||
.input_2 {
|
||||
padding: 16.88rpx 16.26rpx 11.25rpx 16.26rpx;
|
||||
padding: 0 16.88rpx;
|
||||
}
|
||||
.input_3 {
|
||||
padding: 16.88rpx 16.26rpx 11.25rpx 16.26rpx;
|
||||
|
Reference in New Issue
Block a user