|
@@ -132,7 +132,7 @@ class WechatOfficialController extends HttpBaseController
|
|
|
$avatar = 'https://www.xingyousoft.com/static/images/softlogo.png'; // 头像网址
|
|
|
$unionid = $userInfo['unionid'] ?? '';
|
|
|
$wxInfo = $userInfo;
|
|
|
-
|
|
|
+ Log::info('11111111111111111111111111 === ' . 'openid' . $openid );
|
|
|
$isExistUser = DB::table('user_wechat_official_account')->select('id','mid')->where('openid', $openid)->first();
|
|
|
$productInfo = DB::table('product')->where('mid', $productMid)->where('is_delete', 0)->first();
|
|
|
|
|
@@ -144,7 +144,9 @@ class WechatOfficialController extends HttpBaseController
|
|
|
$isSuccess = true;
|
|
|
$userId = $isExistUser->id; // 用户id
|
|
|
$nickname = $isExistUser->mid; //用户的mid
|
|
|
+ Log::info('2222222222222222222222222 === ' . 'userid' . $isExistUser->id );
|
|
|
} else {
|
|
|
+ Log::info('33333333333333333333333333333333333 === ' . 'nickname' . $nickname);
|
|
|
// 插入数据
|
|
|
$isSuccess = DB::transaction(function () use ($openid, $nickname, $avatar, $unionid, $wxInfo) {
|
|
|
$mid = Str::random(12);
|
|
@@ -185,7 +187,7 @@ class WechatOfficialController extends HttpBaseController
|
|
|
if ($sceneStr) {
|
|
|
$oauthUrl = $this->app->oauth->withState(base64_encode($sceneStr))->redirect();
|
|
|
}
|
|
|
-
|
|
|
+ Log::info('4444444444444444444444444444444 === ' . 'nickname' . $nickname);
|
|
|
// 发送登录成功消息
|
|
|
$this->app->template_message->send([
|
|
|
'touser' => $openid,
|