feat(creator): 内容审核展示创作者与分集信息

This commit is contained in:
Zhou Weidong committed 2026-11-09 10:27:42 +08:00
1 parent 71ee469563
commit 837266ce7e
4 files changed
+325 -29

No files matched your search

@@ -146,6 +146,22 @@ export function useCreatorAudit() {
await load()
}
/** 解冻:冻结是可控状态,解冻后即可恢复使用与提交 */
async function unfreeze(row) {
try {
await ElMessageBox.confirm(`解冻后「${row.name}」可继续使用,确认解冻?`, '解冻创作者', {
confirmButtonText: '确认解冻',
cancelButtonText: '取消',
type: 'warning'
})
} catch {
return
}
await auditCreatorApi(row.id, { action: 'APPROVE', reason: '运营解冻' })
ElMessage.success('已解冻')
await load()
}
onMounted(load)
// ---------- 手工录入创作者主体 ----------
@@ -156,7 +172,9 @@ export function useCreatorAudit() {
type: 'COMPANY',
contactName: '',
contactEmail: '',
countryCode: 'ID'
countryCode: 'ID',
// 录入即开号:默认勾选,保存后直接弹出账号密码
openAccount: true
})
function openCreate() {
@@ -165,7 +183,8 @@ export function useCreatorAudit() {
type: 'COMPANY',
contactName: '',
contactEmail: '',
countryCode: 'ID'
countryCode: 'ID',
openAccount: true
})
createVisible.value = true
}
@@ -174,9 +193,17 @@ export function useCreatorAudit() {
if (!createForm.name.trim()) return ElMessage.warning('请填写创作者名称')
createSaving.value = true
try {
await createCreatorApi({ ...createForm, name: createForm.name.trim() })
ElMessage.success('已录入,待入驻审核通过后才能开通账号')
const created = await createCreatorApi({ ...createForm, name: createForm.name.trim() })
const creatorId = created.data
createVisible.value = false
if (createForm.openAccount && creatorId) {
// 录入后立刻开号,凭据只在这里出现一次
const res = await openCreatorAccountApi(creatorId)
accountResult.value = res.data || null
accountVisible.value = true
} else {
ElMessage.success('创作者已创建')
}
await load()
} finally {
createSaving.value = false
@@ -264,6 +291,7 @@ export function useCreatorAudit() {
openAudit,
confirmAudit,
freeze,
unfreeze,
createVisible,
createSaving,
createForm,