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.
42 lines
871 B
PHP
42 lines
871 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: xmy 280564871@qq.com
|
|
* Date: 2017/4/26
|
|
* Time: 20:32
|
|
*/
|
|
|
|
namespace Open\Controller;
|
|
|
|
use Open\Model\OpenMessageModel;
|
|
|
|
class MessageController extends CenterController{
|
|
|
|
public function index(){
|
|
$model = new OpenMessageModel();
|
|
$data = $model->getUserData(UID);
|
|
$this->assign("data",$data);
|
|
$this->display();
|
|
}
|
|
|
|
|
|
/**
|
|
* 设置状态
|
|
* @param $id
|
|
* @param $status
|
|
* author: xmy 280564871@qq.com
|
|
*/
|
|
public function set_status($ids=0,$status){
|
|
$model = new OpenMessageModel();
|
|
$ids = is_array($ids) ? implode($ids,",") : $ids;
|
|
if(empty($ids)){
|
|
$this->ajaxReturn(['status'=>2,'info'=>'请选择要操作的数据']);
|
|
}
|
|
$res = $model->setStatus($ids,$status);
|
|
if($res !== false){
|
|
$this->ajaxReturn(['status'=>1]);
|
|
}else{
|
|
$this->ajaxReturn(['status'=>2,'info'=>'操作失败']);
|
|
}
|
|
}
|
|
} |