Files
MBTI_wang/api/app/common/service/MiniprogramAuditMode.php
卡若 ce55c48c64 feat: 同步今日小程序与后台迭代版本
集中提交今日 API、管理端、小程序与部署文档调整,确保 Gitea 主分支与本地最新开发版本一致。

Made-with: Cursor
2026-04-20 11:07:55 +08:00

29 lines
866 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app\common\service;
use think\facade\Db;
/**
* 小程序「提审模式」:
* - 隐藏神仙 AI 对话等深度合成能力;
* - 关闭虚拟商品/付费解锁与「了解自己」深度套餐展示(应对 iOS 虚拟支付类审核意见)。
* 配置存储system_config.key = system 的 JSON 内 miniprogramAuditMode = true
*/
class MiniprogramAuditMode
{
public static function isOn(): bool
{
try {
$row = Db::name('system_config')->where('key', 'system')->find();
if (!$row || empty($row['value'])) {
return false;
}
$v = is_string($row['value']) ? json_decode($row['value'], true) : $row['value'];
return is_array($v) && !empty($v['miniprogramAuditMode']);
} catch (\Throwable $e) {
return false;
}
}
}