From bb3b2213080604999f5c98d7945610dd0095275e Mon Sep 17 00:00:00 2001 From: zhaoyongnian <541231643@qq.com> Date: Wed, 9 Sep 2020 16:48:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=9A=E5=91=98=E5=B1=85=E6=B0=91=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E6=8E=A5=E5=8F=A3=E6=8B=86=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/personalInfo/personalInfo.js | 174 ++++++++++++------ 1 file changed, 118 insertions(+), 56 deletions(-) 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 () {