| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace app\api\logic;
- use Exception;
- use think\Env;
- use think\Cache;
- use think\Loader ;
- use fast\Asset;
- use app\common\model\UserModel;
- //用户逻辑
- class UserInfoLogic
- {
- //判断用户手机号存在或者重复
- public static function checkUserByInfo(string $wher, int $user_id, string $wher2)
- {
- //用户信息存在
- $user = (new UserModel)->getById($user_id);
- if(!empty($user[$wher])) return false;
- $where = [];
- $where[$wher] = $wher2;
- $userInfo = UserModel::getByUserCount($where);
- if($userInfo > 1) return false;
-
- return true;
- }
-
-
- }
|