소스 검색

Merge branch 'master' into debt

shish 1 년 전
부모
커밋
a68cff01b1
4개의 변경된 파일14개의 추가작업 그리고 10개의 파일을 삭제
  1. 8 0
      app-ghs/controllers/TestController.php
  2. 0 2
      app-hd/controllers/MainController.php
  3. 4 4
      biz-ghs/order/classes/OrderClass.php
  4. 2 4
      common/components/miniUtil.php

+ 8 - 0
app-ghs/controllers/TestController.php

@@ -77,6 +77,14 @@ class TestController extends BaseController
 
     public function actionOn()
     {
+
+        $merchant = WxOpenClass::getMallWxInfo();
+        $ptStyle = dict::getDict('ptStyle', 'mall');
+
+        $ret = miniUtil::generateShortLink($merchant, 'pages/home/recent','',$ptStyle);
+        print_r($ret);
+
+        util::stop();
         $merchant = WxOpenClass::getGhsWxInfo();
         $ptStyle = dict::getDict('ptStyle', 'ghs');
         if (getenv('YII_ENV') == 'production') {

+ 0 - 2
app-hd/controllers/MainController.php

@@ -45,8 +45,6 @@ class MainController extends BaseController
         $scene = 'a=' . $this->shopAdminId . '&s=' . $this->shopId;
         $goodsImgUrl = miniUtil::generateUnlimitedMiniCode($merchant, $goodsPage, $scene, $ptStyle);
 
-        //miniUtil::generateShortLink($merchant, $ptStyle,'pages/home/recent','花美林');
-
         $flowerPage = 'pages/item/item';
         $flowerImgUrl = miniUtil::generateUnlimitedMiniCode($merchant, $flowerPage, $scene, $ptStyle);
 

+ 4 - 4
biz-ghs/order/classes/OrderClass.php

@@ -2921,10 +2921,10 @@ XL;
             if ($num > 1) {
                 $customName = $customName . ' ' . $num . '单';
             }
-            $content = '<TEXT x="430" y="30" font="12" w="4" h="4" r="90">' . $shortName . '</TEXT>';
-            $content .= '<TEXT x="300" y="30" font="12" w="2" h="3" r="90">' . $customName . '</TEXT>';
-            $content .= '<TEXT x="190" y="10" font="12" w="1" h="2" r="90">' . $fullAddress . '</TEXT>';
-            $content .= '<TEXT x="120" y="10" font="12" w="2" h="2" r="90">' . $customMobile . '</TEXT>';
+            $content = '<TEXT x="405" y="30" font="12" w="4" h="4" r="90">' . $shortName . '</TEXT>';
+            $content .= '<TEXT x="285" y="30" font="12" w="2" h="3" r="90">' . $customName . '</TEXT>';
+            $content .= '<TEXT x="190" y="30" font="12" w="1" h="2" r="90">' . $fullAddress . '</TEXT>';
+            $content .= '<TEXT x="120" y="30" font="12" w="2" h="2" r="90">' . $customMobile . '</TEXT>';
             /**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
         }
         $p->printLabelMsg($content);

+ 2 - 4
common/components/miniUtil.php

@@ -1560,7 +1560,7 @@ class miniUtil
         return $behind . $fileName;
     }
 
-    public static function generateShortLink($merchant, $ptStyle = 0, $pageUrl, $pageTitle)
+    public static function generateShortLink($merchant, $pageUrl, $pageTitle, $ptStyle)
     {
         $accessToken = self::getMiniProgramAccessToken($merchant, $ptStyle);
         $url = "https://api.weixin.qq.com/wxa/genwxashortlink?access_token={$accessToken}";
@@ -1572,9 +1572,7 @@ class miniUtil
         ];
         $result = $curl->setOption(CURLOPT_POSTFIELDS, Json::encode($data))->post($url);
         $result = Json::decode($result);
-        echo "<pre>";
-        print_r($result);
-        die;
+        return $result;
     }
 
     //小程序码生成,永久有效,数量暂无限制 ssh 2020.4.17