12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace app\api\controller\worker;
- use app\common\controller\Apiw;
- use think\Db;
- /**
- * 密码
- */
- class Password extends Apiw
- {
- protected $noNeedLogin = [''];
- protected $noNeedRight = [''];
- //操作规范
- public function lists(){
- $keyword = input('keyword','','trim');
- $where = [
- 'company_id' => $this->auth->company_id
- ];
- if(!empty($keyword)){
- $where['brand|name|typename'] = ['LIKE','%'.$keyword.'%'];
- }
- $list = Db::name('password')
- ->where($where)
- ->autopage()
- ->select();
- $list = list_domain_image($list,['logo_image']);
- $this->success(1, $list);
- }
- //详情
- public function info(){
- $id = input('id',0);
- $info = Db::name('password')
- ->where('id',$id)
- ->find();
- $info = info_domain_image($info,['logo_image']);
- $this->success(1, $info);
- }
- }
|