|
|
@ -10,7 +10,8 @@ Page({ |
|
|
|
userInfo: {}, |
|
|
|
userInfo: {}, |
|
|
|
authStatus: 0, |
|
|
|
authStatus: 0, |
|
|
|
authType: null, |
|
|
|
authType: null, |
|
|
|
completeState: null |
|
|
|
completeState: null, |
|
|
|
|
|
|
|
authInfo:{} |
|
|
|
}, |
|
|
|
}, |
|
|
|
back(){ |
|
|
|
back(){ |
|
|
|
wx.switchTab({ |
|
|
|
wx.switchTab({ |
|
|
@ -22,6 +23,11 @@ Page({ |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/release/personAuth/index', |
|
|
|
url: '/pages/release/personAuth/index', |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} else if(this.data.authStatus == 3){ |
|
|
|
|
|
|
|
let authInfo = encodeURIComponent(JSON.stringify(this.data.authInfo)); |
|
|
|
|
|
|
|
wx.navigateTo({ |
|
|
|
|
|
|
|
url: '/pages/release/personAuth/index?authInfo=' + authInfo, |
|
|
|
|
|
|
|
}) |
|
|
|
} else if(this.data.authStatus == 1){ |
|
|
|
} else if(this.data.authStatus == 1){ |
|
|
|
wx.showToast({ |
|
|
|
wx.showToast({ |
|
|
|
title: '认证申请审核中,请等待!', |
|
|
|
title: '认证申请审核中,请等待!', |
|
|
@ -34,6 +40,11 @@ Page({ |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/release/companyAuth/index', |
|
|
|
url: '/pages/release/companyAuth/index', |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} else if(this.data.authStatus == 3){ |
|
|
|
|
|
|
|
let authInfo = encodeURIComponent(JSON.stringify(this.data.authInfo)); |
|
|
|
|
|
|
|
wx.navigateTo({ |
|
|
|
|
|
|
|
url: '/pages/release/companyAuth/index?authInfo=' + authInfo, |
|
|
|
|
|
|
|
}) |
|
|
|
} else if(this.data.authStatus == 1){ |
|
|
|
} else if(this.data.authStatus == 1){ |
|
|
|
wx.showToast({ |
|
|
|
wx.showToast({ |
|
|
|
title: '认证申请审核中,请等待!', |
|
|
|
title: '认证申请审核中,请等待!', |
|
|
@ -49,18 +60,21 @@ Page({ |
|
|
|
}, |
|
|
|
}, |
|
|
|
isAuthentication(){ |
|
|
|
isAuthentication(){ |
|
|
|
app.http('get','user/isAuthentication').then((res)=>{ |
|
|
|
app.http('get','user/isAuthentication').then((res)=>{ |
|
|
|
console.log(res) |
|
|
|
|
|
|
|
if(res.data.success){ |
|
|
|
if(res.data.success){ |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
authStatus: res.data.data.authenticationState, |
|
|
|
authStatus: res.data.data.authenticationState, |
|
|
|
authType: res.data.data.authorizationType, |
|
|
|
authType: res.data.data.authorizationType, |
|
|
|
completeState: res.data.data.completeState |
|
|
|
completeState: res.data.data.completeState, |
|
|
|
|
|
|
|
authInfo: res.data.data.authInfo |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
toResources(){ |
|
|
|
toResources(){ |
|
|
|
let that = this; |
|
|
|
let that = this; |
|
|
|
|
|
|
|
console.log(this.data.authStatus,'authStatus') |
|
|
|
|
|
|
|
console.log(this.data.authType,'authType') |
|
|
|
|
|
|
|
console.log(this.data.completeState,'completeState') |
|
|
|
if(this.data.authStatus == 2 && this.data.authType == 1 && this.data.completeState == true){ |
|
|
|
if(this.data.authStatus == 2 && this.data.authType == 1 && this.data.completeState == true){ |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/user/editNeeds/index?type=1', |
|
|
|
url: '/pages/user/editNeeds/index?type=1', |
|
|
@ -72,30 +86,31 @@ Page({ |
|
|
|
success(res){ |
|
|
|
success(res){ |
|
|
|
if(res.confirm){ |
|
|
|
if(res.confirm){ |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/release/perfectCompanyInfo/index?status=' + that.data.authStatus, |
|
|
|
url: '/pages/release/perfectCompanyInfo/index', |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else if(this.data.authStatus == 3 && this.data.authType == 1 && this.data.completeState == false){ |
|
|
|
} else if(this.data.authStatus == 0 && (this.data.authType == 1 || this.data.authType == 0) && this.data.completeState == false){ |
|
|
|
wx.showModal({ |
|
|
|
wx.showModal({ |
|
|
|
title: '提示!', |
|
|
|
title: '提示!', |
|
|
|
content: '您提交的企业信息未通过审核,点击确定去修改吧~', |
|
|
|
content: '您还未完成企业认证,点击确定去认证吧~', |
|
|
|
success(res){ |
|
|
|
success(res){ |
|
|
|
wx.navigateTo({ |
|
|
|
if(res.confirm){ |
|
|
|
url: '/pages/release/perfectCompanyInfo/index?status=' + that.data.authStatus, |
|
|
|
wx.navigateTo({ |
|
|
|
}) |
|
|
|
url: '/pages/release/companyAuth/index', |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
toNeeds(){ |
|
|
|
toNeeds(){ |
|
|
|
if(this.data.authStatus == 2 && (this.data.authType == 2 || this.data.authType == 1) && this.data.completeState == true){
|
|
|
|
if(this.data.authStatus == 2 && (this.data.authType == 2 || this.data.authType == 0) && this.data.completeState == true){
|
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/user/editNeeds/index?type=2', |
|
|
|
url: '/pages/user/editNeeds/index?type=2', |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else if((this.data.authStatus == 2 || this.data.authStatus == 3) && this.data.authType == 2 && this.data.completeState == false){ |
|
|
|
} else if(this.data.authStatus == 2 && (this.data.authType == 2 || this.data.authType == 0) && this.data.completeState == false){ |
|
|
|
wx.showModal({ |
|
|
|
wx.showModal({ |
|
|
|
title: '提示!', |
|
|
|
title: '提示!', |
|
|
|
content: '您还未完善个人信息,点击确定去完善吧~', |
|
|
|
content: '您还未完善个人信息,点击确定去完善吧~', |
|
|
@ -105,15 +120,10 @@ Page({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else if((this.data.authStatus == 2 || this.data.authStatus == 3) && this.data.authType == 1 && this.data.completeState == false){ |
|
|
|
} else if(this.data.authStatus == 0 && (this.data.authType == 2 || this.data.authType == 0) && this.data.completeState == false){ |
|
|
|
wx.showModal({ |
|
|
|
wx.showModal({ |
|
|
|
title: '提示!', |
|
|
|
title: '提示!', |
|
|
|
content: '您还未完善企业信息,点击确定去完善吧~', |
|
|
|
content: '您还未完成认证,点击上方按钮去认证吧!', |
|
|
|
success(res){ |
|
|
|
|
|
|
|
wx.navigateTo({ |
|
|
|
|
|
|
|
url: '/pages/release/perfectCompanyInfo/index', |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|