public function actionIndex() { $id = Yii::app()->getRequest()->getParam("id", ""); //月份 $model = AppBsArt::model()->findByPk($id); $this->renderPartial('index', array('models' => $model)); }
/** * 删除幻灯 */ public function actionDel() { $msg = $this->msgcode(); $id = Yii::app()->getRequest()->getParam("id", 0); //用户名 if ($id != 0) { if (AppBsArt::model()->deleteByPk($id)) { $this->msgsucc($msg); } else { $msg['msg'] = "数据删除失败"; } } else { $msg['msg'] = "id不能为空"; } echo json_encode($msg); }