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