修复bug
This commit is contained in:
@@ -153,10 +153,8 @@ class Content extends Admin {
|
|||||||
* @author molong <ycgpp@126.com>
|
* @author molong <ycgpp@126.com>
|
||||||
*/
|
*/
|
||||||
public function status($id, $status) {
|
public function status($id, $status) {
|
||||||
$model = $this->model;
|
|
||||||
|
|
||||||
$map['id'] = $id;
|
$map['id'] = $id;
|
||||||
$result = $model::where($map)->setField('status', $status);
|
$result = $this->model->where($map)->setField('status', $status);
|
||||||
if (false !== $result) {
|
if (false !== $result) {
|
||||||
return $this->success("操作成功!");
|
return $this->success("操作成功!");
|
||||||
} else {
|
} else {
|
||||||
@@ -169,10 +167,8 @@ class Content extends Admin {
|
|||||||
* @author molong <ycgpp@126.com>
|
* @author molong <ycgpp@126.com>
|
||||||
*/
|
*/
|
||||||
public function settop($id, $is_top) {
|
public function settop($id, $is_top) {
|
||||||
$model = $this->model;
|
|
||||||
|
|
||||||
$map['id'] = $id;
|
$map['id'] = $id;
|
||||||
$result = $model::where($map)->setField('is_top', $is_top);
|
$result = $this->model->where($map)->setField('is_top', $is_top);
|
||||||
if (false !== $result) {
|
if (false !== $result) {
|
||||||
return $this->success("操作成功!");
|
return $this->success("操作成功!");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user