shish 3 éve
szülő
commit
05184acdcf

+ 16 - 1
app-hd/controllers/LjhController.php

@@ -5,6 +5,7 @@ namespace hd\controllers;
 use bizHd\ljh\classes\LjhApplyClass;
 use common\components\dict;
 use common\components\httpUtil;
+use common\components\miniUtil;
 use common\components\orderSn;
 use common\components\stringUtil;
 use bizHd\wx\classes\WxOpenClass;
@@ -14,7 +15,21 @@ use common\components\util;
 class LjhController extends BaseController
 {
 
-    public $guestAccess = ['apply', 'detail', 'wx-pay'];
+    public $guestAccess = ['apply', 'detail', 'wx-pay', 'mini-code'];
+
+    //小程序码 ssh 20230305
+    public function actionMiniCode()
+    {
+        $merchant = WxOpenClass::getWxInfo();
+        $page = 'admin/ljh/info';
+        $ptStyle = dict::getDict('ptStyle', 'hd');
+        $scene = "";
+        $imgUrl = miniUtil::generateUnlimitedMiniCode($merchant, $page, $scene, $ptStyle);
+        $apiHost = Yii::$app->params['hdImgHost'];
+        $url = $apiHost . $imgUrl;
+        echo $apiHost . ' ' . $url;
+        echo "<img src='" . $url . "' />";
+    }
 
     public function actionDetail()
     {

+ 1 - 15
app-pt/controllers/LjhController.php

@@ -12,7 +12,7 @@ use Yii;
 class LjhController extends BaseController
 {
 
-    public $guestAccess = ['list', 'mini-code'];
+    public $guestAccess = ['list'];
 
     //申请列表
     public function actionList()
@@ -50,18 +50,4 @@ class LjhController extends BaseController
         echo '<style>td,th{border:1px solid #CCCCCC;}</style>';
     }
 
-    //小程序码 ssh 20230305
-    public function actionMiniCode()
-    {
-        $merchant = WxOpenClass::getWxInfo();
-        $page = 'admin/ljh/info';
-        $ptStyle = dict::getDict('ptStyle', 'hd');
-        $scene = "";
-        $imgUrl = miniUtil::generateUnlimitedMiniCode($merchant, $page, $scene, $ptStyle);
-        $apiHost = Yii::$app->params['hdImgHost'];
-        $url = $apiHost .$imgUrl;
-        echo $apiHost.' '.$url;
-        echo "<img src='" . $url . "' />";
-    }
-
 }