fix(develop): Init
Showing
20 changed files
with
1 additions
and
383 deletions
| ... | @@ -35,21 +35,8 @@ MAIL_ENCRYPTION=null | ... | @@ -35,21 +35,8 @@ MAIL_ENCRYPTION=null |
| 35 | MAIL_FROM_ADDRESS="hello@example.com" | 35 | MAIL_FROM_ADDRESS="hello@example.com" |
| 36 | MAIL_FROM_NAME="${APP_NAME}" | 36 | MAIL_FROM_NAME="${APP_NAME}" |
| 37 | 37 | ||
| 38 | JPUSH_KEY=860a3d4ecfaf3c38eb539c4e | ||
| 39 | JPUSH_SECRET=df208c0eb485ed3ab3b18ff2 | ||
| 40 | |||
| 41 | IM_KEY= | 38 | IM_KEY= |
| 42 | IM_SECRET= | 39 | IM_SECRET= |
| 43 | 40 | ||
| 44 | WECHAT_OFFICIAL_ACCOUNT_APPID= | ||
| 45 | WECHAT_OFFICIAL_ACCOUNT_SECRET= | ||
| 46 | WECHAT_OFFICIAL_ACCOUNT_TOKEN= | ||
| 47 | WECHAT_OFFICIAL_ACCOUNT_AES_KEY= | ||
| 48 | |||
| 49 | WECHAT_MINI_APP_APPID= | ||
| 50 | WECHAT_MINI_APP_SECRET= | ||
| 51 | WECHAT_MINI_APP_TOKEN= | ||
| 52 | WECHAT_MINI_APP_AES_KEY= | ||
| 53 | |||
| 54 | OCTANE_SERVER=swoole | 41 | OCTANE_SERVER=swoole |
| 55 | OCTANE_HTTPS=true | 42 | OCTANE_HTTPS=true | ... | ... |
| 1 | <?php | ||
| 2 | |||
| 3 | namespace App\Channels; | ||
| 4 | |||
| 5 | use App\Models\User; | ||
| 6 | use Illuminate\Notifications\Notification; | ||
| 7 | |||
| 8 | class JPushNotificationChannel | ||
| 9 | { | ||
| 10 | public function send(User $notifiable, Notification $notification): void | ||
| 11 | { | ||
| 12 | // @phpstan-ignore-next-line | ||
| 13 | $notification->toJPush($notifiable); | ||
| 14 | } | ||
| 15 | } |
| 1 | <?php | ||
| 2 | |||
| 3 | namespace App\Channels; | ||
| 4 | |||
| 5 | use App\Models\User; | ||
| 6 | use Illuminate\Notifications\Notification; | ||
| 7 | |||
| 8 | class WechatNotificationChannel | ||
| 9 | { | ||
| 10 | public function send(User $notifiable, Notification $notification): void | ||
| 11 | { | ||
| 12 | // @phpstan-ignore-next-line | ||
| 13 | $notification->toWechat($notifiable); | ||
| 14 | } | ||
| 15 | } |
| ... | @@ -6,8 +6,6 @@ | ... | @@ -6,8 +6,6 @@ |
| 6 | use App\Helpers\OperationLog; | 6 | use App\Helpers\OperationLog; |
| 7 | use App\Http\Container\AdminSection\Requests\User\CertifyUpdateRequest; | 7 | use App\Http\Container\AdminSection\Requests\User\CertifyUpdateRequest; |
| 8 | use App\Http\Service\UserService; | 8 | use App\Http\Service\UserService; |
| 9 | use App\Jobs\UserSingerLimitJob; | ||
| 10 | use App\Models\User; | ||
| 11 | use App\Models\UserCertify; | 9 | use App\Models\UserCertify; |
| 12 | use App\Models\Views\UserLastCertify; | 10 | use App\Models\Views\UserLastCertify; |
| 13 | use App\Notifications\UserCertifyFailNotification; | 11 | use App\Notifications\UserCertifyFailNotification; |
| ... | @@ -79,15 +77,6 @@ public function update(CertifyUpdateRequest $request, UserCertify $certify): Res | ... | @@ -79,15 +77,6 @@ public function update(CertifyUpdateRequest $request, UserCertify $certify): Res |
| 79 | }; | 77 | }; |
| 80 | } catch (SingerLimitException $exception) { | 78 | } catch (SingerLimitException $exception) { |
| 81 | DB::rollBack(); | 79 | DB::rollBack(); |
| 82 | $master = User::query()->find($exception->masterId, ['id', 'nick_name']); | ||
| 83 | UserSingerLimitJob::dispatch([ | ||
| 84 | 'title' => sprintf('%s:歌手额度已满', $master?->getAttribute('nick_name')), | ||
| 85 | 'content' => sprintf('审核歌手认证:%s', $user->getAttribute('nick_name')) | ||
| 86 | ], [ | ||
| 87 | 'title' => sprintf('%s:同意歌手加入', $master->getAttribute('nick_name')), | ||
| 88 | 'content' => sprintf('歌手:%s', $user->getAttribute('nick_name')), | ||
| 89 | 'limit' => $exception->maxSingerNum | ||
| 90 | ]); | ||
| 91 | return $this->fail(ApiCode::VALIDATION_ERROR, '团队内歌手名额已满'); | 80 | return $this->fail(ApiCode::VALIDATION_ERROR, '团队内歌手名额已满'); |
| 92 | 81 | ||
| 93 | } catch (RuntimeException $exception) { | 82 | } catch (RuntimeException $exception) { | ... | ... |
| ... | @@ -12,7 +12,6 @@ | ... | @@ -12,7 +12,6 @@ |
| 12 | use App\Http\Request\BooleanStatusRequest; | 12 | use App\Http\Request\BooleanStatusRequest; |
| 13 | use App\Http\Request\UserChangePwdRequest; | 13 | use App\Http\Request\UserChangePwdRequest; |
| 14 | use App\Http\Service\UserService; | 14 | use App\Http\Service\UserService; |
| 15 | use App\Jobs\UserSingerLimitJob; | ||
| 16 | use App\Jobs\UserSyncIMJob; | 15 | use App\Jobs\UserSyncIMJob; |
| 17 | use App\Models\Activity; | 16 | use App\Models\Activity; |
| 18 | use App\Models\GroupHasMember; | 17 | use App\Models\GroupHasMember; |
| ... | @@ -127,15 +126,6 @@ public function update(UserUpdateRequest $request, User $user): Response | ... | @@ -127,15 +126,6 @@ public function update(UserUpdateRequest $request, User $user): Response |
| 127 | return $this->successWithData($user->load(['authTags:id,name', 'roles:id,name', 'projects:id,name']), ApiCode::UPDATE_SUCCESS); | 126 | return $this->successWithData($user->load(['authTags:id,name', 'roles:id,name', 'projects:id,name']), ApiCode::UPDATE_SUCCESS); |
| 128 | } catch (SingerLimitException $exception) { | 127 | } catch (SingerLimitException $exception) { |
| 129 | DB::rollBack(); | 128 | DB::rollBack(); |
| 130 | $master = User::query()->find($exception->masterId, ['id', 'nick_name']); | ||
| 131 | UserSingerLimitJob::dispatch([ | ||
| 132 | 'title' => sprintf('%s:歌手额度已满', $master?->getAttribute('nick_name')), | ||
| 133 | 'content' => sprintf('编辑歌手信息:%s', $user->getAttribute('nick_name')) | ||
| 134 | ], [ | ||
| 135 | 'title' => sprintf('%s:编辑成员信息', $user->getAttribute('nick_name')), | ||
| 136 | 'content' => sprintf('经纪人:%s', $master->getAttribute('nick_name')), | ||
| 137 | 'limit' => $exception->maxSingerNum | ||
| 138 | ]); | ||
| 139 | return $this->fail(ApiCode::VALIDATION_ERROR, '团队内歌手名额已满'); | 129 | return $this->fail(ApiCode::VALIDATION_ERROR, '团队内歌手名额已满'); |
| 140 | } catch (RuntimeException $exception) { | 130 | } catch (RuntimeException $exception) { |
| 141 | DB::rollBack(); | 131 | DB::rollBack(); | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -12,7 +12,6 @@ | ... | @@ -12,7 +12,6 @@ |
| 12 | use App\Http\Service\GroupDataService; | 12 | use App\Http\Service\GroupDataService; |
| 13 | use App\Http\Service\GroupInviteService; | 13 | use App\Http\Service\GroupInviteService; |
| 14 | use App\Http\Service\UserService; | 14 | use App\Http\Service\UserService; |
| 15 | use App\Jobs\UserSingerLimitJob; | ||
| 16 | use App\Models\Activity; | 15 | use App\Models\Activity; |
| 17 | use App\Models\ActivityUser; | 16 | use App\Models\ActivityUser; |
| 18 | use App\Models\GroupHasMember; | 17 | use App\Models\GroupHasMember; |
| ... | @@ -190,15 +189,7 @@ public function gropuInvite(GroupInviteRequest $request) | ... | @@ -190,15 +189,7 @@ public function gropuInvite(GroupInviteRequest $request) |
| 190 | } | 189 | } |
| 191 | //判断歌手额度 | 190 | //判断歌手额度 |
| 192 | $maxSingerNum = User::query()->whereKey($invite_id)->value('business_singer_limit'); | 191 | $maxSingerNum = User::query()->whereKey($invite_id)->value('business_singer_limit'); |
| 193 | if ($is_singer_tag and $singer_tag_count >= $maxSingerNum) { | 192 | if ($is_singer_tag && $singer_tag_count >= $maxSingerNum) { |
| 194 | UserSingerLimitJob::dispatch([ | ||
| 195 | 'title' => $title1, | ||
| 196 | 'content' => $content1 | ||
| 197 | ], [ | ||
| 198 | 'title' => $title2, | ||
| 199 | 'content' => $content2, | ||
| 200 | 'limit' => $maxSingerNum | ||
| 201 | ]); | ||
| 202 | return JsonResource::fail(JsonResource::TEAM_INVITE_SINGER_LIMIT, code: 403); | 193 | return JsonResource::fail(JsonResource::TEAM_INVITE_SINGER_LIMIT, code: 403); |
| 203 | } | 194 | } |
| 204 | 195 | ||
| ... | @@ -295,14 +286,6 @@ public function handleInvite(HandleInviteRequest $request, GroupInviteService $g | ... | @@ -295,14 +286,6 @@ public function handleInvite(HandleInviteRequest $request, GroupInviteService $g |
| 295 | $maxSingerNum = User::query()->whereKey($invite_id)->value('business_singer_limit'); | 286 | $maxSingerNum = User::query()->whereKey($invite_id)->value('business_singer_limit'); |
| 296 | if ($is_singer_tag and $singer_tag_count >= $maxSingerNum) { | 287 | if ($is_singer_tag and $singer_tag_count >= $maxSingerNum) { |
| 297 | GroupInvite::query()->where(['invite_id' => $invite_id, 'user_id' => $member_id, 'type' => $type, 'status' => 1])->update(['status' => 4]); | 288 | GroupInvite::query()->where(['invite_id' => $invite_id, 'user_id' => $member_id, 'type' => $type, 'status' => 1])->update(['status' => 4]); |
| 298 | UserSingerLimitJob::dispatch([ | ||
| 299 | 'title' => $title1, | ||
| 300 | 'content' => $content1 | ||
| 301 | ], [ | ||
| 302 | 'title' => $title2, | ||
| 303 | 'content' => $content2, | ||
| 304 | 'limit' => $maxSingerNum | ||
| 305 | ]); | ||
| 306 | return JsonResource::fail(JsonResource::TEAM_JOIN_SINGER_LIMIT, code: 403); | 289 | return JsonResource::fail(JsonResource::TEAM_JOIN_SINGER_LIMIT, code: 403); |
| 307 | } | 290 | } |
| 308 | } | 291 | } | ... | ... |
| ... | @@ -11,7 +11,6 @@ | ... | @@ -11,7 +11,6 @@ |
| 11 | use App\Http\Container\AppSection\Requests\UserAuthExamineRequests; | 11 | use App\Http\Container\AppSection\Requests\UserAuthExamineRequests; |
| 12 | use App\Http\Service\UserService; | 12 | use App\Http\Service\UserService; |
| 13 | use App\Jobs\UserApplyCertifyJob; | 13 | use App\Jobs\UserApplyCertifyJob; |
| 14 | use App\Jobs\UserSingerLimitJob; | ||
| 15 | use App\Models\GroupHasMember; | 14 | use App\Models\GroupHasMember; |
| 16 | use App\Models\SystemTag; | 15 | use App\Models\SystemTag; |
| 17 | use App\Models\User; | 16 | use App\Models\User; |
| ... | @@ -53,15 +52,6 @@ public function story(UserAuthCreateRequest $request) | ... | @@ -53,15 +52,6 @@ public function story(UserAuthCreateRequest $request) |
| 53 | if ($masterId) { | 52 | if ($masterId) { |
| 54 | $maxSingerNum = User::query()->whereKey($masterId)->value('business_singer_limit'); | 53 | $maxSingerNum = User::query()->whereKey($masterId)->value('business_singer_limit'); |
| 55 | if ($is_singer_tag && $singer_tag_count >= $maxSingerNum) { | 54 | if ($is_singer_tag && $singer_tag_count >= $maxSingerNum) { |
| 56 | $master = User::query()->find($masterId, ['id', 'nick_name']); | ||
| 57 | UserSingerLimitJob::dispatch([ | ||
| 58 | 'title' => sprintf('%s:歌手额度已满', $master?->getAttribute('nick_name')), | ||
| 59 | 'content' => sprintf('%s:提交歌手认证', $user?->getAttribute('nick_name')) | ||
| 60 | ], [ | ||
| 61 | 'title' => sprintf('%s:提交歌手认证', $user?->getAttribute('nick_name')), | ||
| 62 | 'content' => sprintf('经纪人:%s', $master->getAttribute('nick_name')), | ||
| 63 | 'limit' => $maxSingerNum | ||
| 64 | ]); | ||
| 65 | return JsonResource::fail(JsonResource::TEAM_INVITE_SINGER_LIMIT, code: 403); | 55 | return JsonResource::fail(JsonResource::TEAM_INVITE_SINGER_LIMIT, code: 403); |
| 66 | } | 56 | } |
| 67 | } | 57 | } |
| ... | @@ -144,15 +134,6 @@ public function examine(UserAuthExamineRequests $request) | ... | @@ -144,15 +134,6 @@ public function examine(UserAuthExamineRequests $request) |
| 144 | return JsonResource::success(JsonResource::UPDATE_SUCCESS); | 134 | return JsonResource::success(JsonResource::UPDATE_SUCCESS); |
| 145 | } catch (SingerLimitException $exception) { | 135 | } catch (SingerLimitException $exception) { |
| 146 | DB::rollBack(); | 136 | DB::rollBack(); |
| 147 | $master = User::query()->find($exception->masterId, ['id', 'nick_name']); | ||
| 148 | UserSingerLimitJob::dispatch([ | ||
| 149 | 'title' => sprintf('%s:歌手额度已满', $master?->getAttribute('nick_name')), | ||
| 150 | 'content' => sprintf('审核歌手认证:%s', $user->getAttribute('nick_name')) | ||
| 151 | ], [ | ||
| 152 | 'title' => sprintf('%s:审核歌手认证', $user->getAttribute('nick_name')), | ||
| 153 | 'content' => sprintf('经纪人:%s', $master->getAttribute('nick_name')), | ||
| 154 | 'limit' => $exception->maxSingerNum | ||
| 155 | ]); | ||
| 156 | return JsonResource::fail(JsonResource::TEAM_INVITE_SINGER_LIMIT, code: 403); | 137 | return JsonResource::fail(JsonResource::TEAM_INVITE_SINGER_LIMIT, code: 403); |
| 157 | 138 | ||
| 158 | 139 | ... | ... |
app/Jobs/UserSingerLimitJob.php
deleted
100644 → 0
| 1 | <?php | ||
| 2 | |||
| 3 | namespace App\Jobs; | ||
| 4 | |||
| 5 | use App\Enums\UserOfficialStatusEnum; | ||
| 6 | use App\Models\SystemConfig; | ||
| 7 | use App\Models\User; | ||
| 8 | use Illuminate\Bus\Queueable; | ||
| 9 | use Illuminate\Contracts\Queue\ShouldQueue; | ||
| 10 | use Illuminate\Foundation\Bus\Dispatchable; | ||
| 11 | use Illuminate\Queue\InteractsWithQueue; | ||
| 12 | use Illuminate\Queue\SerializesModels; | ||
| 13 | use Illuminate\Support\Arr; | ||
| 14 | |||
| 15 | class UserSingerLimitJob implements ShouldQueue | ||
| 16 | { | ||
| 17 | use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; | ||
| 18 | |||
| 19 | public array $jPushMessage; | ||
| 20 | |||
| 21 | public array $wechatMessage; | ||
| 22 | |||
| 23 | public int $defaultLimit; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * Create a new job instance. | ||
| 27 | * | ||
| 28 | * @return void | ||
| 29 | */ | ||
| 30 | public function __construct(array $jPushMessage, array $wechatMessage) | ||
| 31 | { | ||
| 32 | $this->jPushMessage = $jPushMessage; | ||
| 33 | $this->wechatMessage = $wechatMessage; | ||
| 34 | $this->defaultLimit = SystemConfig::query()->where('identifier', 'svMC9TNFz2Acx8ccPdAIH')->value('content') ?? 3; | ||
| 35 | } | ||
| 36 | |||
| 37 | /** | ||
| 38 | * Execute the job. | ||
| 39 | * | ||
| 40 | * @return void | ||
| 41 | */ | ||
| 42 | public function handle(): void | ||
| 43 | { | ||
| 44 | |||
| 45 | } | ||
| 46 | } |
| ... | @@ -49,16 +49,4 @@ public function via(mixed $notifiable): array | ... | @@ -49,16 +49,4 @@ public function via(mixed $notifiable): array |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | 51 | ||
| 52 | private function getProjectName(): string | ||
| 53 | { | ||
| 54 | return Arr::get($this->activity, 'project.name', ''); | ||
| 55 | } | ||
| 56 | |||
| 57 | /** | ||
| 58 | * @return bool | ||
| 59 | */ | ||
| 60 | private function hasProject(): bool | ||
| 61 | { | ||
| 62 | return !empty($this->getProjectName()); | ||
| 63 | } | ||
| 64 | } | 52 | } | ... | ... |
| ... | @@ -42,17 +42,4 @@ public function via(mixed $notifiable): array | ... | @@ -42,17 +42,4 @@ public function via(mixed $notifiable): array |
| 42 | { | 42 | { |
| 43 | return []; | 43 | return []; |
| 44 | } | 44 | } |
| 45 | |||
| 46 | private function getProjectName(): string | ||
| 47 | { | ||
| 48 | return Arr::get($this->activity, 'project.name', ''); | ||
| 49 | } | ||
| 50 | |||
| 51 | /** | ||
| 52 | * @return bool | ||
| 53 | */ | ||
| 54 | private function hasProject(): bool | ||
| 55 | { | ||
| 56 | return !empty($this->getProjectName()); | ||
| 57 | } | ||
| 58 | } | 45 | } | ... | ... |
| ... | @@ -35,17 +35,4 @@ public function via(mixed $notifiable): array | ... | @@ -35,17 +35,4 @@ public function via(mixed $notifiable): array |
| 35 | { | 35 | { |
| 36 | return []; | 36 | return []; |
| 37 | } | 37 | } |
| 38 | |||
| 39 | private function getProjectName(): string | ||
| 40 | { | ||
| 41 | return Arr::get($this->activity, 'project.name', ''); | ||
| 42 | } | ||
| 43 | |||
| 44 | /** | ||
| 45 | * @return bool | ||
| 46 | */ | ||
| 47 | private function hasProject(): bool | ||
| 48 | { | ||
| 49 | return !empty($this->getProjectName()); | ||
| 50 | } | ||
| 51 | } | 38 | } | ... | ... |
| ... | @@ -53,12 +53,4 @@ public function via(mixed $notifiable): array | ... | @@ -53,12 +53,4 @@ public function via(mixed $notifiable): array |
| 53 | { | 53 | { |
| 54 | return []; | 54 | return []; |
| 55 | } | 55 | } |
| 56 | |||
| 57 | /** | ||
| 58 | * @return string | ||
| 59 | */ | ||
| 60 | protected function formatChangeLabel(): string | ||
| 61 | { | ||
| 62 | return collect($this->change)->map(fn($item) => sprintf('[%s]', $item))->join('、'); | ||
| 63 | } | ||
| 64 | } | 56 | } | ... | ... |
| ... | @@ -2,9 +2,7 @@ | ... | @@ -2,9 +2,7 @@ |
| 2 | 2 | ||
| 3 | namespace App\Providers; | 3 | namespace App\Providers; |
| 4 | 4 | ||
| 5 | use App\Channels\JPushNotificationChannel; | ||
| 6 | use App\Channels\SmsNotificationChannel; | 5 | use App\Channels\SmsNotificationChannel; |
| 7 | use App\Channels\WechatNotificationChannel; | ||
| 8 | use App\Support\Model; | 6 | use App\Support\Model; |
| 9 | use Illuminate\Database\Events\QueryExecuted; | 7 | use Illuminate\Database\Events\QueryExecuted; |
| 10 | use Illuminate\Support\Facades\DB; | 8 | use Illuminate\Support\Facades\DB; |
| ... | @@ -22,8 +20,6 @@ class AppServiceProvider extends ServiceProvider | ... | @@ -22,8 +20,6 @@ class AppServiceProvider extends ServiceProvider |
| 22 | */ | 20 | */ |
| 23 | public function register(): void | 21 | public function register(): void |
| 24 | { | 22 | { |
| 25 | Notification::extend('wechat', static fn() => new WechatNotificationChannel); | ||
| 26 | Notification::extend('jPush', static fn() => new JPushNotificationChannel); | ||
| 27 | Notification::extend('sms', static fn() => new SmsNotificationChannel); | 23 | Notification::extend('sms', static fn() => new SmsNotificationChannel); |
| 28 | 24 | ||
| 29 | if (!$this->app->isProduction()) { | 25 | if (!$this->app->isProduction()) { | ... | ... |
| ... | @@ -25,7 +25,6 @@ | ... | @@ -25,7 +25,6 @@ |
| 25 | "hikoon/laravel-api": "0.1.4.9", | 25 | "hikoon/laravel-api": "0.1.4.9", |
| 26 | "hikoon/laravel-jwt": "^0.1.3", | 26 | "hikoon/laravel-jwt": "^0.1.3", |
| 27 | "inertiajs/inertia-laravel": "^0.6.11", | 27 | "inertiajs/inertia-laravel": "^0.6.11", |
| 28 | "jpush/jpush": "^3.6", | ||
| 29 | "laravel/framework": "^9.52.4", | 28 | "laravel/framework": "^9.52.4", |
| 30 | "laravel/horizon": "^5.19", | 29 | "laravel/horizon": "^5.19", |
| 31 | "laravel/octane": "^1.3", | 30 | "laravel/octane": "^1.3", |
| ... | @@ -33,7 +32,6 @@ | ... | @@ -33,7 +32,6 @@ |
| 33 | "laravel/tinker": "^2.7", | 32 | "laravel/tinker": "^2.7", |
| 34 | "lorisleiva/laravel-actions": "^2.7", | 33 | "lorisleiva/laravel-actions": "^2.7", |
| 35 | "overtrue/laravel-easy-sms": "^2.1", | 34 | "overtrue/laravel-easy-sms": "^2.1", |
| 36 | "overtrue/laravel-wechat": "^7.1", | ||
| 37 | "pbmedia/laravel-ffmpeg": "^8.3", | 35 | "pbmedia/laravel-ffmpeg": "^8.3", |
| 38 | "tencent/tls-sig-api-v2": "^1.1", | 36 | "tencent/tls-sig-api-v2": "^1.1", |
| 39 | "torann/geoip": "^3.0", | 37 | "torann/geoip": "^3.0", | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -213,7 +213,6 @@ | ... | @@ -213,7 +213,6 @@ |
| 213 | */ | 213 | */ |
| 214 | 214 | ||
| 215 | 'aliases' => Facade::defaultAliases()->merge([ | 215 | 'aliases' => Facade::defaultAliases()->merge([ |
| 216 | 'EasyWeChat' => Overtrue\LaravelWeChat\EasyWeChat::class, | ||
| 217 | 'GeoIP' => \Torann\GeoIP\Facades\GeoIP::class, | 216 | 'GeoIP' => \Torann\GeoIP\Facades\GeoIP::class, |
| 218 | 217 | ||
| 219 | // 'ExampleClass' => App\Example\ExampleClass::class, | 218 | // 'ExampleClass' => App\Example\ExampleClass::class, | ... | ... |
config/easywechat.php
deleted
100644 → 0
| 1 | <?php | ||
| 2 | |||
| 3 | return [ | ||
| 4 | /* | ||
| 5 | * 默认配置,将会合并到各模块中 | ||
| 6 | */ | ||
| 7 | 'defaults' => [ | ||
| 8 | 'http' => [ | ||
| 9 | 'timeout' => 5.0, | ||
| 10 | ], | ||
| 11 | ], | ||
| 12 | |||
| 13 | /* | ||
| 14 | * 公众号 | ||
| 15 | */ | ||
| 16 | 'official_account' => [ | ||
| 17 | 'default' => [ | ||
| 18 | 'app_id' => env('WECHAT_OFFICIAL_ACCOUNT_APPID', ''), // AppID | ||
| 19 | 'secret' => env('WECHAT_OFFICIAL_ACCOUNT_SECRET', ''), // AppSecret | ||
| 20 | 'token' => env('WECHAT_OFFICIAL_ACCOUNT_TOKEN', ''), // Token | ||
| 21 | 'aes_key' => env('WECHAT_OFFICIAL_ACCOUNT_AES_KEY', ''), // EncodingAESKey | ||
| 22 | /* | ||
| 23 | * OAuth 配置 | ||
| 24 | * | ||
| 25 | * scopes:公众平台(snsapi_userinfo / snsapi_base),开放平台:snsapi_login | ||
| 26 | * callback:OAuth授权完成后的回调页地址(如果使用中间件,则随便填写。。。) | ||
| 27 | * enforce_https:是否强制使用 HTTPS 跳转 | ||
| 28 | */ | ||
| 29 | // 'oauth' => [ | ||
| 30 | // 'scopes' => array_map('trim', explode(',', env('WECHAT_OFFICIAL_ACCOUNT_OAUTH_SCOPES', 'snsapi_userinfo'))), | ||
| 31 | // 'callback' => env('WECHAT_OFFICIAL_ACCOUNT_OAUTH_CALLBACK', '/examples/oauth_callback.php'), | ||
| 32 | // 'enforce_https' => true, | ||
| 33 | // ], | ||
| 34 | |||
| 35 | /** | ||
| 36 | * 接口请求相关配置,超时时间等,具体可用参数请参考: | ||
| 37 | * https://github.com/symfony/symfony/blob/6.0/src/Symfony/Contracts/HttpClient/HttpClientInterface.php#L26 | ||
| 38 | */ | ||
| 39 | 'http' => [ | ||
| 40 | 'timeout' => 5.0, | ||
| 41 | 'base_uri' => 'https://api.weixin.qq.com/', | ||
| 42 | ], | ||
| 43 | ], | ||
| 44 | ], | ||
| 45 | |||
| 46 | /* | ||
| 47 | * 开放平台第三方平台 | ||
| 48 | */ | ||
| 49 | // 'open_platform' => [ | ||
| 50 | // 'default' => [ | ||
| 51 | // 'app_id' => env('WECHAT_OPEN_PLATFORM_APPID', ''), | ||
| 52 | // 'secret' => env('WECHAT_OPEN_PLATFORM_SECRET', ''), | ||
| 53 | // 'token' => env('WECHAT_OPEN_PLATFORM_TOKEN', ''), | ||
| 54 | // 'aes_key' => env('WECHAT_OPEN_PLATFORM_AES_KEY', ''), | ||
| 55 | |||
| 56 | /** | ||
| 57 | * 接口请求相关配置,超时时间等,具体可用参数请参考: | ||
| 58 | * https://github.com/symfony/symfony/blob/6.0/src/Symfony/Contracts/HttpClient/HttpClientInterface.php#L26 | ||
| 59 | */ | ||
| 60 | // 'http' => [ | ||
| 61 | // 'timeout' => 5.0, | ||
| 62 | // // 如果你在国外想要覆盖默认的 url 的时候才使用,根据不同的模块配置不同的 uri | ||
| 63 | // 'base_uri' => 'https://api.weixin.qq.com/', | ||
| 64 | // ], | ||
| 65 | // ], | ||
| 66 | // ], | ||
| 67 | |||
| 68 | /* | ||
| 69 | * 小程序 | ||
| 70 | */ | ||
| 71 | 'mini_app' => [ | ||
| 72 | 'default' => [ | ||
| 73 | 'app_id' => env('WECHAT_MINI_APP_APPID', ''), | ||
| 74 | 'secret' => env('WECHAT_MINI_APP_SECRET', ''), | ||
| 75 | 'token' => env('WECHAT_MINI_APP_TOKEN', ''), | ||
| 76 | 'aes_key' => env('WECHAT_MINI_APP_AES_KEY', ''), | ||
| 77 | |||
| 78 | /** | ||
| 79 | * 接口请求相关配置,超时时间等,具体可用参数请参考: | ||
| 80 | * https://github.com/symfony/symfony/blob/6.0/src/Symfony/Contracts/HttpClient/HttpClientInterface.php#L26 | ||
| 81 | */ | ||
| 82 | 'http' => [ | ||
| 83 | 'timeout' => 5.0, | ||
| 84 | 'base_uri' => 'https://api.weixin.qq.com/', | ||
| 85 | ], | ||
| 86 | ], | ||
| 87 | ], | ||
| 88 | |||
| 89 | /* | ||
| 90 | * 微信支付 | ||
| 91 | */ | ||
| 92 | // 'pay' => [ | ||
| 93 | // 'default' => [ | ||
| 94 | // 'app_id' => env('WECHAT_PAY_APPID', ''), | ||
| 95 | // 'mch_id' => env('WECHAT_PAY_MCH_ID', 'your-mch-id'), | ||
| 96 | // 'private_key' => '/data/private/certs/apiclient_key.pem', | ||
| 97 | // 'certificate' => '/data/private/certs/apiclient_cert.pem', | ||
| 98 | // 'notify_url' => 'http://example.com/payments/wechat-notify', // 默认支付结果通知地址 | ||
| 99 | // /** | ||
| 100 | // * 证书序列号,可通过命令从证书获取: | ||
| 101 | // * `openssl x509 -in application_cert.pem -noout -serial` | ||
| 102 | // */ | ||
| 103 | // 'certificate_serial_no' => '6F2BADBE1738B07EE45C6A85C5F86EE343CAABC3', | ||
| 104 | // | ||
| 105 | // 'http' => [ | ||
| 106 | // 'base_uri' => 'https://api.mch.weixin.qq.com/', | ||
| 107 | // ], | ||
| 108 | // | ||
| 109 | // // v2 API 秘钥 | ||
| 110 | // //'v2_secret_key' => '26db3e15cfedb44abfbb5fe94fxxxxx', | ||
| 111 | // | ||
| 112 | // // v3 API 秘钥 | ||
| 113 | // //'secret_key' => '43A03299A3C3FED3D8CE7B820Fxxxxx', | ||
| 114 | // | ||
| 115 | // // 注意 此处为微信支付平台证书 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/wechatpay5_1.shtml | ||
| 116 | // 'platform_certs' => [ | ||
| 117 | // '/data/private/certs/platform_key.pem', | ||
| 118 | // ], | ||
| 119 | // ], | ||
| 120 | // ], | ||
| 121 | |||
| 122 | /* | ||
| 123 | * 企业微信 | ||
| 124 | */ | ||
| 125 | // 'work' => [ | ||
| 126 | // 'default' => [ | ||
| 127 | // 'corp_id' => env('WECHAT_WORK_CORP_ID', ''), | ||
| 128 | // 'secret' => env('WECHAT_WORK_SECRET', ''), | ||
| 129 | // 'token' => env('WECHAT_WORK_TOKEN', ''), | ||
| 130 | // 'aes_key' => env('WECHAT_WORK_AES_KEY', ''), | ||
| 131 | |||
| 132 | /** | ||
| 133 | * 接口请求相关配置,超时时间等,具体可用参数请参考: | ||
| 134 | * https://github.com/symfony/symfony/blob/6.0/src/Symfony/Contracts/HttpClient/HttpClientInterface.php#L26 | ||
| 135 | */ | ||
| 136 | // 'http' => [ | ||
| 137 | // 'timeout' => 5.0, | ||
| 138 | // // 如果你在国外想要覆盖默认的 url 的时候才使用,根据不同的模块配置不同的 uri | ||
| 139 | // 'base_uri' => 'https://api.weixin.qq.com/', | ||
| 140 | // ], | ||
| 141 | // ], | ||
| 142 | // ], | ||
| 143 | |||
| 144 | /* | ||
| 145 | * 企业微信开放平台 | ||
| 146 | */ | ||
| 147 | // 'open_work' => [ | ||
| 148 | // 'default' => [ | ||
| 149 | // 'corp_id' => env('WECHAT_OPEN_WORK_CORP_ID', ''), | ||
| 150 | // 'provider_secret' => env('WECHAT_OPEN_WORK_SECRET', ''), | ||
| 151 | // 'token' => env('WECHAT_OPEN_WORK_TOKEN', ''), | ||
| 152 | // 'aes_key' => env('WECHAT_OPEN_WORK_AES_KEY', ''), | ||
| 153 | |||
| 154 | /** | ||
| 155 | * 接口请求相关配置,超时时间等,具体可用参数请参考: | ||
| 156 | * https://github.com/symfony/symfony/blob/6.0/src/Symfony/Contracts/HttpClient/HttpClientInterface.php#L26 | ||
| 157 | */ | ||
| 158 | // 'http' => [ | ||
| 159 | // 'timeout' => 5.0, | ||
| 160 | // // 如果你在国外想要覆盖默认的 url 的时候才使用,根据不同的模块配置不同的 uri | ||
| 161 | // 'base_uri' => 'https://api.weixin.qq.com/', | ||
| 162 | // ], | ||
| 163 | // ], | ||
| 164 | // ], | ||
| 165 | ]; |
| ... | @@ -117,18 +117,6 @@ | ... | @@ -117,18 +117,6 @@ |
| 117 | 'emergency' => [ | 117 | 'emergency' => [ |
| 118 | 'path' => storage_path('logs/laravel.log'), | 118 | 'path' => storage_path('logs/laravel.log'), |
| 119 | ], | 119 | ], |
| 120 | 'wechat' => [ | ||
| 121 | 'driver' => 'daily', | ||
| 122 | 'path' => storage_path('logs/wechat.log'), | ||
| 123 | 'level' => env('LOG_LEVEL', 'debug'), | ||
| 124 | 'days' => 7, | ||
| 125 | ], | ||
| 126 | 'jpush' => [ | ||
| 127 | 'driver' => 'daily', | ||
| 128 | 'path' => storage_path('logs/jpush.log'), | ||
| 129 | 'level' => env('LOG_LEVEL', 'debug'), | ||
| 130 | 'days' => 7, | ||
| 131 | ], | ||
| 132 | 'im' => [ | 120 | 'im' => [ |
| 133 | 'driver' => 'daily', | 121 | 'driver' => 'daily', |
| 134 | 'path' => storage_path('logs/im.log'), | 122 | 'path' => storage_path('logs/im.log'), | ... | ... |
| ... | @@ -37,12 +37,6 @@ | ... | @@ -37,12 +37,6 @@ |
| 37 | 'secret' => env('IM_SECRET', ''), | 37 | 'secret' => env('IM_SECRET', ''), |
| 38 | 'prefix' => env('IM_PREFIX', ''), | 38 | 'prefix' => env('IM_PREFIX', ''), |
| 39 | ], | 39 | ], |
| 40 | 'jpush' => [ | ||
| 41 | 'key' => env('JPUSH_KEY', ''), | ||
| 42 | 'secret' => env('JPUSH_SECRET', ''), | ||
| 43 | 'apns_production' => env('JPUSH_APNS_PRODUCTION', false), | ||
| 44 | 'prefix' => env('JPUSH_PREFIX', '') | ||
| 45 | ], | ||
| 46 | 'easy-sms' => [ | 40 | 'easy-sms' => [ |
| 47 | 'timeout' => 5.0, | 41 | 'timeout' => 5.0, |
| 48 | 'default' => [ | 42 | 'default' => [ | ... | ... |
-
Please register or sign in to post a comment