shish пре 3 година
родитељ
комит
736f1441f5
1 измењених фајлова са 14 додато и 1 уклоњено
  1. 14 1
      app-pt/controllers/WxController.php

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

@@ -178,11 +178,24 @@ class WxController extends PublicController
 
                         noticeUtil::push('关注者openId ' . $this->fromUsername, '15280215347');
 
-                        $text = $this->replyTextContent("等您好久,终于等到您 /::)");
+//                        $text = $this->replyTextContent("等您好久,终于等到您 /::)");
+//                        $pc = new \WXBizMsgCrypt($openToken, $encodingAesKey, $openAppId);
+//                        $encryptMsg = '';
+//                        $pc->encryptMsg($text, $timestamp, $nonce, $encryptMsg);//加密
+//                        echo $encryptMsg;
+
+                        $text = $this->replyTextContent("您的微信ID:");
+                        $pc = new \WXBizMsgCrypt($openToken, $encodingAesKey, $openAppId);
+                        $encryptMsg = '';
+                        $pc->encryptMsg($text, $timestamp, $nonce, $encryptMsg);//加密
+                        echo $encryptMsg;
+
+                        $text = $this->replyTextContent($this->fromUsername);
                         $pc = new \WXBizMsgCrypt($openToken, $encodingAesKey, $openAppId);
                         $encryptMsg = '';
                         $pc->encryptMsg($text, $timestamp, $nonce, $encryptMsg);//加密
                         echo $encryptMsg;
+
                         break;
                     //取消关注
                     case 'unsubscribe':