shish 5 years ago
parent
commit
e80068fa97
2 changed files with 1 additions and 2 deletions
  1. 0 1
      app-pt/controllers/WxController.php
  2. 1 1
      common/components/wxUtil.php

+ 0 - 1
app-pt/controllers/WxController.php

@@ -142,7 +142,6 @@ class WxController extends PublicController
             } elseif ($this->msgType == 'miniprogrampage') {
                 Yii::info('1243 ' . $this->fromUsername . ' ' . json_encode($merchant));
                 if ($postObj->PagePath == 'pagesClient/official/warn') {
-                    $content = '好的好的';
                     $r = wxUtil::sendMiniMsg('123456', $merchant, (string)trim($this->fromUsername), 1);
                     Yii::info('098' . ' ' . json_encode($r) . ' ' . $this->fromUsername . ' ' . json_encode($merchant));
                 }

+ 1 - 1
common/components/wxUtil.php

@@ -480,7 +480,7 @@ class wxUtil
     {
         $token = self::getAuthorizerAccessToken($merchant, $isOpen);
         $url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token={$token}";
-        $data = ['touser' => $openId, 'msgtype' => 'text', 'text' => ['content' => $content]];
+        $data = ['touser' => "owjM44wuUnytWRlNHrjIaxCenfRY", 'msgtype' => 'text', 'text' => ['content' => $content]];
         $curl = new curl\Curl();
         $result = $curl->setOption(CURLOPT_POSTFIELDS, Json::encode($data))->post($url);
         $result = Json::decode($result);