45 lines
1.1 KiB
PHP
45 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use App\Models\Withdraw as WithdrawModel;
|
|
|
|
class WithdrawCompleted extends BaseNotification
|
|
{
|
|
|
|
protected static $title = '提现审核';
|
|
|
|
protected $user;
|
|
|
|
protected $withdraw;
|
|
|
|
public static function title()
|
|
{
|
|
return self::$title;
|
|
}
|
|
|
|
public function __construct(WithdrawModel $withdraw)
|
|
{
|
|
$this->withdraw = $withdraw;
|
|
}
|
|
|
|
public function toWechat($notifiable)
|
|
{
|
|
$app = app('wechat.official_account');
|
|
if ($notifiable->openid) {
|
|
$str = '恭喜您已经成功提现,请检查您的账户余额!!' . "\r\n\r\n";
|
|
$str .= '提现金额:' . number_format($this->withdraw->amount, 2) . "\r\n";
|
|
$str .= '实际到账金额:' . number_format($this->withdraw->take, 2) . "\r\n\r\n";
|
|
$str .= "<a href='" . route('withdraw.index') . "'>点击查看详情</a>";
|
|
$app->customer_service->message($str)->to($notifiable->openid)->send();
|
|
}
|
|
}
|
|
|
|
public function toArray($notifiable)
|
|
{
|
|
return [
|
|
//
|
|
];
|
|
}
|
|
}
|