|
@@ -14,6 +14,13 @@ Page({
|
|
gender: [{ id: '0', name: '男' }, { id: 1, name: '女' },],
|
|
gender: [{ id: '0', name: '男' }, { id: 1, name: '女' },],
|
|
index: 0,
|
|
index: 0,
|
|
},
|
|
},
|
|
|
|
+ //验证必填项
|
|
|
|
+ initValidate() {
|
|
|
|
+ const rules = { phone: { required: true, tel: true }, }
|
|
|
|
+ // 验证字段的提示信息,若不传则调用默认的信息
|
|
|
|
+ const messages = { phone: { required: '请输入手机号' }, };
|
|
|
|
+ this.WxValidate = new WxValidate(rules, messages)
|
|
|
|
+ },
|
|
back: function () {
|
|
back: function () {
|
|
wx.navigateBack({ url: '/pages/me/index' })
|
|
wx.navigateBack({ url: '/pages/me/index' })
|
|
},
|
|
},
|
|
@@ -48,9 +55,6 @@ Page({
|
|
} else {
|
|
} else {
|
|
value.icon = this.data.fileList;
|
|
value.icon = this.data.fileList;
|
|
value.id = this.data.form.id;
|
|
value.id = this.data.form.id;
|
|
- value.status = this.data.form.status;
|
|
|
|
- value.type = this.data.form.type;
|
|
|
|
- value.gender = this.data.form.gender;
|
|
|
|
wx.request({
|
|
wx.request({
|
|
url: `${app.globalData.publicUrl}/courtAdmin/api/user/${value.id}`, //接口地址
|
|
url: `${app.globalData.publicUrl}/courtAdmin/api/user/${value.id}`, //接口地址
|
|
method: "post",
|
|
method: "post",
|
|
@@ -84,14 +88,6 @@ Page({
|
|
this.searchHeight();
|
|
this.searchHeight();
|
|
// 监听用户是否登录
|
|
// 监听用户是否登录
|
|
this.watchLogin();
|
|
this.watchLogin();
|
|
-
|
|
|
|
- },
|
|
|
|
- //验证必填项
|
|
|
|
- initValidate() {
|
|
|
|
- const rules = { phone: { required: true, tel: true }, }
|
|
|
|
- // 验证字段的提示信息,若不传则调用默认的信息
|
|
|
|
- const messages = { phone: { required: '请输入手机号' }, };
|
|
|
|
- this.WxValidate = new WxValidate(rules, messages)
|
|
|
|
},
|
|
},
|
|
// 计算高度
|
|
// 计算高度
|
|
searchHeight: function () {
|
|
searchHeight: function () {
|
|
@@ -130,8 +126,6 @@ Page({
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
-
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
*/
|