|
|
@@ -127,12 +127,14 @@ class WxController extends PublicController
|
|
|
$getUserInfo = wxUtil::userInfo($this->fromUsername, $merchant, 1);
|
|
|
$source = UserClass::$userSourceId['official']['name'];
|
|
|
$getUserInfo['subscribe'] = 1;
|
|
|
- AdminService::replaceAdmin($getUserInfo, $source);
|
|
|
+ $respond = AdminService::replaceAdmin($getUserInfo, $source);
|
|
|
$text = $this->replyTextContent("等您好久,终于等到您 /::)");
|
|
|
$pc = new \WXBizMsgCrypt($openToken, $encodingAesKey, $openAppId);
|
|
|
$encryptMsg = '';
|
|
|
$pc->encryptMsg($text, $timestamp, $nonce, $encryptMsg);//加密
|
|
|
echo $encryptMsg;
|
|
|
+ $currentId = $respond['id'] ?? 0;
|
|
|
+ Yii::info("关注用户的ID:{$currentId}");
|
|
|
break;
|
|
|
//取消关注
|
|
|
case 'unsubscribe':
|