shish 3 жил өмнө
parent
commit
5f5d00a764

+ 6 - 16
app-pt/controllers/WxController.php

@@ -123,12 +123,12 @@ class WxController extends PublicController
                 switch ($Event) {
                     //关注
                     case 'subscribe':
-                        $text = $this->replyTextContent("等您好久,终于等到您 /::)");
-                        $pc = new \WXBizMsgCrypt($openToken, $encodingAesKey, $openAppId);
-                        $encryptMsg = '';
 
-                        noticeUtil::push('关注者openId ' . $this->fromUsername, '15280215347');
+                        noticeUtil::push('花掌柜 关注者openId ' . $this->fromUsername, '15280215347');
 
+                        $text = $this->replyTextContent($this->fromUsername);
+                        $pc = new \WXBizMsgCrypt($openToken, $encodingAesKey, $openAppId);
+                        $encryptMsg = '';
                         $pc->encryptMsg($text, $timestamp, $nonce, $encryptMsg);//加密
                         echo $encryptMsg;
                         break;
@@ -176,15 +176,9 @@ class WxController extends PublicController
                     //关注
                     case 'subscribe':
 
-                        noticeUtil::push('关注者openId ' . $this->fromUsername, '15280215347');
-
-//                        $text = $this->replyTextContent("等您好久,终于等到您 /::)");
-//                        $pc = new \WXBizMsgCrypt($openToken, $encodingAesKey, $openAppId);
-//                        $encryptMsg = '';
-//                        $pc->encryptMsg($text, $timestamp, $nonce, $encryptMsg);//加密
-//                        echo $encryptMsg;
+                        noticeUtil::push('销花宝 关注者openId ' . $this->fromUsername, '15280215347');
 
-                        $text = $this->replyTextContent("您的微信ID: \n {$this->fromUsername}");
+                        $text = $this->replyTextContent("{$this->fromUsername}");
                         $pc = new \WXBizMsgCrypt($openToken, $encodingAesKey, $openAppId);
                         $encryptMsg = '';
                         $pc->encryptMsg($text, $timestamp, $nonce, $encryptMsg);//加密
@@ -234,10 +228,6 @@ class WxController extends PublicController
                 switch ($Event) {
                     //关注
                     case 'subscribe':
-                        //$getUserInfo = wxUtil::userInfo($this->fromUsername, $merchant, $isOpen);
-                        //$source = UserClass::$userSourceId['official']['name'];
-                        //$getUserInfo['subscribe'] = 1;
-                        //UserService::replaceUser($getUserInfo, $source, 0);
                         $text = $this->replyTextContent("等您好久,终于等到您 /::)");
                         $pc = new \WXBizMsgCrypt($openToken, $encodingAesKey, $openAppId);
                         $encryptMsg = '';