chengwl 4 years ago
parent
commit
9f59574dd4
1 changed files with 1 additions and 0 deletions
  1. 1 0
      controllers/IndexController.php

+ 1 - 0
controllers/IndexController.php

@@ -55,6 +55,7 @@ class IndexController extends Controller
     }
     public function actionContentpage(){
       $pages=ContentPage::find()->asArray()->all();
+      \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
       return [
         'code' => 200,
         'data'=>$pages,