Browse Source

完善个人信息拆分接口

master
zhaoyongnian 6 years ago
parent
commit
f9b55e5fac
  1. 64
      pages/complete/complete.js
  2. 11
      utils/api.js

64
pages/complete/complete.js

@ -210,7 +210,9 @@ Page({
encryptedData: this.data.unionIdStatus === '1' ? '' : this.data.encryptedData,
iv: this.data.unionIdStatus === '1' ? '' : this.data.iv
}
api.completeInfo(para).then(function (res) {
console.log(this.data.tabType)
if (this.data.tabType == 'tab1'){
api.completeResidentInfo(para).then(function (res) {
// console.log(res.data.resultCode)
wx.hideLoading()
if (res.data.resultCode == 1) {
@ -239,6 +241,66 @@ Page({
})
}
})
}else{
api.completePartyInfo(para).then(function (res) {
// console.log(res.data.resultCode)
wx.hideLoading()
if (res.data.resultCode == 1) {
wx.showModal({
title: '党员认证失败',
showCancel: false,
content: res.data.resultMsg,
success: function (res) {
wx.reLaunch({
url: '/pages/index/index'
})
}
})
} else {
wx.showToast({
title: '认证成功',
icon: 'none',
duration: 3000,
complete: function () {
setTimeout(function () {
wx.reLaunch({
url: '/pages/index/index'
})
}, 3000);
}
})
}
})
}
// api.completeInfo(para).then(function (res) {
// // console.log(res.data.resultCode)
// wx.hideLoading()
// if (res.data.resultCode == 1) {
// wx.showModal({
// title: '党员认证失败',
// showCancel: false,
// content: res.data.resultMsg,
// success: function (res) {
// wx.reLaunch({
// url: '/pages/index/index'
// })
// }
// })
// } else {
// wx.showToast({
// title: '认证成功',
// icon: 'none',
// duration: 3000,
// complete: function () {
// setTimeout(function () {
// wx.reLaunch({
// url: '/pages/index/index'
// })
// }, 3000);
// }
// })
// }
// })
},
getSmsCode() {
console.log(this.data.mobile)

11
utils/api.js

@ -11,6 +11,8 @@ module.exports = {
getGridList: getGridList,
changeGrid: changeGrid,
completeInfo: completeInfo,
completeResidentInfo: completeResidentInfo,
completePartyInfo: completePartyInfo,
prepareComplete: prepareComplete,
getUserInfo: getUserInfo,
getMyAssociation: getMyAssociation,
@ -111,6 +113,15 @@ function gridLeaderRegister(mobile, smsCode, wxCode) {
function completeInfo(data) {
return fly.post('app-user/user/completeInfo', data)
}
//用户完善个人信息 v2
function completeResidentInfo(data) {
return fly.post('app-user/user/completeResidentInfo', data)
}
//党员完善个人信息: v2
function completePartyInfo(data) {
return fly.post('app-user/user/completePartyInfo', data)
}
function prepareComplete() {
return fly.get('app-user/user/prepareComplete', {})

Loading…
Cancel
Save