tp5 分页权限权限设置显示

    $adminid = cookie("adminid");
$shop_id=$this->get_shop_id();
if($adminid==1){
$uid = input("uid");
$shop=db('shop')->where('status',2)->select();
$this->assign('shop', $shop);
if($uid){
$lists = db('balance_log')
->alias('a')
->join('shop s','a.uid = s.uid')
->where('a.uid',$uid)
->where($maps)
->paginate(15, false, ['query' => ['uid' => $uid]]);//因为权限不一样所以需要传下uid
}else{
$lists = db('balance_log')
->where($maps)
->paginate(15);
}

// var_dump($lists);
$num=db('balance_log') ->where($maps)->count();

}else{

$map['id'] = $shop_id;

$shop_name = db('shop')->where($map)->field('id,uid,shop_name')->find();

$lists = db('balance_log')
->where('uid',$shop_name['uid'])
->where($maps)
->order('createtime desc')
->paginate(15);

$num=db('balance_log')->count();

}

资料查看 转至 https://blog.csdn.net/h330531987/article/details/78319595

上一篇:(九)硅谷外卖前端部分-各导航路由组件(静态)


下一篇:通过selenium实现的京东商品爬取