|
@@ -149,23 +149,14 @@ class WxController extends PublicController
|
|
|
if ($merchant['merchantName'] == '花卉宝') {
|
|
if ($merchant['merchantName'] == '花卉宝') {
|
|
|
$text = $this->replyTextContent("等您好久,终于等到您 /::)");
|
|
$text = $this->replyTextContent("等您好久,终于等到您 /::)");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- if (isset($merchantExtend['giveCoupon']) && !empty($merchantExtend['giveCoupon'])) {//关注公众号,赠送代金劵
|
|
|
|
|
- if (empty($user['hasSubscribe'])) {//没有关注过公众号
|
|
|
|
|
- $giveCouponPrice = $merchantExtend['giveCouponPrice'];
|
|
|
|
|
- $couponMeetPrice = $merchantExtend['couponMeetPrice'];
|
|
|
|
|
- //xhCouponService::focusGiveCoupon($userId, $merchant, $merchantExtend);
|
|
|
|
|
- //$text = $this->replyTextContent("等您好久,终于等到您~\n\n恭喜您,获得一张<a href='" . Yii::$app->params['frontUrl'] . "/center/coupon?account={$merchant['id']}'>代金劵</a>,注册会员更多福利哦,<a href='" . Yii::$app->params['frontUrl'] . "/center/right?account={$merchant['id']}'>详情</a>");
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
//响应扫码的场景事件 shish 2019.9.5
|
|
//响应扫码的场景事件 shish 2019.9.5
|
|
|
if (strstr($EventKey, 'qrscene_')) {
|
|
if (strstr($EventKey, 'qrscene_')) {
|
|
|
Yii::info($EventKey);
|
|
Yii::info($EventKey);
|
|
|
$sceneId = str_replace('qrscene_', '', $EventKey);
|
|
$sceneId = str_replace('qrscene_', '', $EventKey);
|
|
|
WxSceneService::respondScanEvent($merchant, $user, (string)$sceneId);
|
|
WxSceneService::respondScanEvent($merchant, $user, (string)$sceneId);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$pc = new \WXBizMsgCrypt($openToken, $encodingAesKey, $openAppId);
|
|
$pc = new \WXBizMsgCrypt($openToken, $encodingAesKey, $openAppId);
|
|
|
$encryptMsg = '';
|
|
$encryptMsg = '';
|
|
|
$pc->encryptMsg($text, $timestamp, $nonce, $encryptMsg);//加密
|
|
$pc->encryptMsg($text, $timestamp, $nonce, $encryptMsg);//加密
|