Browse Source

首页公告

zac3533 1 year ago
parent
commit
02533359b9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      application/api/controller/Index.php

+ 2 - 2
application/api/controller/Index.php

@@ -38,8 +38,8 @@ class Index extends Api
     {
         $user = $this->auth->getUser();
         $data = [];
-        $data['notice']         = '滚动显示的公告信息';
-        $data['banner_list']    = ['https://dapp-static.oss-cn-shenzhen.aliyuncs.com/jue-jin-lu/3.pnggS02ouwrJfiF65979ec74db73','https://dapp-static.oss-cn-shenzhen.aliyuncs.com/jue-jin-lu/intro.pngkSx1GTBiuFzY65979f0cd34e1'];
+        $data['notice']         = News::where('type_id', 4)->order('id desc')->value('title'); //type_id = 4 公告管理
+        $data['banner_list']    = News::where('type_id', 1)->order('id desc')->column('img_url'); //type_id = 1 banner管理
         $data['balance']        = $user['balance'];
         $data['bonus_sum']      = $user['bonus_sum'];
         $data['service_link']   = $user['service_link'];