application/index/controller/ArticleList.php

(完整代码) 949B

<?php

namespace app\index\controller;
use app\index\model\ArticleSpace;
use app\index\model\ArticleTypeSpace;
class ArticleList extends Base {

    public function index() {
        $ArticleSpace_old = ArticleSpace::where("status",2)->order('update_time', 'asc')->select();
         $article_typelist =  ArticleTypeSpace::all();
         foreach ($article_typelist as $value) {
            $new_typelist[$value['id'] ] = $value['pic'] ;
              $new_typelist2[$value['id'] ] = $value['article_type_name'] ;
        }
         foreach ($ArticleSpace_old as $value) {
           $value['arr_pic']=explode(",", $value['pic']);
             $value['head_pic']  =$new_typelist[$value['article_type']];
              $value['type_name']  =$new_typelist2[$value['article_type']];

           $ArticleSpace[]= $value;
        }
        $this->assign('ArticleSpace', $ArticleSpace);

        return $this->fetch();
    }

}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。