feat(publicity): 公示页支持/执行意向 (匿名提交 + 管理审核)
- 新增 biz_publicity_support_intent / biz_publicity_execution_intent 两张独立表 (与已登录视角的 biz_support_intent / biz_execution_intent 解耦, 避免匿名数据污染强绑表) - 后端 BizPublicityIntentController: 公开提交 + 公开查重 (按 project_id+phone+source) + 管理 CRUD 已登录直接取 user_id, 未登录但 phone 命中 sys_user 仍自动关联 user_id (不回强制登录) - /business/publicity/** 加 Spring Security permitAll - 前端 PublicityDetail.vue: 右侧 2 个意向按钮 (已登录/匿名都弹 dialog 填 5 字段), 已提交状态用 hasPublicityIntent 按 phonenumber 持久化查回 - 重写 manager/SupportIntent.vue + manager/ExecIntent.vue: 列表/筛选/CSV导出/状态变更/批量删除
This commit is contained in:
@@ -107,3 +107,40 @@ export const downloadImportTemplate = (unitType) =>
|
||||
// 专家导入模板下载
|
||||
export const downloadExpertTemplate = () =>
|
||||
request.get('/business/expert/importTemplate', { responseType: 'blob' })
|
||||
|
||||
// ========== 公示页意向 (公开匿名提交, 已在登录或未登录时均可调) ==========
|
||||
// 提交支持意向: body { projectId, name, phone, workUnit, department?, position? }
|
||||
export function submitPublicitySupportIntent(data) {
|
||||
return request.post('/business/publicity/supportIntent', data)
|
||||
}
|
||||
// 提交执行意向
|
||||
export function submitPublicityExecutionIntent(data) {
|
||||
return request.post('/business/publicity/executionIntent', data)
|
||||
}
|
||||
// 持久化查重: GET /business/publicity/hasIntent?projectId=&phone=&type=support|execution
|
||||
export function hasPublicityIntent(projectId, phone, type) {
|
||||
return request.get('/business/publicity/hasIntent', { params: { projectId, phone, type } })
|
||||
}
|
||||
|
||||
// ========== 公示页意向 管理端 (manager / admin 后台) ==========
|
||||
// 列表分页 (后端 startPage 模式)
|
||||
export function listPublicitySupportIntent(params) {
|
||||
return request.get('/business/publicitySupportIntent/list', { params })
|
||||
}
|
||||
export function listPublicityExecutionIntent(params) {
|
||||
return request.get('/business/publicityExecutionIntent/list', { params })
|
||||
}
|
||||
// 编辑 (改 intentStatus / remark)
|
||||
export function updatePublicitySupportIntent(data, opts) {
|
||||
return request.put('/business/publicitySupportIntent', data, opts)
|
||||
}
|
||||
export function updatePublicityExecutionIntent(data, opts) {
|
||||
return request.put('/business/publicityExecutionIntent', data, opts)
|
||||
}
|
||||
// 删除 (单/多)
|
||||
export function deletePublicitySupportIntent(ids) {
|
||||
return request.delete(`/business/publicitySupportIntent/${Array.isArray(ids) ? ids.join(',') : ids}`)
|
||||
}
|
||||
export function deletePublicityExecutionIntent(ids) {
|
||||
return request.delete(`/business/publicityExecutionIntent/${Array.isArray(ids) ? ids.join(',') : ids}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user