|
@@ -24,6 +24,7 @@ Page({
|
|
idFront: '',
|
|
idFront: '',
|
|
idCard: '',
|
|
idCard: '',
|
|
name: '',
|
|
name: '',
|
|
|
|
+ tel:'',
|
|
sex: '',
|
|
sex: '',
|
|
age: '',
|
|
age: '',
|
|
nativePlace: '',
|
|
nativePlace: '',
|
|
@@ -97,7 +98,7 @@ Page({
|
|
title: '上传中',
|
|
title: '上传中',
|
|
})
|
|
})
|
|
wx.chooseImage({
|
|
wx.chooseImage({
|
|
- count: 1,
|
|
|
|
|
|
+ count: 9,
|
|
sizeType: ['compressed'],
|
|
sizeType: ['compressed'],
|
|
sourceType: ['album', 'camera'],
|
|
sourceType: ['album', 'camera'],
|
|
success: (res) => {
|
|
success: (res) => {
|
|
@@ -330,6 +331,9 @@ Page({
|
|
sex: {
|
|
sex: {
|
|
required: true
|
|
required: true
|
|
},
|
|
},
|
|
|
|
+ tel: {
|
|
|
|
+ required: true
|
|
|
|
+ },
|
|
age: {
|
|
age: {
|
|
required: true
|
|
required: true
|
|
},
|
|
},
|
|
@@ -433,6 +437,7 @@ Page({
|
|
let photoUrl = 'form.photoUrl'
|
|
let photoUrl = 'form.photoUrl'
|
|
let idCard = 'form.idCard'
|
|
let idCard = 'form.idCard'
|
|
let name = 'form.name'
|
|
let name = 'form.name'
|
|
|
|
+ let tel = 'form.tel'
|
|
let sex = 'form.sex'
|
|
let sex = 'form.sex'
|
|
let age = 'form.age'
|
|
let age = 'form.age'
|
|
let nativePlace = 'form.nativePlace'
|
|
let nativePlace = 'form.nativePlace'
|
|
@@ -467,6 +472,7 @@ Page({
|
|
imgsrc: res.data.info.idFront,
|
|
imgsrc: res.data.info.idFront,
|
|
[idFront]: res.data.info.idFront,
|
|
[idFront]: res.data.info.idFront,
|
|
photo: res.data.info.photoUrl,
|
|
photo: res.data.info.photoUrl,
|
|
|
|
+ [tel]:res.data.info.tel,
|
|
[photoUrl]: res.data.info.photoUrl,
|
|
[photoUrl]: res.data.info.photoUrl,
|
|
[idCard]: res.data.info.idCard,
|
|
[idCard]: res.data.info.idCard,
|
|
[name]: res.data.info.name,
|
|
[name]: res.data.info.name,
|
|
@@ -485,6 +491,52 @@ Page({
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ getPhoneNumber(e) {
|
|
|
|
+ tool.isLogin().then(res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ if (e.detail.errMsg == "getPhoneNumber:ok") {
|
|
|
|
+ wx.request({
|
|
|
|
+ url: app.globalData.publicUrl + '/wx/user/wxbfa171fdd4000e03/phone',
|
|
|
|
+ header: {
|
|
|
|
+ 'content-type': 'application/x-www-form-urlencoded',
|
|
|
|
+ },
|
|
|
|
+ data: {
|
|
|
|
+ sessionKey: this.data.sessionkey,
|
|
|
|
+ signature: res.signature,
|
|
|
|
+ rawData: res.rawData,
|
|
|
|
+ encryptedData: e.detail.encryptedData,
|
|
|
|
+ iv: e.detail.iv
|
|
|
|
+ },
|
|
|
|
+ method: "POST",
|
|
|
|
+ success: (res) => {
|
|
|
|
+ console.log(res, '我是解析的手号');
|
|
|
|
+ let tel = 'form.tel'
|
|
|
|
+ if (res.data.phoneNumber) {
|
|
|
|
+ this.setData({
|
|
|
|
+ [tel]: res.data.phoneNumber
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.setData({
|
|
|
|
+ [tel]: 0
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ wx.showModal({
|
|
|
|
+ title: '您还未登录',
|
|
|
|
+ showCancel: false,
|
|
|
|
+ success(res) {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ wx.redirectTo({
|
|
|
|
+ url: '/pages/personal/personal',
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 表单提交事件
|
|
// 表单提交事件
|
|
formSubmit(e) {
|
|
formSubmit(e) {
|
|
console.log(e.detail.value)
|
|
console.log(e.detail.value)
|
|
@@ -531,6 +583,12 @@ Page({
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ }else{
|
|
|
|
+ wx.showModal({
|
|
|
|
+ title: '不好意思啦',
|
|
|
|
+ content:'信息提交失败了,请联系客服呦',
|
|
|
|
+ showCancel: false
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -566,9 +624,9 @@ Page({
|
|
this.setData({
|
|
this.setData({
|
|
userInfo: JSON.parse(res.rawData)
|
|
userInfo: JSON.parse(res.rawData)
|
|
})
|
|
})
|
|
- console.log(this.data.userInfo)
|
|
|
|
|
|
+ console.log(this.data.userInfo,'11111111')
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
- console.log(err)
|
|
|
|
|
|
+ console.log(err,'0000000000')
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|