Commit f8efab9a authored by shajiaiming's avatar shajiaiming

fix

parent 41d0099a
...@@ -71,6 +71,33 @@ class NoticeController extends BaseController ...@@ -71,6 +71,33 @@ class NoticeController extends BaseController
return ['code' => $code, 'msg' => $msg, 'data' => $data]; return ['code' => $code, 'msg' => $msg, 'data' => $data];
} }
/**
* 申请列表
* @param integer page
* @param integer size
* @return array
*/
public function actionDetail()
{
$data = null;
$header = Yii::$app->request->headers;
$platform_id = $header['FZM-PLATFORM-ID'] ?? null;
$id = Yii::$app->request->get('id', 0);
if (empty($platform_id) || empty($id)) {
$msg = '缺少必要的参数';
$code = -1;
goto doEnd;
}
$data = Notice::find()->select('title,content,author,type,create_at')->where(['id' => $id, 'platform_id' => $platform_id])->asArray()->one();
$msg = 'ok';
$code = 0;
doEnd :
return ['code' => $code, 'msg' => $msg, 'data' => $data];
}
public function actionIndex() public function actionIndex()
{ {
$id = Yii::$app->request->get('id', ''); $id = Yii::$app->request->get('id', '');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment