提交 ff720136 authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 28f9c364
......@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" href="https://zws-imgs-pub.ezijing.com/pc/base/favicon.ico" />
<meta name="theme-color" content="#3276fc" />
<meta name="theme-color" content="#aa1941" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>紫荆教育e-SAAS平台</title>
<script src="https://webapp-pub.ezijing.com/plugins/tinymce@6/tinymce.min.js"></script>
......
......@@ -2,12 +2,12 @@ import httpRequest from '@/utils/axios'
// 获取用户信息
export function getUser() {
return httpRequest.get('/api/passport/account/get-user-info')
return httpRequest.get('/api/usercenter/v2/frontend/user/get-user-info')
}
// 退出登录
export function logout() {
return httpRequest.get('/api/passport/rest/logout')
return httpRequest.get('/api/usercenter/v2/frontend/user/logout')
}
// 获取oss token
......
......@@ -25,3 +25,8 @@ export function getAlumniUserInfo() {
export function checkInvite(data: { id: string }) {
return httpRequest.post(`/api/hr/api/v1/alumni-talent/${data.id}/check-invite`, data)
}
// 分发项目合作邀请短信
export function sendInviteSMS(data: { alumni_id: string }) {
return httpRequest.post('/api/hr/api/v1/message/send/invite-sms', data)
}
......@@ -3,7 +3,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import { useArea } from '@/composables/useArea'
import { useClasses } from '@/composables/useClasses'
import { sex, projectPrefix, industryCategory, industryCategoryList } from '@/utils/dictionary'
import { getAlumniList, checkInvite } from '../api'
import { getAlumniList, checkInvite, sendInviteSMS } from '../api'
import type { AlumniType } from '../types'
import { useUserStore } from '@/stores/user'
......@@ -102,13 +102,11 @@ function handleConcat(row: AlumniType) {
`【紫荆教育】尊敬的用户,您好,紫荆教育校友诚邀您参与项目合作机会,请点击如下链接<a href="${url}" target="_blank">${url}</a>,期待您的回复。`,
{ confirmButtonText: '确认发送', dangerouslyUseHTMLString: true }
).then(() => {
checkInvite({ id: row.id })
.then(() => {
checkInvite({ id: row.id }).then(() => {
sendInviteSMS({ alumni_id: row.id }).then(() => {
ElMessage.success('发送成功')
})
.catch(res => {
ElMessage.error(res.message)
})
})
})
}
......
......@@ -66,14 +66,10 @@ const onCancel = () => {
// 修改
const update = () => {
updateCompany(form)
.then(() => {
ElMessage({ message: '提交成功', type: 'success' })
router.push('/')
})
.catch(res => {
ElMessage.error(res.message)
})
updateCompany(form).then(() => {
ElMessage({ message: '提交成功', type: 'success' })
router.push('/')
})
}
onMounted(() => {
......
......@@ -48,14 +48,10 @@ function handleUploadProgress(e: any) {
}
}
function handleUploadSuccess(file: any) {
submitResume({ id: props.id, resume: file.raw.url })
.then(() => {
isUploaded = true
ElMessage.success('投递成功')
})
.catch(res => {
ElMessage.error(res.message)
})
submitResume({ id: props.id, resume: file.raw.url }).then(() => {
isUploaded = true
ElMessage.success('投递成功')
})
}
</script>
......
......@@ -75,14 +75,10 @@ function onEnable(row: JobType) {
const status = row.status === 1 ? 2 : 1
const statusText = status === 1 ? '启用' : '禁用'
ElMessageBox.confirm(`确定要${statusText}该岗位吗?`).then(() => {
enableJob({ status, id: row.id as string })
.then(() => {
ElMessage.success(`${statusText}成功`)
appList?.refetch()
})
.catch(res => {
ElMessage.error(res.message)
})
enableJob({ status, id: row.id as string }).then(() => {
ElMessage.success(`${statusText}成功`)
appList?.refetch()
})
})
}
</script>
......
......@@ -43,15 +43,11 @@ onMounted(() => {
function onEnable(status: 1 | 2, data: ProjectType) {
const statusText = status === 1 ? '启用' : '禁用'
ElMessageBox.confirm(`确定要${statusText}该项目吗?`).then(() => {
enableProject({ status, id: data.id as string })
.then(() => {
ElMessage.success(`${statusText}成功`)
fetchList()
emit('update')
})
.catch(res => {
ElMessage.error(res.message)
})
enableProject({ status, id: data.id as string }).then(() => {
ElMessage.success(`${statusText}成功`)
fetchList()
emit('update')
})
})
}
......
......@@ -47,26 +47,18 @@ const onCancel = () => {
}
// 创建
const create = () => {
createProject(form)
.then(() => {
ElMessage({ message: '创建成功', type: 'success' })
router.push('/project')
})
.catch(res => {
ElMessage.error(res.message)
})
createProject(form).then(() => {
ElMessage({ message: '创建成功', type: 'success' })
router.push('/project')
})
}
// 修改
const update = () => {
const params = { ...form, id: props.id as string }
updateProject(params)
.then(() => {
ElMessage({ message: '修改成功', type: 'success' })
router.push('/project/view/' + props.id)
})
.catch(res => {
ElMessage.error(res.message)
})
updateProject(params).then(() => {
ElMessage({ message: '修改成功', type: 'success' })
router.push('/project/view/' + props.id)
})
}
onMounted(() => {
......
......@@ -4,3 +4,8 @@ import httpRequest from '@/utils/axios'
export function getInviteInfo(params: { id: string }) {
return httpRequest.get(`/api/hr/api/v1/message/alumni-invited-info/${params.id}`, { params })
}
// 分发同意合作短信给邀请者
export function joinProject(data: { alumni_id: string; from_id: string }) {
return httpRequest.post('/api/hr/api/v1/message/send/consent-cooperate-sms', data)
}
<script setup lang="ts">
import { ElMessage } from 'element-plus'
import { useHead } from '@vueuse/head'
import { getInviteInfo } from '../api'
import { getInviteInfo, joinProject } from '../api'
import { projectPrefix } from '@/utils/dictionary'
let windowWidth = $ref(0)
......@@ -43,6 +45,13 @@ function fetchData() {
Object.assign(data, res.data.detail)
})
}
// 参与项目
function join() {
const params = { alumni_id: route.query.to_id as string, from_id: route.query.from_id as string }
joinProject(params).then(() => {
ElMessage.success('联系方式已发送')
})
}
onMounted(() => {
fetchData()
......@@ -64,7 +73,7 @@ onUnmounted(() => {
>学员,<b>{{ data.username }}</b>
</p>
<p class="t2">现诚邀您参与我的项目</p>
<p class="t4">参与项目</p>
<p class="t4" @click="join">参与项目</p>
<p class="t3">*点击后将发送您的联系方式给紫荆校友</p>
</div>
</div>
......
......@@ -59,8 +59,10 @@ httpRequest.interceptors.response.use(
location.href = `${import.meta.env.VITE_LOGIN_URL}?rd=${encodeURIComponent(location.href)}`
return Promise.reject(data)
}
if (data.code === 4009) {
// 提示错误
if ([4002, 4003, 4004, 4005, 4009, 4010].includes(data.code)) {
ElMessage.error(data.message)
return Promise.reject(data)
}
return Promise.reject(data)
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论