1、修复几处bug;
2、完善内容管理中的细节功能
This commit is contained in:
@@ -21,6 +21,10 @@ class Category extends \think\Model{
|
||||
'icon' => 'integer',
|
||||
);
|
||||
|
||||
protected static function onAfterUpdate($model){
|
||||
$data = $model->toArray();
|
||||
}
|
||||
|
||||
public static function getCategoryTree($map = []){
|
||||
$list = self::where($map)->select();
|
||||
|
||||
@@ -31,22 +35,6 @@ class Category extends \think\Model{
|
||||
return $list;
|
||||
}
|
||||
|
||||
public function change() {
|
||||
$data = input('post.');
|
||||
if ($data['id']) {
|
||||
$result = $this->save($data, array('id' => $data['id']));
|
||||
} else {
|
||||
unset($data['id']);
|
||||
$result = $this->save($data);
|
||||
}
|
||||
if (false !== $result) {
|
||||
return true;
|
||||
} else {
|
||||
$this->error = "失败!";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function info($id, $field = true) {
|
||||
return $this->db()->where(array('id' => $id))->field($field)->find();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user