This commit is contained in:
zmj 2024-06-06 14:10:48 +08:00
commit 1e06fc9208

View File

@ -16,6 +16,7 @@ namespace app\api\logic;
use app\common\cache\WebScanLoginCache;
use app\common\logic\BaseLogic;
use app\common\model\system_store\SystemStore;
use app\common\model\system_store\SystemStoreStaff;
use app\api\service\{UserTokenService, WechatUserService};
use app\common\enum\{LoginEnum, user\UserTerminalEnum, YesNoEnum};
@ -262,6 +263,21 @@ class LoginLogic extends BaseLogic
}
public static function dealStaff($res)
{
$res['is_staff'] = 0;
$res['store_id'] = 0;
if(isset($res['mobile']) && $res['mobile']){
$check = SystemStoreStaff::where('phone',$res['mobile'])->find()??[];
if ($check){
$res['is_staff'] = 1;
$res['store_id'] = $check['store_id'];
}
}
return $res;
}
/**
* @notes 小程序端绑定微信
* @param array $params