Browse Source

订阅消息

shish 3 năm trước cách đây
mục cha
commit
d004cb64b5
2 tập tin đã thay đổi với 2 bổ sung3 xóa
  1. 1 2
      app-hd/controllers/MainController.php
  2. 1 1
      common/components/miniUtil.php

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

@@ -78,8 +78,7 @@ class MainController extends BaseController
         $ljh = $apiHost . $imgUrl;
         $respond['ljhUrl'] = $ljh;
 
-        $r = miniUtil::sendSubscribe($merchant, $ptStyle);
-        print_r($r);die;
+        //miniUtil::sendSubscribe($merchant, $ptStyle);
 
         util::success($respond);
     }

+ 1 - 1
common/components/miniUtil.php

@@ -1904,12 +1904,12 @@ class miniUtil
 
     /**************************即时配送相关接口 END *****************************************/
 
+    //订阅消息通知 ssh 2023511
     public static function sendSubscribe($merchant, $ptStyle = 0)
     {
         $accessToken = self::getMiniProgramAccessToken($merchant, $ptStyle);
         $url = 'https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=' . $accessToken;
         $curl = new curl\Curl();
-        //$msg = '{"date2": { "value": "2019-12-24 10:10:10" }, "thing1": { "value": "注意" },"phrase5": { "value": "成功" },"thing4": { "value": "点击查看详情" }}';
         $msg = [
             "date2" => ["value" => "2019-12-24 10:10:10"],
             "thing1" => ["value" => "注意"],