|
@@ -47,26 +47,26 @@ class WechatOfficialController extends HttpBaseController
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // public function index()
|
|
|
- // {
|
|
|
- // $this->app->server->push(function ($message) {
|
|
|
- // $msgType = $message['MsgType'];
|
|
|
+ public function index()
|
|
|
+ {
|
|
|
+ $this->app->server->push(function ($message) {
|
|
|
+ $msgType = $message['MsgType'];
|
|
|
|
|
|
- // if ($msgType == 'event') {
|
|
|
- // $event = $message['Event'];
|
|
|
- // return $this->msgEvent($event, $message);
|
|
|
+ if ($msgType == 'event') {
|
|
|
+ $event = $message['Event'];
|
|
|
+ return $this->msgEvent($event, $message);
|
|
|
|
|
|
- // } else {
|
|
|
- // return $this->msgtType($msgType, $message);
|
|
|
- // }
|
|
|
- // });
|
|
|
+ } else {
|
|
|
+ return $this->msgtType($msgType, $message);
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- // $response = $this->app->server->serve();
|
|
|
- // $response->send();
|
|
|
- // exit();
|
|
|
- // }
|
|
|
+ $response = $this->app->server->serve();
|
|
|
+ $response->send();
|
|
|
+ exit();
|
|
|
+ }
|
|
|
|
|
|
- public function index()
|
|
|
+ public function index2()
|
|
|
{
|
|
|
$this->app->server->push(function ($message) {
|
|
|
$msgType = $message['MsgType'];
|
|
@@ -250,7 +250,7 @@ class WechatOfficialController extends HttpBaseController
|
|
|
'image' => 'https://www.qasimblog.com/static/login.jpg',
|
|
|
]),
|
|
|
new NewsItem([
|
|
|
- 'title' => '点击确认登录',
|
|
|
+ 'title' => $oauthUrl,
|
|
|
'description' => '',
|
|
|
'url' => $oauthUrl,
|
|
|
'image' => 'https://www.qasimblog.com/static/logo.png',
|