Commit 05fe32a9 authored by shajiaiming's avatar shajiaiming

fix

parent 939ad050
...@@ -126,10 +126,12 @@ class CoinDogController extends BaseController ...@@ -126,10 +126,12 @@ class CoinDogController extends BaseController
public function actionArticleBanner() public function actionArticleBanner()
{ {
$type = Yii::$app->request->get('type', 1);
$data = Article::find() $data = Article::find()
->select('id, image_url ,title, url') ->select('id, image_url ,title, url')
->limit(5) ->where(['type' => $type])
->orderBy('update_at desc') ->orderBy('update_at desc')
->limit(5)
->asArray() ->asArray()
->all(); ->all();
......
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