application/api/model/v1/Category.php
(开头部分) 12KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* 易优CMS
* ============================================================================
* 版权所有 2016-2028 海南赞赞网络科技有限公司,并保留所有权利。
* 网站地址: http://www.eyoucms.com
* ----------------------------------------------------------------------------
* 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
* ============================================================================
* Author: 小虎哥 <1105415366@qq.com>
* Date: 2018-4-3
*/
namespace app\api\model\v1;
use think\Db;
use think\Cache;
/**
* 小程序分类模板
*/
class Category extends Base
{
//初始化
protected function initialize()
{
// 需要调用`Model`的`initialize`方法
parent::initialize();
}
/**
* 获取所有分类
* string $index_key 数组键名
* @return mixed
*/
public static function getProductCategory()
{
$data = [
'list' => [],
'arclist' => [],
];
// 查询分类数据
$where = [
'current_channel' => 2,
'status' => 1,
'is_hidden' => 0,
'is_del' => 0, // 回收站功能
'lang' => parent::$lang,
];
$order = [
'sort_order' => 'asc',
'id' => 'asc'
];
$ArctypeData = Db::name('arctype')->where($where)->order($order)->select();
// 商品信息列表
$ArchivesData = [];
if (!empty($ArctypeData[0]['id'])) $ArchivesData = self::GetProductData($ArctypeData[0]['id']);
后面还有 271 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
