|
@@ -14,12 +14,12 @@ class WxPush
|
|
|
*
|
|
|
* @return mixed
|
|
|
*/
|
|
|
- public function __construct()
|
|
|
- {
|
|
|
- $this->appid = env('WECHAT.APPID');
|
|
|
- $this->appsecret = env('WECHAT.APPSECRET');
|
|
|
- $this->wechat = new \Wechat(['appid' => $this->appid, 'appsecret' => $this->appsecret]);
|
|
|
- }
|
|
|
+// public function __construct()
|
|
|
+// {
|
|
|
+// $this->appid = env('WECHAT.APPID');
|
|
|
+// $this->appsecret = env('WECHAT.APPSECRET');
|
|
|
+// $this->wechat = new \Wechat(['appid' => $this->appid, 'appsecret' => $this->appsecret]);
|
|
|
+// }
|
|
|
public function handle($event)
|
|
|
{
|
|
|
if($event==null)return;
|
|
@@ -35,7 +35,7 @@ class WxPush
|
|
|
'code'=>$data['actCode'],
|
|
|
'belong'=>1,
|
|
|
'openId'=>'oOpc26OhvWzdO0JlL9Q37rXyu69I',
|
|
|
- 'template_id'=>'oUFsqOfVNgavlzQKs9bT1as1miFNJ5-Q-h68eFiiQ0Q',
|
|
|
+ 'template_id'=>'oUFsgOfVNqavIzQKS9bT1as1miFNJ5-Q-h68eFiiQ0Q',
|
|
|
'template_name'=>'系统单据处理通知',
|
|
|
'action_name'=>'泰行销活动审批推送',
|
|
|
'template_data'=>['thing8' => ['value' => '泰行销直播'],
|
|
@@ -47,6 +47,7 @@ class WxPush
|
|
|
'uid'=>106,
|
|
|
'uname'=>'魏莉',
|
|
|
];
|
|
|
+ Log::info("推送数据".json_encode($temps,JSON_UNESCAPED_UNICODE));
|
|
|
Cache::store('redis')->handler()->lPush('wxpush_queue',json_encode($temps));
|
|
|
}
|
|
|
}
|