app/admin/controller/Goods.php
(开头部分) 32KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* 人人站CMS
* ============================================================================
* 版权所有 2015-2030 山东康程信息科技有限公司,并保留所有权利。
* 网站地址: http://www.rrzcms.com
* ----------------------------------------------------------------------------
* 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
* ============================================================================
*/
namespace app\admin\controller;
use app\admin\model\Goods as Good;
class Goods extends Base
{
/**
* 产品列表
* @return false|string
* @throws \Exception
*/
function index() {
$checkType = I('get.checkType');
$catId = I('get.cat_id');
$this->pagedata['tabs'] = [
['name' => '产品列表', 'class' => 'current',],
$checkType ? false : ['name' => '产品分类', 'url' => U('Goods/cat'),],
$checkType ? false : ['name' => '产品品牌', 'url' => U('Goods/brand'),],
$checkType ? false : ['name' => '产品模型', 'url' => U('Channeltype/index', ['type' => 'goods',]),],
];
$search = $_POST['search'] ?? [];
if ($this->request->isPost() && $catId && (!isset($search['cat_id']) || !$search['cat_id'])) {
$catId = null;
}
$cat = [];
$catList = [
'' => '',
];
if (!$this->request->isPost()) {
if ($catId && is_numeric($catId)) {
$cat = M('goods_cat')->where('id', $catId)->field('id,name')->find();
$cat and $search['cat_id'] = $catId;
}
$cats = M('goods_cat')->field('id,name,depth,id_path')
->order('path asc,id asc')
->select()->toArray();
$cats = tierMenusList($cats);
foreach ($cats as $item) {
$name = str_repeat(' ', ($item['depth'] - 1) * 4) . $item['name'];
$catList[$item['id']] = $name;
}
}
$this->pagedata['search'] = [
['tag' => 'input', 'name' => 'a.name|has|trim', 'placeholder' => '产品名称',],
['tag' => 'select', 'name' => 'cat_id', 'placeholder' => '产品分类', 'value' => $cat['id'] ?? '', 'options' => $catList,],
后面还有 712 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。