|
|
@@ -112,19 +112,13 @@ class Log extends BaseController
|
|
|
['page', 1],
|
|
|
['data', ''],
|
|
|
['uid', ''],
|
|
|
- ['uip', ''],
|
|
|
['mobile', ''],
|
|
|
]);
|
|
|
$where = [];
|
|
|
if(!empty($post["uid"])){
|
|
|
$where["l.uid"] = $post["uid"];
|
|
|
}
|
|
|
- if(!empty($post["uip"])){
|
|
|
- $udata = (new UserModel)->where("uip",$post["uip"])->find();
|
|
|
- if(!empty($udata)){
|
|
|
- $where["l.uid"] = $udata["uid"];
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
if(!empty($post["mobile"])){
|
|
|
$udata = (new UserModel)->where("mobile",$post["mobile"])->find();
|
|
|
if(!empty($udata)){
|
|
|
@@ -133,7 +127,7 @@ class Log extends BaseController
|
|
|
}
|
|
|
$data = (new UserLogin)
|
|
|
->alias("l")
|
|
|
- ->field("l.*,u.uip,u.mobile,u.nickname")
|
|
|
+ ->field("l.*,u.mobile,u.nickname")
|
|
|
->leftJoin("user u","u.uid = l.uid")
|
|
|
->where($where)
|
|
|
->when(!empty($post["data"]), function ($query) use ($post) {
|
|
|
@@ -200,7 +194,7 @@ class Log extends BaseController
|
|
|
|
|
|
foreach($data as $k=>$v){
|
|
|
$data[$k]["time"] = date("Y-m-d H:i:s",$v["time"]);
|
|
|
- $data[$k]["title"] = "{$v['nickname']}[{$v['uip']}]进行了登录";
|
|
|
+ $data[$k]["title"] = "{$v['nickname']}进行了登录";
|
|
|
}
|
|
|
|
|
|
return app('json')->success([
|