Browse Source

feat: 添加认证和简历完成后的回调跳转功能

- 在企业认证、个人认证和简历页面添加回调参数处理
- 根据回调参数决定认证/简历完成后跳转到发布页面
- 在首页点击招聘/求职按钮时添加认证检查流程
- 移除store中冗余的config.fail调用
master
前端-胡立永 1 day ago
parent
commit
2e56efe7e0
5 changed files with 183 additions and 30 deletions
  1. +63
    -4
      pages/home/index.vue
  2. +26
    -6
      pages_subpack/enterprise/index.vue
  3. +51
    -3
      pages_subpack/person/index.vue
  4. +43
    -14
      pages_subpack/resume/index.vue
  5. +0
    -3
      store/modules/user.js

+ 63
- 4
pages/home/index.vue View File

@ -275,9 +275,69 @@
}, },
toNavigator(event){ toNavigator(event){
console.info(event) console.info(event)
uni.navigateTo({
url:"/pages_subpack/release/index?status="+event
})
if (event === 1) {
// -
this.$store.dispatch('onEnterpriseAuth', {
success: (company) => {
//
uni.navigateTo({
url: "/pages_subpack/release/index?status=" + event
})
},
fail: (company) => {
//
uni.showToast({
title: '请先完成企业认证',
icon: 'none'
})
setTimeout(() => {
uni.navigateTo({
url: "/pages_subpack/enterprise/index?callback=release&status=" + event
})
}, 1000)
}
})
} else if (event === 2) {
// -
this.$store.dispatch('onPersonalAuth', {
success: (person) => {
//
this.$store.dispatch('onResumeComplete', {
success: (resume) => {
//
uni.navigateTo({
url: "/pages_subpack/release/index?status=" + event
})
},
fail: (resume) => {
//
uni.showToast({
title: '请先完善个人简历',
icon: 'none'
})
setTimeout(() => {
uni.navigateTo({
url: "/pages_subpack/resume/index?callback=release&status=" + event
})
}, 1000)
}
})
},
fail: (person) => {
//
uni.showToast({
title: '请先完成个人认证',
icon: 'none'
})
setTimeout(() => {
uni.navigateTo({
url: "/pages_subpack/person/index?callback=release&status=" + event
})
}, 1000)
}
})
}
}, },
onCategory(){ onCategory(){
uni.navigateTo({ uni.navigateTo({
@ -285,7 +345,6 @@
}) })
} }
} }
} }
</script> </script>
<style> <style>


+ 26
- 6
pages_subpack/enterprise/index.vue View File

@ -92,6 +92,8 @@
status:-1, status:-1,
show:false, show:false,
indList: [], indList: [],
callback: '', //
callbackStatus: '', //
form: { form: {
id:"", id:"",
role:1, role:1,
@ -184,6 +186,15 @@
}, },
watch: { watch: {
},
onLoad(options) {
//
if (options.callback) {
this.callback = options.callback
}
if (options.status) {
this.callbackStatus = options.status
}
}, },
onReady() { onReady() {
this.onQueryCategoryList() this.onQueryCategoryList()
@ -279,15 +290,24 @@
// }) // })
// }else{ // }else{
addAuthenticationCompany(params).then(response=>{ addAuthenticationCompany(params).then(response=>{
uni.$u.toast("提交成功,等待申请")
setTimeout(()=>{
uni.$u.toast("提交成功,等待申请")
setTimeout(()=>{
//
if (this.callback === 'release' && this.callbackStatus) {
//
uni.navigateTo({
url: "/pages_subpack/release/index?status=" + this.callbackStatus
})
} else {
//
uni.switchTab({ uni.switchTab({
url:"/pages/home/index" url:"/pages/home/index"
}) })
},1500)
}).catch(error=>{
})
}
},1500)
}).catch(error=>{
})
// } // }
}, },
submit() { submit() {


+ 51
- 3
pages_subpack/person/index.vue View File

@ -102,6 +102,8 @@
status:-1, status:-1,
show:false, show:false,
indList: [], indList: [],
callback: '', //
callbackStatus: '', //
fileList: [], fileList: [],
form: { form: {
id:'', id:'',
@ -196,6 +198,15 @@
}, },
watch: { watch: {
},
onLoad(options) {
//
if (options.callback) {
this.callback = options.callback
}
if (options.status) {
this.callbackStatus = options.status
}
}, },
onReady() { onReady() {
this.onAuthenticationPerson() this.onAuthenticationPerson()
@ -297,15 +308,52 @@
// }) // })
// }else{ // }else{
addAuthenticationPerson(params).then(response=>{ addAuthenticationPerson(params).then(response=>{
uni.$u.toast("提交成功,等待申请")
uni.$u.toast("提交成功,等待申请")
//
this.$store.dispatch('onResumeComplete').then(isComplete => {
if (!isComplete) {
setTimeout(() => {
uni.$u.toast("请完善您的简历信息")
setTimeout(() => {
//
if (this.callback === 'release' && this.callbackStatus) {
uni.navigateTo({
url: "/pages_subpack/resume/index?callback=release&status=" + this.callbackStatus
})
} else {
uni.navigateTo({
url: "/pages_subpack/resume/index"
})
}
}, 1000)
}, 1500)
} else {
setTimeout(()=>{
//
if (this.callback === 'release' && this.callbackStatus) {
//
uni.navigateTo({
url: "/pages_subpack/release/index?status=" + this.callbackStatus
})
} else {
//
uni.switchTab({
url:"/pages/home/index"
})
}
},1500)
}
}).catch(error => {
//
setTimeout(()=>{ setTimeout(()=>{
uni.switchTab({ uni.switchTab({
url:"/pages/home/index" url:"/pages/home/index"
}) })
},1500) },1500)
}).catch(error=>{
}) })
}).catch(error=>{
})
// } // }
}, },
deleteCerImageBackFilePic(event) { deleteCerImageBackFilePic(event) {


+ 43
- 14
pages_subpack/resume/index.vue View File

@ -94,6 +94,8 @@
data() { data() {
return { return {
showSex: false, showSex: false,
callback: '', //
callbackStatus: '', //
sexList: [ sexList: [
{ {
name: '男', name: '男',
@ -319,15 +321,24 @@
"headImage": that.form.idCardFile.map(item => item.url).join(','), "headImage": that.form.idCardFile.map(item => item.url).join(','),
} }
updateResume(params).then(response=>{ updateResume(params).then(response=>{
uni.$u.toast("保存成功!")
setTimeout(()=>{
uni.$u.toast("保存成功!")
setTimeout(()=>{
//
if (this.callback === 'release' && this.callbackStatus) {
//
uni.navigateTo({
url: "/pages_subpack/release/index?status=" + this.callbackStatus
})
} else {
//
uni.navigateBack({ uni.navigateBack({
delta:1 delta:1
}) })
},1500)
}).catch(error=>{
})
}
},1500)
}).catch(error=>{
})
}else{ }else{
let params = { let params = {
"name": that.form.name, "name": that.form.name,
@ -344,18 +355,27 @@
"headImage": that.form.idCardFile.map(item => item.url).join(','), "headImage": that.form.idCardFile.map(item => item.url).join(','),
} }
addResume(params).then(response => { addResume(params).then(response => {
uni.$u.toast("提交成功,等待申请")
setTimeout(()=>{
uni.switchTab({
url:"/pages/home/index"
uni.$u.toast("提交成功,等待申请")
setTimeout(()=>{
//
if (this.callback === 'release' && this.callbackStatus) {
//
uni.navigateTo({
url: "/pages_subpack/release/index?status=" + this.callbackStatus
}) })
},1500)
}).catch(error => {
setTimeout(()=>{
} else {
//
uni.switchTab({ uni.switchTab({
url:"/pages/home/index" url:"/pages/home/index"
}) })
},1500)
}
},1500)
}).catch(error => {
setTimeout(()=>{
uni.switchTab({
url:"/pages/home/index"
})
},1500)
}) })
} }
}, },
@ -380,6 +400,15 @@
}) })
} }
}, },
onLoad(options) {
//
if (options.callback) {
this.callback = options.callback
}
if (options.status) {
this.callbackStatus = options.status
}
},
onReady() { onReady() {
this.onIndustryList() this.onIndustryList()
this.$refs.uForm.setRules(this.rules) this.$refs.uForm.setRules(this.rules)


+ 0
- 3
store/modules/user.js View File

@ -50,7 +50,6 @@ export default {
} }
} catch (error) { } catch (error) {
console.error('企业认证检查失败:', error) console.error('企业认证检查失败:', error)
config.fail(null)
} }
}, },
@ -73,7 +72,6 @@ export default {
} }
} catch (error) { } catch (error) {
console.error('个人认证检查失败:', error) console.error('个人认证检查失败:', error)
config.fail(null)
} }
}, },
@ -96,7 +94,6 @@ export default {
} }
} catch (error) { } catch (error) {
console.error('简历状态检查失败:', error) console.error('简历状态检查失败:', error)
config.fail(null)
} }
} }
} }

Loading…
Cancel
Save