|
@@ -0,0 +1,52 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace app\api\controller\worker;
|
|
|
+
|
|
|
+use app\common\controller\Api;
|
|
|
+use think\Db;
|
|
|
+/**
|
|
|
+ * 密码
|
|
|
+ */
|
|
|
+class Password extends Api
|
|
|
+{
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|