更新 Ad.php
This commit is contained in:
@@ -51,10 +51,15 @@ class Ad extends Admin {
|
||||
$place = model('AdPlace');
|
||||
if ($this->request->isPost()) {
|
||||
$result = $place->change();
|
||||
if ($result) {
|
||||
return $this->success("添加成功!");
|
||||
} else {
|
||||
return $this->error($place->getError());
|
||||
if (!empty($_POST['name'])){
|
||||
$result = $place->change();
|
||||
if ($result) {
|
||||
return $this->success("添加成功!");
|
||||
} else {
|
||||
return $this->error($place->getError());
|
||||
}
|
||||
}else{
|
||||
return $this->error("标识不能为空!");
|
||||
}
|
||||
} else {
|
||||
$data = array(
|
||||
|
||||
Reference in New Issue
Block a user