diff --git a/backend/main.py b/backend/main.py index 0c79e1b..db3ddcd 100644 --- a/backend/main.py +++ b/backend/main.py @@ -501,7 +501,7 @@ def get_my_business_application(user=Depends(get_current_user)): def list_business_applications(user=Depends(require_role("admin"))): conn = get_db() rows = conn.execute( - "SELECT a.id, a.user_id, a.business_name, a.document, a.status, a.created_at, " + "SELECT a.id, a.user_id, a.business_name, a.document, a.status, a.reject_reason, a.created_at, " "u.display_name, u.username FROM business_applications a " "LEFT JOIN users u ON a.user_id = u.id ORDER BY a.id DESC" ).fetchall() diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 3de03fe..c21ba42 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -82,9 +82,6 @@ const allTabs = [ { key: 'inventory', icon: '📦', label: '个人库存', require: 'login' }, { key: 'oils', icon: '💧', label: '精油价目' }, { key: 'projects', icon: '💼', label: '商业核算', require: 'login' }, - { key: 'audit', icon: '📜', label: '操作日志', hide: 'admin' }, - { key: 'bugs', icon: '🐛', label: 'Bug', hide: 'admin' }, - { key: 'users', icon: '👥', label: '用户管理', hide: 'admin' }, ] // 所有人都能看到大部分 tab,bug 和用户管理只有 admin 可见 diff --git a/frontend/src/components/UserMenu.vue b/frontend/src/components/UserMenu.vue index 32e5d81..d72ff52 100644 --- a/frontend/src/components/UserMenu.vue +++ b/frontend/src/components/UserMenu.vue @@ -14,6 +14,11 @@ + @@ -88,6 +93,11 @@ function goMyDiary() { router.push('/mydiary') } +function goAdmin(section) { + emit('close') + router.push('/' + section) +} + function toggleNotifications() { showNotifPanel.value = !showNotifPanel.value showBugForm.value = false diff --git a/frontend/src/views/MyDiary.vue b/frontend/src/views/MyDiary.vue index a9632eb..5dc58d1 100644 --- a/frontend/src/views/MyDiary.vue +++ b/frontend/src/views/MyDiary.vue @@ -241,56 +241,58 @@ -
-

💼 商业认证

+
+

🏢 商业用户认证

-
-
-
已认证商业用户
+
+ ✅ 已认证商业用户
- +
+ ⏳ 认证申请审核中 +
商户名:{{ bizApp.business_name }} · 提交时间:{{ formatDate(bizApp.created_at) }}
+
- + - -