123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php
- namespace Modules\Common\Services;
- use Catch\Exceptions\FailedException;
- class BaseService
- {
- public static function getMiniProgramType()
- {
- return [
- ['value' => 1, 'name' => "微信小程序"],
- ['value' => 2, 'name' => "抖音小程序"],
- ];
- }
- public static function getNavPagesType()
- {
- return [
- ['value' => 1, 'name' => "排行榜"],
- ['value' => 2, 'name' => "最新"],
- ];
- }
- public static function throwErrMsg($msg, $code = "")
- {
- if ($code) {
- throw new FailedException($msg, $code);
- }
- throw new FailedException($msg);
- }
-
- public static function getWechatKeywordType(){
- return [
- ['value' => 'txt', 'name' => "纯文本"],
- ['value' => 'miniprogram', 'name' => "小程序"],
- ];
- }
-
- public static function getWechatMenuSystemType(): array
- {
- return [
- ['value' => 'android', 'name' => "安卓"],
- ['value' => 'ios', 'name' => "苹果"],
- ];
- }
- }
|