diff --git a/epdc-resident-mp-yushan/pages/complete/components/personalInfo/personalInfo.js b/epdc-resident-mp-yushan/pages/complete/components/personalInfo/personalInfo.js index 1db9305..a138b7f 100644 --- a/epdc-resident-mp-yushan/pages/complete/components/personalInfo/personalInfo.js +++ b/epdc-resident-mp-yushan/pages/complete/components/personalInfo/personalInfo.js @@ -307,7 +307,7 @@ Component({ wx.showLoading({ title: '提交中...' }) - api.completeInfo(para).then(res => { + api.completeResidentInfoV2(para).then(res => { wx.hideLoading() if (res.data.resultCode == 1) { wx.showModal({ @@ -342,36 +342,67 @@ Component({ }) } else { wx.showLoading({ - title: '提交中...' + title: "提交中..." }) - api.completeInfoV2(para).then(res => { - wx.hideLoading() - if (res.data.resultCode == 1) { - wx.showModal({ - title: '认证信息提交成功', - showCancel: false, - content: res.data.resultMsg, - success: res => { - wx.reLaunch({ - url: '/pages/index/index' - }) - } - }) - } else { - wx.showToast({ - title: '认证成功', - icon: 'none', - duration: 2000, - complete: () => { - setTimeout(() => { + if (this.data.type === "partyMember") { + api.completePartyInfoV2(para).then(res => { + wx.hideLoading() + if (res.data.resultCode == 1) { + wx.showModal({ + title: "认证信息提交成功", + showCancel: false, + content: res.data.resultMsg, + success: () => { wx.reLaunch({ - url: '/pages/index/index' + url: "/pages/indexNew/indexNew" }) - }, 2000) - } - }) - } - }) + } + }) + } else { + wx.showToast({ + title: "认证成功", + icon: "none", + duration: 2000, + complete: () => { + setTimeout(() => { + wx.reLaunch({ + url: "/pages/indexNew/indexNew" + }) + }, 2000) + } + }) + } + }) + } else if (this.data.type === "resident") { + api.completeResidentInfoV2(para).then(res => { + wx.hideLoading() + if (res.data.resultCode == 1) { + wx.showModal({ + title: "认证信息提交成功", + showCancel: false, + content: res.data.resultMsg, + success: () => { + wx.reLaunch({ + url: "/pages/indexNew/indexNew" + }) + } + }) + } else { + wx.showToast({ + title: "认证成功", + icon: "none", + duration: 2000, + complete: () => { + setTimeout(() => { + wx.reLaunch({ + url: "/pages/indexNew/indexNew" + }) + }, 2000) + } + }) + } + }) + } } }, // 提交完善信息,手机号输入方式 @@ -429,7 +460,7 @@ Component({ wx.showLoading({ title: '提交中...' }) - api.completeInfo(para).then(res => { + api.completeResidentInfo(para).then(res => { wx.hideLoading() if (res.data.resultCode == 1) { wx.showModal({ @@ -464,36 +495,67 @@ Component({ }) } else { wx.showLoading({ - title: '提交中...' + title: "提交中..." }) - api.completeInfo(para).then(res => { - wx.hideLoading() - if (res.data.resultCode == 1) { - wx.showModal({ - title: '认证信息提交成功', - showCancel: false, - content: res.data.resultMsg, - success: res => { - wx.reLaunch({ - url: '/pages/index/index' - }) - } - }) - } else { - wx.showToast({ - title: '认证成功', - icon: 'none', - duration: 2000, - complete: () => { - setTimeout(() => { + if (this.data.type === "partyMember") { + api.completePartyInfo(para).then(res => { + wx.hideLoading() + if (res.data.resultCode == 1) { + wx.showModal({ + title: "认证信息提交成功", + showCancel: false, + content: res.data.resultMsg, + success: () => { wx.reLaunch({ - url: '/pages/index/index' + url: "/pages/indexNew/indexNew" }) - }, 2000) - } - }) - } - }) + } + }) + } else { + wx.showToast({ + title: "认证成功", + icon: "none", + duration: 2000, + complete: () => { + setTimeout(() => { + wx.reLaunch({ + url: "/pages/indexNew/indexNew" + }) + }, 2000) + } + }) + } + }) + } else if (this.data.type === "resident") { + api.completeResidentInfo(para).then(res => { + wx.hideLoading() + if (res.data.resultCode == 1) { + wx.showModal({ + title: "认证信息提交成功", + showCancel: false, + content: res.data.resultMsg, + success: () => { + wx.reLaunch({ + url: "/pages/indexNew/indexNew" + }) + } + }) + } else { + wx.showToast({ + title: "认证成功", + icon: "none", + duration: 2000, + complete: () => { + setTimeout(() => { + wx.reLaunch({ + url: "/pages/indexNew/indexNew" + }) + }, 2000) + } + }) + } + }) + } } }, submitPersonalInfo () {