|
@@ -26,16 +26,6 @@ Page({
|
|
|
placeholder: "请填写",
|
|
|
valueName: "email", //绑定的字段名称
|
|
|
required: true //必填
|
|
|
- }, {
|
|
|
- label: "手机号",
|
|
|
- error: false,
|
|
|
- errMsg: "",
|
|
|
- type: "text",
|
|
|
- value: "",
|
|
|
- placeholder: "请填写",
|
|
|
- valueName: "phonenumber", //绑定的字段名称
|
|
|
- required: true, //必填
|
|
|
- callback: null,
|
|
|
}],
|
|
|
disabled: true, //禁用按钮
|
|
|
show: false, //显示验证码输入框
|
|
@@ -49,12 +39,24 @@ Page({
|
|
|
*/
|
|
|
onLoad(options) {
|
|
|
const that = this;
|
|
|
+ console.log(options.email)
|
|
|
this.setData({
|
|
|
attinfos: JSON.parse(options.attinfos),
|
|
|
"fromList1[0].value": options.name,
|
|
|
"fromList1[1].value": options.email == "undefined" ? "" : options.email,
|
|
|
- "fromList1[2].value": options.phonenumber,
|
|
|
- "fromList1[2].callback": function ({
|
|
|
+ "copyPhonenumber": options.phonenumber
|
|
|
+ });
|
|
|
+ //美大禁用修改手机号
|
|
|
+ /* this.data.fromList1.push({
|
|
|
+ label: "手机号",
|
|
|
+ error: false,
|
|
|
+ errMsg: "",
|
|
|
+ type: "text",
|
|
|
+ value: options.phonenumber,
|
|
|
+ placeholder: "请填写",
|
|
|
+ valueName: "phonenumber", //绑定的字段名称
|
|
|
+ required: true, //必填
|
|
|
+ callback: function ({
|
|
|
value
|
|
|
}) {
|
|
|
that.setData({
|
|
@@ -62,8 +64,10 @@ Page({
|
|
|
newPhone: value
|
|
|
})
|
|
|
},
|
|
|
- "copyPhonenumber": options.phonenumber
|
|
|
- });
|
|
|
+ })
|
|
|
+ this.setData({
|
|
|
+ fromList1: this.data.fromList1
|
|
|
+ }) */
|
|
|
},
|
|
|
/* from1监听 */
|
|
|
form1CompletedOrNot({
|
|
@@ -112,7 +116,6 @@ Page({
|
|
|
submit() {
|
|
|
if (this.data.disabled || this.data.loading) return;
|
|
|
let data = this.selectComponent("#form1").getData().returnData;
|
|
|
- if (!deletMark.CheckPhoneNumber(data.phonenumber.trim() - 0)) return;
|
|
|
if (!deletMark.CheckEmail(data.email.trim())) return;
|
|
|
if (this.data.show && this.data.password.length == 0) return wx.showToast({
|
|
|
title: '请输入短信验证码',
|
|
@@ -126,7 +129,7 @@ Page({
|
|
|
"method": "updateUserMsg",
|
|
|
"content": {
|
|
|
"name": data.name,
|
|
|
- "phonenumber": data.phonenumber,
|
|
|
+ "phonenumber": this.data.copyPhonenumber,
|
|
|
"email": data.email,
|
|
|
"password": MD5.hexMD5(this.data.password.trim())
|
|
|
}
|
|
@@ -166,23 +169,21 @@ Page({
|
|
|
"usetype": "headportrait",
|
|
|
"attachmentids": detail
|
|
|
}
|
|
|
- }).then(res => {
|
|
|
- console.log(res)
|
|
|
+ }).then(async res => {
|
|
|
if (res.msg != '成功') return wx.showToast({
|
|
|
title: res.msg,
|
|
|
icon: "none"
|
|
|
})
|
|
|
- let attinfos = this.data.attinfos;
|
|
|
- if (attinfos[0]) _Http.basic({
|
|
|
+ let linksids = this.data.attinfos.map(v => v.linksid);
|
|
|
+ if (linksids.length) await _Http.basic({
|
|
|
"classname": "system.attachment.Attachment",
|
|
|
"method": "deleteFileLink",
|
|
|
"content": {
|
|
|
- "linksids": [attinfos[0].linksid]
|
|
|
+ "linksids": linksids
|
|
|
}
|
|
|
});
|
|
|
- attinfos = res.data;
|
|
|
this.setData({
|
|
|
- attinfos
|
|
|
+ attinfos: res.data
|
|
|
})
|
|
|
this.changeUserMsg();
|
|
|
})
|