12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- /**
- *
- * @file:BaseService.php
- * @Date: 2023/6/7
- * @Time: 14:28
- */
- 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' => "最新"],
- ];
- }
- protected static function throwErrMsg($msg, $code = "")
- {
- if ($code) {
- throw new FailedException($msg, $code);
- }
- throw new FailedException($msg);
- }
- /**
- * 微信公众号关键字类型
- * name: getWechatKeywordType
- * @return \string[][]
- * date 2023/07/05 16:34
- */
- public static function getWechatKeywordType(){
- return [
- ['value' => 'txt', 'name' => "纯文本"],
- ['value' => 'miniprogram', 'name' => "小程序"],
- ];
- }
- }
|