更新若干功能

This commit is contained in:
2026-08-19 08:16:49 +08:00
parent 4979bb83d2
commit 72bc6502eb
56 changed files with 3627 additions and 343 deletions

View File

@@ -89,6 +89,19 @@ class WxAppService
];
}
/**
* 当前品牌是否启用套餐。只读开关列,不解密密钥,主题和下发列表都能安全调用。
*/
public function packageEnabled(): bool
{
$code = $this->currentCode();
$query = WxAppModel::where('deleted_at', 0)->where('status', 0);
$app = $code !== ''
? (clone $query)->where('code', $code)->first(['package_enabled'])
: $query->first(['package_enabled']);
return (int) ($app['package_enabled'] ?? 0) === 1;
}
/**
* 当前请求声明的品牌标识
*