更新 Ad.php

This commit is contained in:
k先森
2019-06-19 14:44:34 +08:00
committed by Gitee
parent 9228fcf4b8
commit 036366af52

View File

@@ -51,10 +51,15 @@ class Ad extends Admin {
$place = model('AdPlace'); $place = model('AdPlace');
if ($this->request->isPost()) { if ($this->request->isPost()) {
$result = $place->change(); $result = $place->change();
if ($result) { if (!empty($_POST['name'])){
return $this->success("添加成功!"); $result = $place->change();
} else { if ($result) {
return $this->error($place->getError()); return $this->success("添加成功!");
} else {
return $this->error($place->getError());
}
}else{
return $this->error("标识不能为空!");
} }
} else { } else {
$data = array( $data = array(