user city
This commit is contained in:
parent
b7a07c48f8
commit
6455e9f7ef
@ -34,7 +34,7 @@ class User extends AdminController
|
||||
if($count){
|
||||
$res = ['code'=>0,'msg'=>'','count'=>$count];
|
||||
foreach($user as $k => $v){
|
||||
$data = ['id'=>$v['id'],'username'=>$v['name'],'avatar'=>$v['user_img'],'phone'=>$v['phone'],'email'=>$v['email'],'sex'=>$v['sex'],'ip'=>$v['last_login_ip'],'jointime'=>date("Y-m-d",$v['create_time']),'check'=>$v['status'],'auth'=>$v['auth']];
|
||||
$data = ['id'=>$v['id'],'username'=>$v['name'],'avatar'=>$v['user_img'],'phone'=>$v['phone'],'email'=>$v['email'],'sex'=>$v['sex'],'ip'=>$v['last_login_ip'],'city'=>$v['city'],'logintime'=>date("Y-m-d H:i",$v['last_login_time']),'jointime'=>date("Y-m-d",$v['create_time']),'check'=>$v['status'],'auth'=>$v['auth']];
|
||||
$res['data'][] = $data;
|
||||
}
|
||||
} else {
|
||||
@ -102,8 +102,8 @@ class User extends AdminController
|
||||
{
|
||||
$file = request()->file('file');
|
||||
try {
|
||||
validate(['image'=>'filesize:2048|fileExt:jpg,png,gif|image:200,200,jpg'])
|
||||
->check(array($file));
|
||||
validate(['file'=>'fileSize:204800|fileExt:jpg,png,gif'])
|
||||
->check(['file'=>$file]);
|
||||
$savename = \think\facade\Filesystem::disk('public')->putFile('head_pic',$file);
|
||||
} catch (think\exception\ValidateException $e) {
|
||||
echo $e->getMessage();
|
||||
|
@ -21,7 +21,7 @@
|
||||
<p class="fly-home-info">
|
||||
<i class="iconfont icon-kiss" title="飞吻"></i><span style="color: #FF7200;">{$u.point} 飞吻</span>
|
||||
<i class="iconfont icon-shijian"></i><span>{$u.create_time|date='Y-m-d'} 加入</span>
|
||||
<i class="iconfont icon-chengshi"></i><span>{:session('user_id') ? '来自'.$user.city:'登录查看'}</span>
|
||||
<i class="iconfont icon-chengshi"></i><span>{:session('user_id') ? '来自'.$u.city:'登录查看'}</span>
|
||||
</p>
|
||||
<p class="fly-home-sign">({$u.sign ?:'懒得还没有签名'})</p>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user