更新若干功能
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前请求声明的品牌标识
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user