33 lines
944 B
JavaScript
33 lines
944 B
JavaScript
// admin-resume.js - 个人简历页面功能
|
|
|
|
function createResume(userId) {
|
|
fetch(`/api/admin/users/${userId}/resume`, {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
body: JSON.stringify({
|
|
basic_info: {
|
|
name: '',
|
|
title: '',
|
|
email: '',
|
|
phone: '',
|
|
location: '',
|
|
website: '',
|
|
summary: ''
|
|
}
|
|
})
|
|
})
|
|
.then(response => response.json())
|
|
.then(result => {
|
|
if (result.success) {
|
|
showCustomAlert('success', '创建成功', '简历创建成功');
|
|
window.location.reload();
|
|
} else {
|
|
showCustomAlert('error', '创建失败', result.message || '操作失败');
|
|
}
|
|
})
|
|
.catch(error => {
|
|
showCustomAlert('error', '创建失败', '网络请求失败');
|
|
});
|
|
} |