application/admin/controller/Feed.php

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
namespace app\admin\controller;

use app\admin\model\FeedSpace;
//use app\admin\lib\common\Check;


//use app\admin\lib\lang\Hylang;
//use think\Lang;
class Feed extends Base {

    //商品品牌列表
    public function index() {
        $feedlist = FeedSpace::all();
        foreach ($feedlist as $value) {
           $value['arr_pic']=explode(",", $value['pic']);
           $feedlist_new[]= $value;
        }
       // dump($feedlist_new);
        $this->assign('feedlist', $feedlist_new);
        return $this->fetch();
    }

    //添加商品品牌 页面
//    public function add_feed() {
//        return $this->fetch();
//    }
    //编辑商品品牌 页面
    public function edit_feed($id) {
        $FeedSpace = FeedSpace::get(['id' => $id]);
       if($FeedSpace['pic']){
          $arr_pic=explode(",", $FeedSpace['pic']);
       } 
        $this->assign('FeedSpace', $FeedSpace);
        $this->assign('arr_pic', $arr_pic);
        $this->assign('feed_id', $id);
//        $AuthGroup = AuthGroup::all();
//        $this->assign('AuthGroup', $AuthGroup);
        return $this->fetch();
    }

    //添加或修改商品品牌动作
//    public function add_feed_action() {
//         $FeedSpace=new FeedSpace;
//         $FeedSpace->add();
//         
//         $this->redirect('Feed/index');
//
//    }

    public function edit_feed_action() {
           $FeedSpace=new FeedSpace;
        $FeedSpace->edit();

            $this->redirect('Feed/index');

    }

    //删除商品品牌 动作 
    public function del_feed_action($id) {
后面还有 24 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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