提交 00be4f9d authored 作者: matian's avatar matian

updates

上级 f81b3783
import httpRequest from '@/utils/httpRequest' import httpRequest from '@/utils/httpRequest'
const projectId = process.env.projectId const projectId = process.env.projectId
const baseURL = process.env.baseURL
/** /**
* 获取用户信息 * 获取用户信息
*/ */
...@@ -151,9 +150,12 @@ export function createSign(data) { ...@@ -151,9 +150,12 @@ export function createSign(data) {
export function getSignDocument(params) { export function getSignDocument(params) {
return httpRequest.get('/api/usercenter/v1/sign/document', { params }) return httpRequest.get('/api/usercenter/v1/sign/document', { params })
} }
/** /**
* 申请面试 * 申请面试
*/ */
export function getInterview(data) { export function changeSubmissionStage(data) {
return httpRequest.post(`${baseURL}/api/enrollment/v1.0/application-materials/submit/${projectId}`, data) return httpRequest.post(`/api/enrollment/v1.0/application-materials/submit/${projectId}`, data, {
} headers: { 'Content-Type': 'application/json' }
\ No newline at end of file })
}
...@@ -44,18 +44,9 @@ export default function(_this) { ...@@ -44,18 +44,9 @@ export default function(_this) {
return { basic_info: basicInfo } return { basic_info: basicInfo }
}, },
callback() { callback() {
this.form.options.disabled = true _this.changeSubmissionStage(() => {
if (_this.showSubmitedDialog) { this.form.options.disabled = true
_this.dialogVisible = true })
} else {
_this.completeVisible = true
}
_this.getApplication()
_this.getInterview()
},
errorCallback() {
_this.completeVisible = true
}
}, },
form: { form: {
prev: { to: { query: { active: 'interview_cjd' } } }, prev: { to: { query: { active: 'interview_cjd' } } },
......
...@@ -99,15 +99,17 @@ export default { ...@@ -99,15 +99,17 @@ export default {
} }
}) })
}, },
getInterview() { changeSubmissionStage(callback) {
api.getInterview({ submission_stage: 'INTERVIEW_APPLICATION' }).then(response => { api
const { data, error, message } = response .changeSubmissionStage({ submission_stage: 'INTERVIEW_APPLICATION' })
if (error.toString() === '0') { .then(response => {
this.detail = data this.dialogVisible = true
} else { this.getApplication()
this.$message.error(message) callback && callback()
} })
}) .catch(() => {
this.completeVisible = true
})
}, },
handlePageChange(value) { handlePageChange(value) {
this.currentActive = value this.currentActive = value
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论