fix(develop): 移除用户 微信|极光 推送消息
Showing
14 changed files
with
14 additions
and
372 deletions
| ... | @@ -97,7 +97,7 @@ protected function getFileType(string $url): string | ... | @@ -97,7 +97,7 @@ protected function getFileType(string $url): string |
| 97 | public function envelope(): Envelope | 97 | public function envelope(): Envelope |
| 98 | { | 98 | { |
| 99 | return new Envelope( | 99 | return new Envelope( |
| 100 | subject: '【海星试唱】《' . $this->getActivityName() . '》- 物料资源', | 100 | subject: '【泡泡留声】《' . $this->getActivityName() . '》- 物料资源', |
| 101 | ); | 101 | ); |
| 102 | } | 102 | } |
| 103 | 103 | ... | ... |
| ... | @@ -3,8 +3,6 @@ | ... | @@ -3,8 +3,6 @@ |
| 3 | namespace App\Notifications; | 3 | namespace App\Notifications; |
| 4 | 4 | ||
| 5 | use App\Models\Activity; | 5 | use App\Models\Activity; |
| 6 | use App\Models\User; | ||
| 7 | use Carbon\Carbon; | ||
| 8 | use Illuminate\Bus\Queueable; | 6 | use Illuminate\Bus\Queueable; |
| 9 | use Illuminate\Contracts\Queue\ShouldQueue; | 7 | use Illuminate\Contracts\Queue\ShouldQueue; |
| 10 | use Illuminate\Notifications\Notification; | 8 | use Illuminate\Notifications\Notification; |
| ... | @@ -44,45 +42,7 @@ public function __construct(Activity $activity, string $msg) | ... | @@ -44,45 +42,7 @@ public function __construct(Activity $activity, string $msg) |
| 44 | */ | 42 | */ |
| 45 | public function via(mixed $notifiable): array | 43 | public function via(mixed $notifiable): array |
| 46 | { | 44 | { |
| 47 | return ['wechat', 'jPush']; | 45 | return []; |
| 48 | } | 46 | } |
| 49 | 47 | ||
| 50 | /** | ||
| 51 | * Get the mail representation of the notification. | ||
| 52 | * | ||
| 53 | * @param \App\Models\User $notifiable | ||
| 54 | * @return array<string,string> | ||
| 55 | */ | ||
| 56 | public function toJPush(User $notifiable): array | ||
| 57 | { | ||
| 58 | return [ | ||
| 59 | 'user' => $notifiable->getKey(), | ||
| 60 | 'title' => '《' . $this->activity->getAttribute('song_name') . '》未通过审核', | ||
| 61 | 'content' => trim($this->msg) | ||
| 62 | ]; | ||
| 63 | } | ||
| 64 | |||
| 65 | /** | ||
| 66 | * Get the array representation of the notification. | ||
| 67 | * | ||
| 68 | * @param \App\Models\User $notifiable | ||
| 69 | * @return array<string,string> | ||
| 70 | */ | ||
| 71 | public function toWechat(User $notifiable): array | ||
| 72 | { | ||
| 73 | $songName = $this->activity->getAttribute('song_name'); | ||
| 74 | $project = $this->activity->getAttribute('project'); | ||
| 75 | |||
| 76 | return [ | ||
| 77 | 'openId' => $notifiable->getWechatNotificationKey(), | ||
| 78 | 'template' => 'KAaWdyUbceiAg4ThqIt4LqOFMse85hsPOIpH3pldQsg', | ||
| 79 | 'data' => [ | ||
| 80 | 'first' => '您的试唱活动上架申请未通过!', | ||
| 81 | 'keyword1' => '平台运营', | ||
| 82 | 'keyword2' => $project ? sprintf('#%s#《%s》', $project->name, $songName) : sprintf('《%s》', $songName), | ||
| 83 | 'keyword3' => Carbon::now()->format('Y/m/d'), | ||
| 84 | 'remark' => trim($this->msg) | ||
| 85 | ] | ||
| 86 | ]; | ||
| 87 | } | ||
| 88 | } | 48 | } | ... | ... |
| ... | @@ -37,41 +37,6 @@ public function __construct(Activity $activity) | ... | @@ -37,41 +37,6 @@ public function __construct(Activity $activity) |
| 37 | */ | 37 | */ |
| 38 | public function via(mixed $notifiable): array | 38 | public function via(mixed $notifiable): array |
| 39 | { | 39 | { |
| 40 | return ['wechat', 'jPush']; | 40 | return []; |
| 41 | } | ||
| 42 | |||
| 43 | /** | ||
| 44 | * @param \App\Models\User $notifiable | ||
| 45 | * @return array<string,string> | ||
| 46 | */ | ||
| 47 | public function toJPush(User $notifiable): array | ||
| 48 | { | ||
| 49 | return [ | ||
| 50 | 'user' => $notifiable->getKey(), | ||
| 51 | 'title' => '《' . $this->activity->getAttribute('song_name') . '》', | ||
| 52 | 'content' => '已通过审核,正在为您安排上架~' | ||
| 53 | ]; | ||
| 54 | } | ||
| 55 | |||
| 56 | /** | ||
| 57 | * @param \App\Models\User $notifiable | ||
| 58 | * @return array<string,string> | ||
| 59 | */ | ||
| 60 | public function toWechat(User $notifiable): array | ||
| 61 | { | ||
| 62 | $songName = $this->activity->getAttribute('song_name'); | ||
| 63 | $project = $this->activity->getAttribute('project'); | ||
| 64 | |||
| 65 | return [ | ||
| 66 | 'openId' => $notifiable->getWechatNotificationKey(), | ||
| 67 | 'template' => 'KAaWdyUbceiAg4ThqIt4LqOFMse85hsPOIpH3pldQsg', | ||
| 68 | 'data' => [ | ||
| 69 | 'first' => '您的试唱活动上架申请已通过!', | ||
| 70 | 'keyword1' => '平台运营', | ||
| 71 | 'keyword2' => $project ? sprintf('#%s#《%s》', $project->name, $songName) : sprintf('《%s》', $songName), | ||
| 72 | 'keyword3' => Carbon::now()->format('Y/m/d'), | ||
| 73 | 'remark' => '正在为您安排上架~' | ||
| 74 | ] | ||
| 75 | ]; | ||
| 76 | } | 41 | } |
| 77 | } | 42 | } | ... | ... |
| ... | @@ -31,39 +31,6 @@ public function __construct(ActivityWork $work) | ... | @@ -31,39 +31,6 @@ public function __construct(ActivityWork $work) |
| 31 | */ | 31 | */ |
| 32 | public function via(): array | 32 | public function via(): array |
| 33 | { | 33 | { |
| 34 | return ['wechat', 'jPush']; | 34 | return []; |
| 35 | } | ||
| 36 | |||
| 37 | /** | ||
| 38 | * @param \App\Models\User $notifiable | ||
| 39 | * @return array | ||
| 40 | */ | ||
| 41 | public function toJPush(User $notifiable): array | ||
| 42 | { | ||
| 43 | return [ | ||
| 44 | 'user' => $notifiable->getKey(), | ||
| 45 | 'title' => '您的歌手成功达成合作', | ||
| 46 | 'content' => sprintf("您的歌手%s参与试唱活动《%s》达成合作", $this->work->getAttribute('user_nick_name'), $this->work->getAttribute('activity_name')), | ||
| 47 | 'data' => ['type' => 'ToComplete', 'value' => $this->work->getAttribute('user_id')] | ||
| 48 | ]; | ||
| 49 | } | ||
| 50 | |||
| 51 | /** | ||
| 52 | * @param \App\Models\User $notifiable | ||
| 53 | * @return array | ||
| 54 | */ | ||
| 55 | public function toWechat(User $notifiable): array | ||
| 56 | { | ||
| 57 | return [ | ||
| 58 | 'openId' => $notifiable->getWechatNotificationKey(), | ||
| 59 | 'template' => '-qM3dii-zb8nnvPunYDFyPmNptnKzdkgiWRH4-nK8vA', | ||
| 60 | 'page' => 'packageMy/pages/myMember/detail?id=' . $this->work->getAttribute('activity_id'), | ||
| 61 | 'data' => [ | ||
| 62 | 'first' => '恭喜,您的歌手成功达成合作', | ||
| 63 | 'keyword1' => $this->work->getUserFullName(), | ||
| 64 | 'keyword2' => '参与试唱《' . $this->work->getAttribute('activity_name') . '》达成合作', | ||
| 65 | 'remark' => '点击查看 >' | ||
| 66 | ] | ||
| 67 | ]; | ||
| 68 | } | 35 | } |
| 69 | } | 36 | } | ... | ... |
| ... | @@ -32,39 +32,6 @@ public function __construct(ActivityWork $work) | ... | @@ -32,39 +32,6 @@ public function __construct(ActivityWork $work) |
| 32 | */ | 32 | */ |
| 33 | public function via(): array | 33 | public function via(): array |
| 34 | { | 34 | { |
| 35 | return ['wechat', 'jPush']; | 35 | return []; |
| 36 | } | ||
| 37 | |||
| 38 | /** | ||
| 39 | * @param \App\Models\User $notifiable | ||
| 40 | * @return array | ||
| 41 | */ | ||
| 42 | public function toJPush(User $notifiable): array | ||
| 43 | { | ||
| 44 | return [ | ||
| 45 | 'user' => $notifiable->getKey(), | ||
| 46 | 'title' => '您的歌手试唱未选中', | ||
| 47 | 'content' => sprintf("您的歌手%s参与试唱活动《%s》未达成合作", $this->work->getAttribute('user_nick_name'), $this->work->getAttribute('activity_name')), | ||
| 48 | 'data' => ['type' => 'ToComplete', 'value' => $this->work->getAttribute('user_id')] | ||
| 49 | ]; | ||
| 50 | } | ||
| 51 | |||
| 52 | /** | ||
| 53 | * @param \App\Models\User $notifiable | ||
| 54 | * @return array | ||
| 55 | */ | ||
| 56 | public function toWechat(User $notifiable): array | ||
| 57 | { | ||
| 58 | return [ | ||
| 59 | 'openId' => $notifiable->getWechatNotificationKey(), | ||
| 60 | 'template' => '-qM3dii-zb8nnvPunYDFyPmNptnKzdkgiWRH4-nK8vA', | ||
| 61 | 'page' => 'packageMy/pages/myMember/detail?id=' . $this->work->getAttribute('activity_id'), | ||
| 62 | 'data' => [ | ||
| 63 | 'first' => '您的歌手提交的试唱未被采纳', | ||
| 64 | 'keyword1' => $this->work->getUserFullName(), | ||
| 65 | 'keyword2' => '参与试唱《' . $this->work->getAttribute('activity_name') . '》未达成合作', | ||
| 66 | 'remark' => '感谢参与,期待下次合作' | ||
| 67 | ] | ||
| 68 | ]; | ||
| 69 | } | 36 | } |
| 70 | } | 37 | } | ... | ... |
| ... | @@ -31,7 +31,7 @@ public function __construct(ActivityWork $work) | ... | @@ -31,7 +31,7 @@ public function __construct(ActivityWork $work) |
| 31 | */ | 31 | */ |
| 32 | public function via(): array | 32 | public function via(): array |
| 33 | { | 33 | { |
| 34 | return ['sms', 'jPush']; | 34 | return ['sms']; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | /** | 37 | /** |
| ... | @@ -52,18 +52,4 @@ public function toSms(User $notifiable): array | ... | @@ -52,18 +52,4 @@ public function toSms(User $notifiable): array |
| 52 | ] | 52 | ] |
| 53 | ]; | 53 | ]; |
| 54 | } | 54 | } |
| 55 | |||
| 56 | /** | ||
| 57 | * @param \App\Models\User $notifiable | ||
| 58 | * @return array | ||
| 59 | */ | ||
| 60 | public function toJPush(User $notifiable): array | ||
| 61 | { | ||
| 62 | return [ | ||
| 63 | 'user' => $notifiable->getKey(), | ||
| 64 | 'title' => '《' . $this->work->getAttribute('activity_name') . '》试唱结果通知', | ||
| 65 | 'content' => '恭喜,您参与的试唱已达成合作!', | ||
| 66 | 'data' => ['type' => 'ToMysing', 'value' => $this->work->getAttribute('activity_id')] | ||
| 67 | ]; | ||
| 68 | } | ||
| 69 | } | 55 | } | ... | ... |
| ... | @@ -32,7 +32,7 @@ public function __construct(ActivityWork $work) | ... | @@ -32,7 +32,7 @@ public function __construct(ActivityWork $work) |
| 32 | */ | 32 | */ |
| 33 | public function via(): array | 33 | public function via(): array |
| 34 | { | 34 | { |
| 35 | return ['sms', 'jPush']; | 35 | return ['sms']; |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | /** | 38 | /** |
| ... | @@ -50,18 +50,4 @@ public function toSms(User $notifiable): array | ... | @@ -50,18 +50,4 @@ public function toSms(User $notifiable): array |
| 50 | ] | 50 | ] |
| 51 | ]; | 51 | ]; |
| 52 | } | 52 | } |
| 53 | |||
| 54 | /** | ||
| 55 | * @param \App\Models\User $notifiable | ||
| 56 | * @return array | ||
| 57 | */ | ||
| 58 | public function toJPush(User $notifiable): array | ||
| 59 | { | ||
| 60 | return [ | ||
| 61 | 'user' => $notifiable->getKey(), | ||
| 62 | 'title' => '《' . $this->work->getAttribute('activity_name') . '》试唱结果通知', | ||
| 63 | 'content' => '感谢您参与的试唱,很遗憾暂未能成合作。', | ||
| 64 | 'data' => ['type' => 'ToMysing', 'value' => $this->work->getAttribute('activity_id')] | ||
| 65 | ]; | ||
| 66 | } | ||
| 67 | } | 53 | } | ... | ... |
| ... | @@ -45,7 +45,7 @@ public function __construct(Activity $activity, User $operator, string $msg = '' | ... | @@ -45,7 +45,7 @@ public function __construct(Activity $activity, User $operator, string $msg = '' |
| 45 | */ | 45 | */ |
| 46 | public function via(mixed $notifiable): array | 46 | public function via(mixed $notifiable): array |
| 47 | { | 47 | { |
| 48 | return ['wechat', 'jPush']; | 48 | return []; |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | 51 | ||
| ... | @@ -61,41 +61,4 @@ private function hasProject(): bool | ... | @@ -61,41 +61,4 @@ private function hasProject(): bool |
| 61 | { | 61 | { |
| 62 | return !empty($this->getProjectName()); | 62 | return !empty($this->getProjectName()); |
| 63 | } | 63 | } |
| 64 | |||
| 65 | /** | ||
| 66 | * Get the mail representation of the notification. | ||
| 67 | * | ||
| 68 | * @param mixed $notifiable | ||
| 69 | * @return \Illuminate\Notifications\Messages\MailMessage | ||
| 70 | */ | ||
| 71 | public function toJPush(User $notifiable): array | ||
| 72 | { | ||
| 73 | return [ | ||
| 74 | 'user' => $notifiable->getKey(), | ||
| 75 | 'title' => sprintf('《%s》已下架', $this->activity->getAttribute('song_name')), | ||
| 76 | 'content' => $this->msg | ||
| 77 | ]; | ||
| 78 | } | ||
| 79 | |||
| 80 | /** | ||
| 81 | * Get the array representation of the notification. | ||
| 82 | * | ||
| 83 | * @param mixed $notifiable | ||
| 84 | * @return array | ||
| 85 | */ | ||
| 86 | public function toWechat(User $notifiable): array | ||
| 87 | { | ||
| 88 | return [ | ||
| 89 | 'openId' => $notifiable->getWechatNotificationKey(), | ||
| 90 | 'template' => 'WBZT-2STQZXOC5ED5a_vS5XHS1KiTmtSeEMapXEqMpg', | ||
| 91 | 'data' => [ | ||
| 92 | 'first' => $this->hasProject() ? sprintf('[%s]试唱歌曲已下架', $this->getProjectName()) : '试唱歌曲已下架', | ||
| 93 | 'keyword1' => sprintf('《%s》', $this->activity->getAttribute('song_name')), | ||
| 94 | 'keyword2' => $this->operator->getFullName(), | ||
| 95 | 'keyword3' => Carbon::now()->toDateTimeString(), | ||
| 96 | 'keyword4' => $this->msg, | ||
| 97 | 'remark' => '' | ||
| 98 | ] | ||
| 99 | ]; | ||
| 100 | } | ||
| 101 | } | 64 | } | ... | ... |
| ... | @@ -40,7 +40,7 @@ public function __construct(Activity $activity, User $operator) | ... | @@ -40,7 +40,7 @@ public function __construct(Activity $activity, User $operator) |
| 40 | */ | 40 | */ |
| 41 | public function via(mixed $notifiable): array | 41 | public function via(mixed $notifiable): array |
| 42 | { | 42 | { |
| 43 | return ['wechat', 'jPush']; | 43 | return []; |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | private function getProjectName(): string | 46 | private function getProjectName(): string |
| ... | @@ -55,39 +55,4 @@ private function hasProject(): bool | ... | @@ -55,39 +55,4 @@ private function hasProject(): bool |
| 55 | { | 55 | { |
| 56 | return !empty($this->getProjectName()); | 56 | return !empty($this->getProjectName()); |
| 57 | } | 57 | } |
| 58 | |||
| 59 | /** | ||
| 60 | * Get the mail representation of the notification. | ||
| 61 | * | ||
| 62 | * @param mixed $notifiable | ||
| 63 | * @return \Illuminate\Notifications\Messages\MailMessage | ||
| 64 | */ | ||
| 65 | public function toJPush(User $notifiable): array | ||
| 66 | { | ||
| 67 | return [ | ||
| 68 | 'user' => $notifiable->getKey(), | ||
| 69 | 'title' => sprintf('《%s》已发行', $this->activity->getAttribute('song_name')), | ||
| 70 | 'content' => '填写歌曲发行链接,状态变更为已发行' | ||
| 71 | ]; | ||
| 72 | } | ||
| 73 | |||
| 74 | /** | ||
| 75 | * Get the array representation of the notification. | ||
| 76 | * | ||
| 77 | * @param mixed $notifiable | ||
| 78 | * @return array | ||
| 79 | */ | ||
| 80 | public function toWechat(User $notifiable): array | ||
| 81 | { | ||
| 82 | return [ | ||
| 83 | 'openId' => $notifiable->getWechatNotificationKey(), | ||
| 84 | 'template' => 'v0wGK-Z7r0RIm8P5D586X8MJxKNv-UkzvcS-7vJ2G7s', | ||
| 85 | 'data' => [ | ||
| 86 | 'first' => sprintf('《%s》已发行', $this->activity->getAttribute('song_name')), | ||
| 87 | 'keyword1' => $this->hasProject() ? $this->getProjectName() : '无', | ||
| 88 | 'keyword2' => Carbon::now()->toDateTimeString(), | ||
| 89 | 'remark' => sprintf('%s 填写歌曲发行链接,状态变更为已发行', $this->operator->getFullName()) | ||
| 90 | ] | ||
| 91 | ]; | ||
| 92 | } | ||
| 93 | } | 58 | } | ... | ... |
| ... | @@ -33,7 +33,7 @@ public function __construct(Activity $activity, User $operator) | ... | @@ -33,7 +33,7 @@ public function __construct(Activity $activity, User $operator) |
| 33 | 33 | ||
| 34 | public function via(mixed $notifiable): array | 34 | public function via(mixed $notifiable): array |
| 35 | { | 35 | { |
| 36 | return ['wechat', 'jPush']; | 36 | return []; |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | private function getProjectName(): string | 39 | private function getProjectName(): string |
| ... | @@ -48,30 +48,4 @@ private function hasProject(): bool | ... | @@ -48,30 +48,4 @@ private function hasProject(): bool |
| 48 | { | 48 | { |
| 49 | return !empty($this->getProjectName()); | 49 | return !empty($this->getProjectName()); |
| 50 | } | 50 | } |
| 51 | |||
| 52 | public function toJPush(User $notifiable): array | ||
| 53 | { | ||
| 54 | return [ | ||
| 55 | 'user' => $notifiable->getKey(), | ||
| 56 | 'title' => sprintf('《%s》重新上架', $this->activity->getAttribute('song_name')), | ||
| 57 | 'content' => '重新上架(自动通过,无需审批)', | ||
| 58 | 'data' => ['type' => 'ToActivity', 'value' => $this->activity->getKey()] | ||
| 59 | ]; | ||
| 60 | } | ||
| 61 | |||
| 62 | public function toWechat(User $notifiable): array | ||
| 63 | { | ||
| 64 | return [ | ||
| 65 | 'openId' => $notifiable->getWechatNotificationKey(), | ||
| 66 | 'template' => 'o9i6qtgr4ghtGvU-piimB9_mAaSOAXDDMzqx9zXYkss', | ||
| 67 | 'data' => [ | ||
| 68 | 'first' => $this->hasProject() ? sprintf('[%s]试唱歌曲重新上架', $this->getProjectName()) : '试唱歌曲重新上架', | ||
| 69 | 'keyword1' => sprintf('《%s》', $this->activity->getAttribute('song_name')), | ||
| 70 | 'keyword2' => $this->operator->getFullName(), | ||
| 71 | 'keyword3' => Carbon::now()->toDateTimeString(), | ||
| 72 | 'keyword4' => '试唱歌曲重新上架(自动通过,无需审批)', | ||
| 73 | 'remark' => '' | ||
| 74 | ] | ||
| 75 | ]; | ||
| 76 | } | ||
| 77 | } | 51 | } | ... | ... |
| ... | @@ -51,7 +51,7 @@ public function __construct(Activity $activity, User $operator, array $change = | ... | @@ -51,7 +51,7 @@ public function __construct(Activity $activity, User $operator, array $change = |
| 51 | */ | 51 | */ |
| 52 | public function via(mixed $notifiable): array | 52 | public function via(mixed $notifiable): array |
| 53 | { | 53 | { |
| 54 | return ['wechat', 'jPush']; | 54 | return []; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | /** | 57 | /** |
| ... | @@ -61,42 +61,4 @@ protected function formatChangeLabel(): string | ... | @@ -61,42 +61,4 @@ protected function formatChangeLabel(): string |
| 61 | { | 61 | { |
| 62 | return collect($this->change)->map(fn($item) => sprintf('[%s]', $item))->join('、'); | 62 | return collect($this->change)->map(fn($item) => sprintf('[%s]', $item))->join('、'); |
| 63 | } | 63 | } |
| 64 | |||
| 65 | /** | ||
| 66 | * @param \App\Models\User $notifiable | ||
| 67 | * @return array<string,string> | ||
| 68 | */ | ||
| 69 | public function toJPush(User $notifiable): array | ||
| 70 | { | ||
| 71 | $format = $this->formatChangeLabel(); | ||
| 72 | |||
| 73 | return [ | ||
| 74 | 'user' => $notifiable->getKey(), | ||
| 75 | 'title' => '《' . $this->activity->getAttribute('song_name') . '》信息被修改', | ||
| 76 | 'content' => sprintf('%s %s', $this->operator->getFullName(), empty($format) ? '' : '修改了:' . $format) | ||
| 77 | ]; | ||
| 78 | } | ||
| 79 | |||
| 80 | /** | ||
| 81 | * @param \App\Models\User $notifiable | ||
| 82 | * @return array<string,string> | ||
| 83 | */ | ||
| 84 | public function toWechat(User $notifiable): array | ||
| 85 | { | ||
| 86 | $songName = $this->activity->getAttribute('song_name'); | ||
| 87 | $project = $this->activity->getAttribute('project'); | ||
| 88 | $format = $this->formatChangeLabel(); | ||
| 89 | |||
| 90 | return [ | ||
| 91 | 'openId' => $notifiable->getWechatNotificationKey(), | ||
| 92 | 'template' => 'v0wGK-Z7r0RIm8P5D586X8MJxKNv-UkzvcS-7vJ2G7s', | ||
| 93 | 'data' => [ | ||
| 94 | 'first' => sprintf('%s 修改了试唱歌曲《%s》', $this->operator->getFullName(), $songName), | ||
| 95 | 'keyword1' => $project ? $project->name : '无', | ||
| 96 | 'keyword2' => Carbon::now()->toDateTimeString(), | ||
| 97 | 'remark' => sprintf('用户修改的信息 %s', empty($format) ? '' : '包含:' . $format) | ||
| 98 | ], | ||
| 99 | 'page' => 'pages/index/index?previewId=' . $this->activity->getKey() | ||
| 100 | ]; | ||
| 101 | } | ||
| 102 | } | 64 | } | ... | ... |
| ... | @@ -34,31 +34,6 @@ public function __construct(UserCertify $userCertify) | ... | @@ -34,31 +34,6 @@ public function __construct(UserCertify $userCertify) |
| 34 | */ | 34 | */ |
| 35 | public function via(): array | 35 | public function via(): array |
| 36 | { | 36 | { |
| 37 | return ['wechat', 'jPush']; | 37 | return []; |
| 38 | } | ||
| 39 | |||
| 40 | |||
| 41 | public function toJPush(User $notifiable): array | ||
| 42 | { | ||
| 43 | return [ | ||
| 44 | 'user' => $notifiable->getKey(), | ||
| 45 | 'title' => $this->applyUser->getAttribute('nick_name') . '提交了认证申请', | ||
| 46 | 'content' => '点击查看详情', | ||
| 47 | 'data' => ['type' => 'userAuth', 'value' => ''] | ||
| 48 | ]; | ||
| 49 | } | ||
| 50 | |||
| 51 | public function toWechat(User $notifiable): array | ||
| 52 | { | ||
| 53 | return [ | ||
| 54 | 'openId' => $notifiable->getAttribute('official_id'), | ||
| 55 | 'template' => 'DWu2Opezt2ricor_x38tq-PWna8k26ehJbhRbNwua4c', | ||
| 56 | 'data' => [ | ||
| 57 | 'keyword1' => $this->applyUser->getAttribute('nick_name'), | ||
| 58 | 'keyword2' => (string)$this->userCertify->getAttribute('created_at'), | ||
| 59 | 'keyword3' => '无', | ||
| 60 | ], | ||
| 61 | "page" => '/packageLogin/pages/applyList' | ||
| 62 | ]; | ||
| 63 | } | 38 | } |
| 64 | } | 39 | } | ... | ... |
| ... | @@ -29,21 +29,7 @@ public function __construct() | ... | @@ -29,21 +29,7 @@ public function __construct() |
| 29 | */ | 29 | */ |
| 30 | public function via(): array | 30 | public function via(): array |
| 31 | { | 31 | { |
| 32 | return ['sms', 'jPush']; | 32 | return ['sms']; |
| 33 | } | ||
| 34 | |||
| 35 | /** | ||
| 36 | * @param \App\Models\User $notifiable | ||
| 37 | * @return array | ||
| 38 | */ | ||
| 39 | public function toJPush(User $notifiable): array | ||
| 40 | { | ||
| 41 | return [ | ||
| 42 | 'user' => $notifiable->getKey(), | ||
| 43 | 'title' => '认证申请未通过', | ||
| 44 | 'content' => '点击查看详情', | ||
| 45 | 'data' => ['type' => 'OpenApp', 'value' => ''] | ||
| 46 | ]; | ||
| 47 | } | 33 | } |
| 48 | 34 | ||
| 49 | /** | 35 | /** | ... | ... |
| ... | @@ -29,21 +29,7 @@ public function __construct() | ... | @@ -29,21 +29,7 @@ public function __construct() |
| 29 | */ | 29 | */ |
| 30 | public function via(): array | 30 | public function via(): array |
| 31 | { | 31 | { |
| 32 | return ['sms', 'jPush']; | 32 | return ['sms']; |
| 33 | } | ||
| 34 | |||
| 35 | /** | ||
| 36 | * @param \App\Models\User $notifiable | ||
| 37 | * @return array | ||
| 38 | */ | ||
| 39 | public function toJPush(User $notifiable): array | ||
| 40 | { | ||
| 41 | return [ | ||
| 42 | 'user' => $notifiable->getKey(), | ||
| 43 | 'title' => '认证申请已经通过', | ||
| 44 | 'content' => '点击前往海星试唱挑选歌曲', | ||
| 45 | 'data' => ['type' => 'OpenApp', 'value' => ''] | ||
| 46 | ]; | ||
| 47 | } | 33 | } |
| 48 | 34 | ||
| 49 | /** | 35 | /** | ... | ... |
-
Please register or sign in to post a comment