浏览代码

二级分类

afa 6 月之前
父节点
当前提交
96d22cb204

+ 1 - 1
application/api/controller/Announcement.php

@@ -31,7 +31,7 @@ class Announcement extends Api
         $typeId = $this->request->param('type_id', 1, 'intval');
         $paginator = $announcementModel->where('type_id', $typeId)
             ->where('status', 1)->where('to_lang', $this->lan)
-            ->field('id,to_lang,weigh,img_url,createtime,title as title,introduction,body,is_top,sub_type_id')
+            ->field('id,to_lang,weigh,img_url,createtime,title as title,is_top,sub_type_id')
             ->order('is_top desc, weigh desc')
             ->paginate($this->pageSize);
        

+ 5 - 1
application/api/lang/en.php

@@ -51,6 +51,10 @@ return [
     '质抵活动不存在'                                                              => 'The pledge activity does not exist',  
     '质抵活动已结束'                                                              => 'The pledge activity has ended',
     '正在挖矿中,请稍后再试'                                                       => 'Mining is in progress, please try again later',
-    '转账后余额不能低于9.9'                                                        => 'The balance after transfer cannot be less than 9.9',    
+    '转账后余额不能低于9.9'                                                        => 'The balance after transfer cannot be less than 9.9',
+    '官方公告'                                                                   => 'Official announcement',
+    '新闻中心'                                                                   => 'News center',
+    '茶说'                                                                      => 'Tea say',
+    '系统信息'                                                                   => 'System information',   
 
 ]; 

+ 7 - 2
application/api/lang/zh-cn.php

@@ -138,10 +138,15 @@ return [
     '材料不足'                                                                    => '材料不足',
     '库存不足'                                                                    => '库存不足',
     '质押存储'                                                                    => '质押存储',                                    
-    '质押商品数量与订单数量不匹配'                                                 => '质押商品数量与订单数量不匹配',   
+    '质押商品数量与订单数量不匹配'                                                  => '质押商品数量与订单数量不匹配',   
     '质抵活动不存在'                                                              => '质抵活动不存在',  
     '质抵活动已结束'                                                              => '质抵活动已结束',
     '正在挖矿中,请稍后再试'                                                       => '正在挖矿中,请稍后再试',
-    '转账后余额不能低于9.9'                                                        => '转账后余额不能低于9.9', 
+    '转账后余额不能低于9.9'                                                        => '转账后余额不能低于9.9',
+    '官方公告'                                                                   => '官方公告',
+    '新闻中心'                                                                   => '新闻中心',
+    '茶说'                                                                      => '茶说',
+    '系统信息'                                                                   => '系统信息',
+    
 
 ];

+ 1 - 1
application/common/model/AnnouncementType.php

@@ -33,7 +33,7 @@ class AnnouncementType extends Model
 
       foreach ($data as &$item) {
            $item->sub_type_name = '';
-           if(!empty($item->sub_type_id)) $item->sub_type_name = self::whereIn('id', $item->sub_type_id)->column('id,title');
+           if(!empty($item->sub_type_id)) $item->sub_type_name = self::whereIn('id', $item->sub_type_id)->field('id,title,color')->select();
       }
       return $data;
     }