切换导航条
此项目
正在载入...
登录
郭盛
/
resource
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
郭盛
5 years ago
提交
51c0704961cd1eba98eb875d7dd2c24b4c7bc034
1 个父辈
622edb15
1 个管道 的构建
通过
耗费 6 秒
修改token
变更
4
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
17 行增加
和
39 行删除
api/index/controller/ResourceController.php
app/user/controller/AdminIndexController.php
public/themes/admin_simpleboot3/user/admin_index/index.html
simplewind/cmf/controller/RestBaseController.php
api/index/controller/ResourceController.php
查看文件 @
51c0704
...
...
@@ -27,15 +27,12 @@ class ResourceController extends RestBaseController
* @url /index/Resource/homePage
* @method GET
*
* @header name:XX-Token require:1 default: desc:token
*
* @return id:图片id
* @return thumbnail:图片地址
*
*/
public
function
homePage
()
{
$user_id
=
$this
->
getUserId
();
$data
=
Db
::
name
(
'picture'
)
->
field
(
'id,thumbnail'
)
->
where
(
'delete_time'
,
0
)
...
...
@@ -100,7 +97,6 @@ class ResourceController extends RestBaseController
public
function
index
()
{
$user_id
=
$this
->
getUserId
();
$page
=
$this
->
request
->
param
(
'page'
,
1
,
'intval'
);
$pageNum
=
$this
->
request
->
param
(
'pageNum'
,
10
,
'intval'
);
$param
=
$this
->
request
->
param
();
...
...
app/user/controller/AdminIndexController.php
查看文件 @
51c0704
...
...
@@ -72,23 +72,19 @@ class AdminIndexController extends AdminBaseController
$list
=
$usersQuery
->
whereOr
(
$keywordComplex
)
->
where
(
$where
)
->
order
(
"create_time DESC"
)
->
paginate
(
10
);
// $arr = $list->toArray();
//
// foreach ($arr['data'] as $k=>$v){
// $data = Db::name('attestation')
// ->where('user_id',$v['id'])
// ->find();
// if($data){
// if($v['user_status'] == 1){
// $list[$k]['authentication'] = 1;
// }else{
// $list[$k]['authentication'] = 2;
// }
// }else{
// $list[$k]['authentication'] = 0;
// }
// }
$arr
=
$list
->
toArray
();
foreach
(
$arr
[
'data'
]
as
$k
=>
$v
){
$data
=
Db
::
name
(
'attestation'
)
->
where
(
'user_id'
,
$v
[
'id'
])
->
find
();
if
(
$data
){
$list
[
$k
][
'authentication'
]
=
$data
[
'status'
];
}
else
{
$list
[
$k
][
'authentication'
]
=
0
;
}
}
print_r
(
$arr
);
die
;
// 获取分页显示
$page
=
$list
->
render
();
$this
->
assign
(
'list'
,
$list
);
...
...
public/themes/admin_simpleboot3/user/admin_index/index.html
查看文件 @
51c0704
...
...
@@ -28,8 +28,8 @@
<th>
{:lang('REGISTRATION_TIME')}
</th>
<th>
{:lang('LAST_LOGIN_TIME')}
</th>
<th>
{:lang('LAST_LOGIN_IP')}
</th>
<th>
用户状态
</th>
<th>
认证状态
</th>
<th>
账号状态
</th>
<th>
{:lang('ACTIONS')}
</th>
</tr>
</thead>
...
...
@@ -49,29 +49,17 @@
<td>
{:date('Y-m-d H:i:s',$vo['create_time'])}
</td>
<td>
{:date('Y-m-d H:i:s',$vo['last_login_time'])}
</td>
<td>
{$vo.last_login_ip}
</td>
<td>
{$user_statuses[$vo['user_status']]}
</td>
<if
condition=
"$vo.authentication eq 1"
>
<td>
已认证
</td>
<elseif
condition=
"$vo.authentication eq 0"
/>
<td>
未认证
</td>
<else
/>
<td></td>
</if>
<td>
<neq
name=
"vo.id"
value=
"1"
>
<empty
name=
"vo.user_status"
>
<a
href=
"{:url('adminIndex/approve',array('id'=>$vo['id']))}"
class=
"js-ajax-dialog-btn"
>
认证详情
</a>
<a
href=
"{:url('adminIndex/approve',array('id'=>$vo['id']))}"
>
认证详情
</a>
<a
href=
"{:url('adminIndex/cancelban',array('id'=>$vo['id']))}"
class=
"js-ajax-dialog-btn"
data-msg=
"{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}"
>
{:lang('ACTIVATE_USER')}
</a>
<else/>
<a
href=
"{:url('adminIndex/approve',array('id'=>$vo['id']))}"
class=
"js-ajax-dialog-btn"
>
认证详情
</a>
<a
href=
"{:url('adminIndex/approve',array('id'=>$vo['id']))}"
>
认证详情
</a>
<a
href=
"{:url('adminIndex/ban',array('id'=>$vo['id']))}"
class=
"js-ajax-dialog-btn"
data-msg=
"{:lang('BLOCK_USER_CONFIRM_MESSAGE')}"
>
{:lang('BLOCK_USER')}
</a>
</empty>
...
...
simplewind/cmf/controller/RestBaseController.php
查看文件 @
51c0704
...
...
@@ -99,7 +99,7 @@ class RestBaseController
}
if
(
empty
(
$deviceType
))
{
return
;
$deviceType
=
"wxapp"
;
}
if
(
!
in_array
(
$deviceType
,
$this
->
allowedDeviceTypes
))
{
...
...
@@ -288,8 +288,6 @@ class RestBaseController
$this
->
error
([
'code'
=>
10001
,
'msg'
=>
'用户未登录'
]);
}
return
$this
->
userId
;
}
...
...
请
注册
或
登录
后发表评论