...
|
...
|
@@ -31,10 +31,12 @@ class IndexController extends HomeBaseController |
|
|
if(Db::name('user')->insert($data)) {
|
|
|
$userId = Db::name('user')->getLastInsID();
|
|
|
session('user.id', $userId);
|
|
|
session('user.openid', $userInfo['openid']);
|
|
|
}
|
|
|
}else {
|
|
|
$userId = Db::name('user')->where(['openid'=>$userInfo['openid']])->value('id');
|
|
|
session('user.id', $userId);
|
|
|
session('user.openid', $userInfo['openid']);
|
|
|
}
|
|
|
}
|
|
|
}
|
...
|
...
|
|