|
@@ -207,61 +207,87 @@
|
|
|
verifyCode: this.verifyCode
|
|
|
}).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
- this.$api.doRequest('post', '/identityAuthenticationInfo/api/modifyIdentityPhone', {
|
|
|
- customerPhone: this.price,
|
|
|
- id: this.id,
|
|
|
- commonId: this.userInfo.id
|
|
|
- }, 'application/json;charset=UTF-8').then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- that.$api.msg('修改成功!')
|
|
|
- that.pricestatusTwo = false
|
|
|
- that.pricestatus = false
|
|
|
- that.getList()
|
|
|
- // uni.navigateTo({
|
|
|
- // url: '/pages/attestation/indexTwo'
|
|
|
- // });
|
|
|
-
|
|
|
- } else {
|
|
|
+ that.$api.doRequest('get',
|
|
|
+ '/identityAuthenticationInfo/selectPhone', that
|
|
|
+ .identityAuthenticationInfo)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == '11018') {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '该手机号已认证过个人粮商,再次认证将覆盖之前的认证信息,是否确定认证?',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ that.$api.doRequest('post',
|
|
|
+ '/identityAuthenticationInfo/api/modifyIdentityPhone',
|
|
|
+ that.identityAuthenticationInfo).then(
|
|
|
+ res => {
|
|
|
+ uni.showToast({
|
|
|
+ title: '提交成功',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/attestation/indexTwo`,
|
|
|
+ })
|
|
|
+ }).catch(res => {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.message,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else if (res.cancel) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '提交失败',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else if (res.data.code == 200) {
|
|
|
uni.showToast({
|
|
|
- title: res.errmsg,
|
|
|
+ title: '提交成功',
|
|
|
icon: 'none',
|
|
|
duration: 2000
|
|
|
})
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == "ERROR") {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/attestation/indexTwo`,
|
|
|
+ })
|
|
|
+ } else {
|
|
|
uni.showToast({
|
|
|
- title: res.message,
|
|
|
+ title: res.data.message,
|
|
|
icon: 'none',
|
|
|
duration: 2000
|
|
|
})
|
|
|
- return
|
|
|
}
|
|
|
- })
|
|
|
- .catch(res => {
|
|
|
+
|
|
|
+ }).catch(res => {
|
|
|
uni.showToast({
|
|
|
- title: res.errmsg,
|
|
|
+ title: res.data.message,
|
|
|
icon: 'none',
|
|
|
duration: 2000
|
|
|
})
|
|
|
- });
|
|
|
-
|
|
|
- // uni.hideLoading()
|
|
|
+ })
|
|
|
+
|
|
|
} else {
|
|
|
- // uni.hideLoading()1
|
|
|
+ that.verification = false
|
|
|
uni.showToast({
|
|
|
title: res.data.message,
|
|
|
icon: 'none',
|
|
|
duration: 2000
|
|
|
})
|
|
|
+ return false
|
|
|
}
|
|
|
})
|
|
|
.catch(res => {
|
|
|
+ that.verification = false
|
|
|
uni.showToast({
|
|
|
title: res.data.message,
|
|
|
icon: 'none',
|
|
|
duration: 2000
|
|
|
})
|
|
|
+ return false
|
|
|
});
|
|
|
},
|
|
|
getcode() {
|