flat: 企业招工身份校验

This commit is contained in:
Apcallover
2024-03-17 20:23:02 +08:00
parent 380663a202
commit e035ce1daa
3 changed files with 29 additions and 4 deletions

View File

@@ -61,3 +61,11 @@ export const getuserrecruitDetailApp = (params) => {
params params
}) })
} }
export const seeIsHaveCodep = (params) => {
return request({
url: '/api/jobslink-api/tenant/company/app/isHaveCode',
method: 'get',
params
})
}

View File

@@ -14,6 +14,8 @@
</template> </template>
<script> <script>
import {seeIsHaveCodep} from '@/api/userrecruit.js'
import { mapState } from 'vuex'
export default { export default {
data() { data() {
@@ -21,6 +23,9 @@
} }
}, },
computed: {
...mapState({idNumber: (state) => state.auth.authInfo.idNumber}),
},
methods: { methods: {
next(type) { next(type) {
switch (type){ switch (type){
@@ -29,10 +34,22 @@
this.navTo('/pages/recruit/subPage/index?type=none') this.navTo('/pages/recruit/subPage/index?type=none')
break; break;
case 1: case 1:
this.isHaveCode(this.idNumber).then(() => {
this.$store.commit('setEnterprise', type) this.$store.commit('setEnterprise', type)
this.navTo('/pages/recruit/subPage/index?type=enterprise') this.navTo('/pages/recruit/subPage/index?type=enterprise')
})
break; break;
} }
},
isHaveCode(idNumber) {
return new Promise(async(resolve, reject) => {
let resData = await seeIsHaveCodep({idNumber})
if(resData.data.code === 200) {
resData.data.data && resolve()
} else {
reject()
}
})
} }
} }
} }

View File

@@ -4,9 +4,9 @@ module.exports = {
proxy: { proxy: {
'/api': { '/api': {
// target: 'http://192.168.3.104:8000', // 本地服务接口地址 // target: 'http://192.168.3.104:8000', // 本地服务接口地址
target: "http://39.98.184.58:8000", // 阿里云后台地址 // target: "http://39.98.184.58:8000", // 阿里云后台地址
// target: 'http://192.168.3.108:8000', // 本地服务接口地址 // target: 'http://192.168.3.108:8000', // 本地服务接口地址
// target: 'http://192.168.3.111:8000', // 本地服务接口地址 target: 'http://192.168.3.111:8000', // 本地服务接口地址
ws: true, ws: true,
pathRewrite: { pathRewrite: {
'^/api': '/' '^/api': '/'