Browse Source

党员居民认证接口拆分

integral
zhaoyongnian 5 years ago
parent
commit
bb3b221308
  1. 98
      epdc-resident-mp-yushan/pages/complete/components/personalInfo/personalInfo.js

98
epdc-resident-mp-yushan/pages/complete/components/personalInfo/personalInfo.js

@ -307,7 +307,7 @@ Component({
wx.showLoading({ wx.showLoading({
title: '提交中...' title: '提交中...'
}) })
api.completeInfo(para).then(res => { api.completeResidentInfoV2(para).then(res => {
wx.hideLoading() wx.hideLoading()
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
wx.showModal({ wx.showModal({
@ -342,36 +342,67 @@ Component({
}) })
} else { } else {
wx.showLoading({ wx.showLoading({
title: '提交中...' title: "提交中..."
}) })
api.completeInfoV2(para).then(res => { if (this.data.type === "partyMember") {
api.completePartyInfoV2(para).then(res => {
wx.hideLoading() wx.hideLoading()
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
wx.showModal({ wx.showModal({
title: '认证信息提交成功', title: "认证信息提交成功",
showCancel: false, showCancel: false,
content: res.data.resultMsg, content: res.data.resultMsg,
success: res => { success: () => {
wx.reLaunch({ wx.reLaunch({
url: '/pages/index/index' url: "/pages/indexNew/indexNew"
}) })
} }
}) })
} else { } else {
wx.showToast({ wx.showToast({
title: '认证成功', title: "认证成功",
icon: 'none', icon: "none",
duration: 2000, duration: 2000,
complete: () => { complete: () => {
setTimeout(() => { setTimeout(() => {
wx.reLaunch({ wx.reLaunch({
url: '/pages/index/index' url: "/pages/indexNew/indexNew"
}) })
}, 2000) }, 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({ wx.showLoading({
title: '提交中...' title: '提交中...'
}) })
api.completeInfo(para).then(res => { api.completeResidentInfo(para).then(res => {
wx.hideLoading() wx.hideLoading()
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
wx.showModal({ wx.showModal({
@ -464,36 +495,67 @@ Component({
}) })
} else { } else {
wx.showLoading({ wx.showLoading({
title: '提交中...' title: "提交中..."
}) })
api.completeInfo(para).then(res => { if (this.data.type === "partyMember") {
api.completePartyInfo(para).then(res => {
wx.hideLoading() wx.hideLoading()
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
wx.showModal({ wx.showModal({
title: '认证信息提交成功', title: "认证信息提交成功",
showCancel: false, showCancel: false,
content: res.data.resultMsg, content: res.data.resultMsg,
success: res => { success: () => {
wx.reLaunch({ wx.reLaunch({
url: '/pages/index/index' url: "/pages/indexNew/indexNew"
}) })
} }
}) })
} else { } else {
wx.showToast({ wx.showToast({
title: '认证成功', title: "认证成功",
icon: 'none', icon: "none",
duration: 2000, duration: 2000,
complete: () => { complete: () => {
setTimeout(() => { setTimeout(() => {
wx.reLaunch({ wx.reLaunch({
url: '/pages/index/index' url: "/pages/indexNew/indexNew"
}) })
}, 2000) }, 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 () { submitPersonalInfo () {

Loading…
Cancel
Save