|
@@ -16,7 +16,7 @@ class Jishuguifan extends Apic
|
|
|
protected $table = 'jishuguifan';
|
|
|
|
|
|
public function index(){
|
|
|
- $list = Db::name($this->table)->field('id,pid,name,createtime')->where('company_id',$this->auth->company_id)->order('id asc')->select();
|
|
|
+ $list = Db::name($this->table)->field('id,pid,name,image,createtime')->where('company_id',$this->auth->company_id)->order('id asc')->select();
|
|
|
|
|
|
/*$tree = Tree::instance()->init($list);
|
|
|
$tree->icon = ['','',''];
|
|
@@ -24,6 +24,7 @@ class Jishuguifan extends Apic
|
|
|
$tree = $tree->getTreeList($tree->getTreeArray(0),'name');
|
|
|
|
|
|
$this->success(1,$tree);*/
|
|
|
+ $list = list_domain_image($list,['image']);
|
|
|
|
|
|
$this->success(1,$list);
|
|
|
}
|
|
@@ -45,6 +46,7 @@ class Jishuguifan extends Apic
|
|
|
'pid' => $pid,
|
|
|
'tid' => $tid,
|
|
|
'name' => input('name',''),
|
|
|
+ 'image' => input('image',''),
|
|
|
'content' => input('content','','htmlspecialchars_decode'),
|
|
|
'ismenu' => input('ismenu',1),
|
|
|
'file' => input('file',''),
|
|
@@ -60,7 +62,7 @@ class Jishuguifan extends Apic
|
|
|
public function info(){
|
|
|
$id = input('id',0);
|
|
|
$info = Db::name($this->table)->where('id',$id)->where('company_id',$this->auth->company_id)->find();
|
|
|
- $info = info_domain_image($info,['file']);
|
|
|
+ $info = info_domain_image($info,['file','image']);
|
|
|
|
|
|
$this->success(1,$info);
|
|
|
}
|
|
@@ -87,6 +89,7 @@ class Jishuguifan extends Apic
|
|
|
'pid' => $pid,
|
|
|
'tid' => $tid,
|
|
|
'name' => input('name',''),
|
|
|
+ 'image' => input('image',''),
|
|
|
'content' => input('content','','htmlspecialchars_decode'),
|
|
|
'ismenu' => input('ismenu',1),
|
|
|
'file' => input('file',''),
|