feat: 商业认证完整流程 + 通知时间过滤
商业认证: - 申请页重写:商户名+说明字段,显示审核中/被拒/已通过状态 - 被拒绝显示原因,可重新申请 - 管理员拒绝时输入原因 - 商业核算页未认证用户点详情弹认证提示,跳转认证页面 - 删除项目仅管理员可见 通知: - 只显示用户注册后的通知,避免角色变更后看到旧通知 - 搜索未收录通知只发管理员和高级编辑者 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -27,8 +27,8 @@
|
||||
<div class="review-list">
|
||||
<div v-for="app in businessApps" :key="app._id || app.id" class="review-item">
|
||||
<div class="review-info">
|
||||
<span class="review-name">{{ app.user_name || app.display_name }}</span>
|
||||
<span class="review-reason">{{ app.reason }}</span>
|
||||
<span class="review-name">{{ app.display_name || app.username }}</span>
|
||||
<span class="review-reason">商户名:{{ app.business_name }}</span>
|
||||
</div>
|
||||
<div class="review-actions">
|
||||
<button class="btn-sm btn-approve" @click="approveBusiness(app)">通过</button>
|
||||
@@ -101,7 +101,7 @@ import { ref, computed, onMounted } from 'vue'
|
||||
import { useAuthStore } from '../stores/auth'
|
||||
import { useUiStore } from '../stores/ui'
|
||||
import { api } from '../composables/useApi'
|
||||
import { showConfirm } from '../composables/useDialog'
|
||||
import { showConfirm, showPrompt } from '../composables/useDialog'
|
||||
|
||||
const auth = useAuthStore()
|
||||
const ui = useUiStore()
|
||||
@@ -248,8 +248,13 @@ async function approveBusiness(app) {
|
||||
|
||||
async function rejectBusiness(app) {
|
||||
const id = app._id || app.id
|
||||
const reason = await showPrompt('请输入拒绝原因(选填):')
|
||||
if (reason === null) return
|
||||
try {
|
||||
const res = await api(`/api/business-applications/${id}/reject`, { method: 'POST' })
|
||||
const res = await api(`/api/business-applications/${id}/reject`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ reason: reason || '' }),
|
||||
})
|
||||
if (res.ok) {
|
||||
businessApps.value = businessApps.value.filter(item => (item._id || item.id) !== id)
|
||||
ui.showToast('已拒绝')
|
||||
|
||||
Reference in New Issue
Block a user