| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- namespace shop\controllers;
- use Yii;
- use GatewayClient\Gateway;
- class MainController extends BaseController
- {
-
- public function actionDemo()
- {
- return $this->renderPartial('demo');
- }
-
-
- public function actionIndex()
- {
- return $this->renderPartial('index');
- }
-
- //新客户 shish 2019.12.29
- public function actionVisit()
- {
- $data = json_encode(array(
- 'type' => 'msg',
- 'msg' => 'aaaa',
- ));
-
- $id = 'merchantConsole_' . $this->merchantId;
- $online = Gateway::getClientIdByUid($id);
- if ($online) {
- //直接发送
- Gateway::sendToUid($id, json_encode($data));
- } else {
- //保存
- }
- }
-
- //新订单 shish 2019.12.29
- public function actionOrder()
- {
- $data = json_encode(array(
- 'type' => 'msg',
- 'msg' => 'aaaa',
- ));
-
- $id = 'merchantConsole_' . $this->merchantId;
- $online = Gateway::getClientIdByUid($id);
- if ($online) {
- //直接发送
- Gateway::sendToUid($id, json_encode($data));
- } else {
- //保存
- }
- }
-
- }
|