You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jy-sdk/Application/Admin/Controller/SiteApplyController.class.php

42 lines
1.0 KiB
PHTML

2 years ago
<?php
namespace Admin\Controller;
/**
* 后台首页控制器
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
class SiteApplyController extends ThinkController {
const model_name = 'SiteApply';
public function lists(){
parent::lists(self::model_name,$_GET["p"]);
}
public function del($model = null, $ids=null){
if ( empty($ids) ) {
$this->error('请选择要操作的数据!');
}
$model = D(self::model_name);
$map['id']=array("in",$ids);
if($model->where($map)->delete()){
$this->success('删除成功');
} else {
$this->error('删除失败!');
}
}
public function check($ids=null){
if ( empty($ids) ) {
$this->error('请选择要操作的数据!');
}
$model = D(self::model_name);
$map['id']=array("in",$ids);
if($model->where($map)->setField(['status'=>1])){
$this->success('审核成功');
} else {
$this->error('审核失败!');
}
}
}