| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace biz\item\classes;
- use biz\base\classes\BaseClass;
- use common\components\imgUtil;
- class PtItemCatClass extends BaseClass
- {
- public static $baseFile = '\biz\item\models\PtItemCat';
- public static function getCatList($where)
- {
- $data = self::getList('*', $where, 'inTurn DESC');
- $list = isset($data['list']) && !empty($data['list']) ? $data['list'] : [];
- if (empty($list)) {
- return $data;
- }
- foreach ($list as $key => $val) {
- $shortCover = $val['cover'] ?? '';
- $cover = imgUtil::groupImg($shortCover) . "?x-oss-process=image/resize,m_fill,h_130,w_130";
- $bigCover = imgUtil::groupImg($shortCover) . "?x-oss-process=image/resize,m_fill,h_700,w_700";
- $list[$key]['cover'] = $cover;
- $list[$key]['smallCover'] = $cover;
- $list[$key]['bigCover'] = $bigCover;
- }
- $data['list'] = $list;
- return $data;
- }
- }
|