作者 郭盛
1 个管道 的构建 通过 耗费 6 秒

修改token

... ... @@ -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();
... ...
... ... @@ -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);
... ...
... ... @@ -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>
... ...
... ... @@ -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;
}
... ...