Ver código fonte

feat 更新用户类型

wzh 4 meses atrás
pai
commit
d2d2391041
1 arquivos alterados com 1 adições e 2 exclusões
  1. 1 2
      crmeb/app/services/wechat/WechatServices.php

+ 1 - 2
crmeb/app/services/wechat/WechatServices.php

@@ -23,7 +23,6 @@ use crmeb\services\app\WechatService as WechatAuthService;
 use crmeb\services\oauth\OAuth;
 use crmeb\services\pay\Pay;
 use crmeb\utils\Canvas;
-
 /**
  *
  * Class WechatServices
@@ -117,7 +116,6 @@ class WechatServices extends BaseServices
         /** @var OAuth $oauth */
         $oauth = app()->make(OAuth::class);
         $wechatInfo = $oauth->oauth();
-        $wechatInfo['goods_user_type'] = $goods_user_type;
         if (!isset($wechatInfo['nickname'])) {
             $wechatInfo = $oauth->getUserInfo($wechatInfo['openid']);
             if (!isset($wechatInfo['nickname']))
@@ -128,6 +126,7 @@ class WechatServices extends BaseServices
             if (isset($wechatInfo['privilege'])) unset($wechatInfo['privilege']);
         }
         $wechatInfo['user_type'] = 'wechat';
+        $wechatInfo['goods_user_type'] = $goods_user_type;
         $openid = $wechatInfo['openid'];
         /** @var WechatUserServices $wechatUserServices */
         $wechatUserServices = app()->make(WechatUserServices::class);