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