更新细节
This commit is contained in:
parent
8f325973bf
commit
d53a005bdd
@ -19,7 +19,6 @@ class JgPush
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->client = new Client('b5f679f4357018605ea6fd2e', 'c4fb573758f8d7058d697c54');
|
$this->client = new Client('b5f679f4357018605ea6fd2e', 'c4fb573758f8d7058d697c54');
|
||||||
// $this->client = new Client('8a5efd65cda14fafa6e64ad3', 'daebe19b547c43128796a078');
|
|
||||||
$this->push = $this->client->push();
|
$this->push = $this->client->push();
|
||||||
$this->setPlatform();
|
$this->setPlatform();
|
||||||
}
|
}
|
||||||
@ -43,7 +42,7 @@ class JgPush
|
|||||||
$msg = $order['pay_type'] == StoreGroupOrder::PAY_TYPE_CREDIT_BUY ? '您有新的订单已结算,请注意查看。' : '您有新的订单,请注意查看。';
|
$msg = $order['pay_type'] == StoreGroupOrder::PAY_TYPE_CREDIT_BUY ? '您有新的订单已结算,请注意查看。' : '您有新的订单,请注意查看。';
|
||||||
$msgType = $order['pay_type'] == StoreGroupOrder::PAY_TYPE_CREDIT_BUY ? 'ORDER_SETTLEMENT' : 'ORDER_CREATE';
|
$msgType = $order['pay_type'] == StoreGroupOrder::PAY_TYPE_CREDIT_BUY ? 'ORDER_SETTLEMENT' : 'ORDER_CREATE';
|
||||||
$this->addRegistrationId($jgRegisterId);
|
$this->addRegistrationId($jgRegisterId);
|
||||||
// $this->androidNotification($msg, ['extras' => ['route' => $route, 'type' => $msgType]]);
|
$this->androidNotification($msg, ['extras' => ['route' => $route, 'type' => $msgType]]);
|
||||||
$this->iosNotification($msg, ['extras' => ['route' => $route, 'type' => $msgType]]);
|
$this->iosNotification($msg, ['extras' => ['route' => $route, 'type' => $msgType]]);
|
||||||
$this->push->send();
|
$this->push->send();
|
||||||
unset($this->client, $this->push);
|
unset($this->client, $this->push);
|
||||||
|
@ -47,6 +47,7 @@ use think\facade\Db;
|
|||||||
use think\facade\Log;
|
use think\facade\Log;
|
||||||
use think\facade\Queue;
|
use think\facade\Queue;
|
||||||
use crmeb\jobs\SendSmsJob;
|
use crmeb\jobs\SendSmsJob;
|
||||||
|
use app\common\service\JgPush;
|
||||||
use crmeb\jobs\TestJob;
|
use crmeb\jobs\TestJob;
|
||||||
use crmeb\services\PayService;
|
use crmeb\services\PayService;
|
||||||
use crmeb\services\CombinePayService;
|
use crmeb\services\CombinePayService;
|
||||||
@ -64,22 +65,19 @@ class Auth extends BaseController
|
|||||||
{
|
{
|
||||||
public function dotest()
|
public function dotest()
|
||||||
{
|
{
|
||||||
$repository = app()->make(StoreOrderRepository::class);
|
$data = [
|
||||||
$param = [
|
"tempId" => "ADMIN_PAY_SUCCESS_CODE",
|
||||||
"status" => 0,
|
"id" => 113
|
||||||
"is_del" => 0,
|
|
||||||
"mer_id" => 1,
|
|
||||||
"pay_type" => 1,
|
|
||||||
"attach" => "margin",
|
|
||||||
"order_info" => '{"is_margin":1,"margin":"0.01"}',
|
|
||||||
"pay_price" => 0.01,
|
|
||||||
"order_sn" => "bzj" . date('YmdHis') . uniqid(),
|
|
||||||
"body" =>'哈哈哈',
|
|
||||||
];
|
];
|
||||||
$payType = 'weixinApp';
|
try {
|
||||||
$service = new PayService($payType, $param);
|
/** @var JgPush $client */
|
||||||
$payInfo = $service->pay(User::where(['uid'=>1])->find());
|
$client = app()->make(JgPush::class);
|
||||||
return app('json')->success([]);
|
Log::info('JgPush送发送数据:' . json_encode($data));
|
||||||
|
$client->send($data['tempId'], $data);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Log::info('JgPush推送消息发送失败' . json_encode($data) . ' - ' . $e->getMessage());
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test()
|
public function test()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user