shish 6 years ago
parent
commit
0add5bb528
1 changed files with 7 additions and 6 deletions
  1. 7 6
      app/www/controllers/WxController.php

+ 7 - 6
app/www/controllers/WxController.php

@@ -152,14 +152,14 @@ class WxController extends PublicController
 					if ($merchant['merchantName'] == '花卉宝') {
 						$text = $this->replyTextContent("等您好久,终于等到您 /::)");
 					}
-
+					
 					//响应扫码的场景事件 shish 2019.9.5
 					if (strstr($EventKey, 'qrscene_')) {
 						Yii::info($EventKey);
 						$sceneId = str_replace('qrscene_', '', $EventKey);
 						WxSceneService::respondScanEvent($merchant, $user, (string)$sceneId);
 					}
-
+					
 					$pc = new \WXBizMsgCrypt($openToken, $encodingAesKey, $openAppId);
 					$encryptMsg = '';
 					$pc->encryptMsg($text, $timestamp, $nonce, $encryptMsg);//加密
@@ -291,7 +291,8 @@ class WxController extends PublicController
 			if ($adminSendMsg == false) {
 				$lastTimeKey = "customer_{$userId}:merchant_{$merchantId}_new_msg_last_time";//最后一次会话时间key
 				//将消息内容转发到管理员微信上
-				$admin = xhAdminToMerchantService::getAdminByMerchantId($merchantId);
+				//$admin = xhAdminToMerchantService::getAdminByMerchantId($merchantId);
+				$admin = [];
 				if (!empty($admin)) {
 					$adminOpenId = $admin['openId'];
 					$adminId = $admin['id'];
@@ -390,13 +391,13 @@ class WxController extends PublicController
 				//刮刮卡
 				if ($Content == '我要花') {
 					$id = GuaGuaService::getNewestId();//取最新的活动id
-					$text = $this->replyTextContent("会员日抽奖链接:".Yii::$app->params['mobileUrl']."/gua/index?account={$merchantId}&id=" . $id);//没有管理员返回的信息
+					$text = $this->replyTextContent("会员日抽奖链接:" . Yii::$app->params['mobileUrl'] . "/gua/index?account={$merchantId}&id=" . $id);//没有管理员返回的信息
 				} else {
 					$text = $this->replyTextContent("^_^");//没有管理员返回的信息
 				}
-
+				
 				$text = $this->replyTextContent('<a data-miniprogram-appid="wx3a163add860e0a86" data-miniprogram-path="pages/page/redirect?redirect_url=pages/getGuest/shareIndex" href="">中装建材大师</a>');//没有管理员返回的信息
-
+				
 				$pc = new \WXBizMsgCrypt($openToken, $encodingAesKey, $openAppId);
 				$encryptMsg = '';
 				$pc->encryptMsg($text, $timestamp, $nonce, $encryptMsg);//加密