diff --git a/pages/complete/complete.js b/pages/complete/complete.js index 824e227..2a08584 100644 --- a/pages/complete/complete.js +++ b/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) diff --git a/utils/api.js b/utils/api.js index bf36579..4c765b9 100644 --- a/utils/api.js +++ b/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', {})