From 6584417ed8978b880492bb4c5d7919012f2f8735 Mon Sep 17 00:00:00 2001 From: Ghost <106998207@qq.com> Date: Sat, 28 Mar 2026 17:46:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=A1=E6=A0=B8=E6=A8=A1=E5=BC=8F=20r?= =?UTF-8?q?untime=20=E5=90=8C=E6=AD=A5=E3=80=81=E9=82=80=E8=AF=B7=E7=A0=81?= =?UTF-8?q?=E4=B8=8E=E5=B0=8F=E7=AB=AF=20tabBar/=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E5=8F=8A=E7=AE=A1=E7=90=86=E7=AB=AF=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - api: AppConfig runtime 返回 reviewMode;Invite/Settings/AppUser 等调整 - 微信小程序与抖音:app 与 tabBar、enterprise/camera/index/upload/profile 对齐审核与邀请逻辑 - 管理端:Dashboard、Settings、Users、UserDetailDialog 等更新 Made-with: Cursor --- admin/src/components/UserDetailDialog.vue | 14 +- admin/src/views/admin/Dashboard.vue | 49 +- admin/src/views/admin/Users.vue | 3275 +++++++++--------- admin/src/views/superadmin/Settings.vue | 32 +- admin/src/views/superadmin/Users.vue | 37 +- api/app/controller/admin/AppUser.php | 25 +- api/app/controller/admin/Invite.php | 150 +- api/app/controller/api/AppConfig.php | 4 + api/app/controller/superadmin/AppUser.php | 23 +- api/app/controller/superadmin/Settings.php | 80 +- douyin-miniprogram/app.js | 16 +- douyin-miniprogram/custom-tab-bar/index.js | 12 +- douyin-miniprogram/custom-tab-bar/index.ttml | 4 +- douyin-miniprogram/custom-tab-bar/index.ttss | 6 + douyin-miniprogram/pages/enterprise/index.js | 6 +- douyin-miniprogram/pages/index/camera.js | 28 +- douyin-miniprogram/pages/index/index.js | 34 +- douyin-miniprogram/pages/index/upload.js | 6 +- douyin-miniprogram/pages/profile/index.js | 10 +- douyin-miniprogram/pages/profile/index.ttml | 2 +- miniprogram/app.js | 10 +- miniprogram/custom-tab-bar/index.js | 13 +- miniprogram/custom-tab-bar/index.wxml | 6 +- miniprogram/custom-tab-bar/index.wxss | 7 + miniprogram/pages/enterprise/index.js | 22 +- miniprogram/pages/index/camera.js | 28 +- miniprogram/pages/index/index.js | 39 +- miniprogram/pages/index/upload.js | 6 +- miniprogram/pages/profile/index.js | 13 +- miniprogram/pages/profile/index.wxml | 31 +- miniprogram/pages/profile/index.wxss | 78 +- 31 files changed, 2058 insertions(+), 2008 deletions(-) diff --git a/admin/src/components/UserDetailDialog.vue b/admin/src/components/UserDetailDialog.vue index 688f78d..78bea9d 100644 --- a/admin/src/components/UserDetailDialog.vue +++ b/admin/src/components/UserDetailDialog.vue @@ -14,12 +14,7 @@
-
+
- - {{ reviewMode.enabled ? '审核模式已开启' : '审核模式已关闭' }} + + {{ systemConfig.maintenanceMode ? '审核模式已开启' : '审核模式已关闭' }}
-

{{ reviewMode.enabled ? '当前小程序处于审核状态,AI面相分析功能已隐藏' : '当前小程序正常运行,所有功能可用' }}

+

{{ systemConfig.maintenanceMode ? '当前小程序处于审核状态,AI面相分析功能已隐藏' : '当前小程序正常运行,所有功能可用' }}

@@ -68,7 +68,7 @@

开启后小程序将执行以下变更:

@@ -116,12 +116,12 @@ - {{ reviewMode.enabled ? '保存并开启审核模式' : '保存并关闭审核模式' }} + {{ systemConfig.maintenanceMode ? '保存并开启审核模式' : '保存并关闭审核模式' }}
@@ -560,11 +560,6 @@ watch( () => applyRouteTab() ) -// 审核模式 -const reviewMode = reactive({ - enabled: false -}) - // 系统配置 const systemConfig = reactive({ siteName: '神仙团队AI性格测试', @@ -616,13 +611,10 @@ const loadSettings = async () => { const response: any = await request.get('/superadmin/settings') if (response.code === 200 && response.data) { - // 加载审核模式 - if (response.data.reviewMode) { - Object.assign(reviewMode, response.data.reviewMode) - } - // 加载系统配置 + // 系统配置(含 maintenanceMode:审核模式唯一存储字段) if (response.data.system) { Object.assign(systemConfig, response.data.system) + systemConfig.maintenanceMode = !!systemConfig.maintenanceMode const de = response.data.system.defaultEnterpriseId systemConfig.defaultEnterpriseId = de != null && de !== '' && Number(de) > 0 ? Number(de) : null @@ -687,11 +679,11 @@ const handleSave = async (section: string) => { switch (section) { case 'review': - response = await request.put('/superadmin/settings/review-mode', { - enabled: reviewMode.enabled + response = await request.put('/superadmin/settings/system', { + maintenanceMode: !!systemConfig.maintenanceMode }) if (response.code === 200) { - ElMessage.success(reviewMode.enabled ? '审核模式已开启,小程序将隐藏AI功能' : '审核模式已关闭,AI功能已恢复') + ElMessage.success(systemConfig.maintenanceMode ? '审核模式已开启,小程序将隐藏AI功能' : '审核模式已关闭,AI功能已恢复') saveSuccess.value = section setTimeout(() => { saveSuccess.value = null }, 3000) } diff --git a/admin/src/views/superadmin/Users.vue b/admin/src/views/superadmin/Users.vue index c3b3088..8dffb2b 100644 --- a/admin/src/views/superadmin/Users.vue +++ b/admin/src/views/superadmin/Users.vue @@ -102,16 +102,19 @@