|
|
@@ -38,7 +38,7 @@ use wkhtmltox\Image\Converter;
|
|
|
class TestController extends BaseController
|
|
|
{
|
|
|
|
|
|
- public $guestAccess = ['fx', 'on', 'in', 'clear-query', 'ip', 'html', 'debt', 'apply', 'clear', 'ls-trade-query', 'ls-trade-refund', 'refund-query', 'inform', 'notice', 'order-query', 'add-order', 'index', 'get', 'trade-query', 'query', 'balance-query', 'refund', 'recharge-query', 'sim', 'push'];
|
|
|
+ public $guestAccess = ['fx', 'on', 'in', 'clear-query', 'ip', 'html', 'debt', 'apply', 'clear', 'ls-trade-query', 'ls-trade-refund', 'refund-query', 'inform', 'notice', 'order-query', 'add-order', 'index', 'get', 'trade-query', 'query', 'balance-query', 'refund', 'recharge-query', 'sim', 'push', 'code'];
|
|
|
|
|
|
public function actionFx()
|
|
|
{
|
|
|
@@ -208,6 +208,16 @@ class TestController extends BaseController
|
|
|
die;
|
|
|
}
|
|
|
|
|
|
+ public function actionCode()
|
|
|
+ {
|
|
|
+ $merchant = WxOpenClass::getGhsWxInfo();
|
|
|
+ $page = 'admin/book/index';
|
|
|
+ $ptStyle = dict::getDict('ptStyle', 'ghs');
|
|
|
+ $scene = '';
|
|
|
+ $imgUrl = miniUtil::generateUnlimitedMiniCode($merchant, $page, $scene, $ptStyle);
|
|
|
+ echo $imgUrl;
|
|
|
+ }
|
|
|
+
|
|
|
public function actionIp()
|
|
|
{
|
|
|
$ip = $_SERVER['SERVER_ADDR'] ?? '';
|
|
|
@@ -1370,18 +1380,18 @@ class TestController extends BaseController
|
|
|
|
|
|
public function actionPush()
|
|
|
{
|
|
|
- $push = new \common\components\push('ghs');
|
|
|
+ $push = new \common\components\push('ghs');
|
|
|
|
|
|
$cids = ['2539a06dde18170d61f235dd40253d36', '3a424d2fcce148fbe38f2dea569e8228', '08fd2c3c72a5da46d2274aaa05c321e3', '9a5f7a63e290bf28f35d0691484e0721'];
|
|
|
$title = '新订单';
|
|
|
- $content = '您有新的订单,请查看 order_id: '. random_int(100000, 999999);
|
|
|
+ $content = '您有新的订单,请查看 order_id: ' . random_int(100000, 999999);
|
|
|
$payload = [
|
|
|
"page" => "pagesClient/member/detail",
|
|
|
"params" => ["id" => 682]
|
|
|
];
|
|
|
- $rs = $push->pushByCloud($cids, $title, $content, $payload);
|
|
|
- Yii::info(json_encode($rs));
|
|
|
+ $rs = $push->pushByCloud($cids, $title, $content, $payload);
|
|
|
+ Yii::info(json_encode($rs));
|
|
|
|
|
|
- echo json_encode($rs);
|
|
|
+ echo json_encode($rs);
|
|
|
}
|
|
|
}
|