1、后台的一些bug修复

2、内核更新
3、后台的扩展模型做了一点更新一点,还不够完善
This commit is contained in:
2016-07-19 14:08:00 +08:00
parent 124745c341
commit 783369c9e4
26 changed files with 492 additions and 238 deletions

View File

@@ -43,27 +43,24 @@ class Attribute extends Base{
}
public function change(){
$data = input('post.');
$data = \think\Request::instance()->post();
if (!empty($data)) {
if ($data['id']) {
$status = $this->validate('attribute.edit')->save($data, array('id'=>$data['id']));
}else{
$status = $this->validate('attribute.add')->save($data);
}
if (false !== $status) {
//在数据库内添加字段
$result = $this->checkTableField($data);
if (!$result) {
$this->error = "字段创建失败!";
return false;
}
if ($data['id']) {
$status = $this->save($data, array('id'=>$data['id']));
}else{
$status = $this->save($data);
}
if (false !== $status) {
return $status;
}else{
$this->error = "添加失败!";
return false;
}
return $status;
}else{
return false;
}
}