where(['id' => self::$aid, 'is_del' => CommonModel::$del_normal]) ->findOrEmpty() ->toArray(); if (empty($rs)) return json_show(CommonModel::$error_param, '该账户不存在'); $db = VideoModel::where(['is_del' => CommonModel::$del_normal, 'status' => CommonModel::$status_normal]) ->whereIn('id', $rs['video_ids']); $count = $db->count('id'); $list = $db ->field('id,video_sn,video_name,video_url,video_img') ->page($data['page'], $data['size']) ->order(['weight' => 'desc', 'id' => 'desc']) ->select() ->toArray(); return json_show(CommonModel::$success, '获取视频列表成功', ['count' => $count, 'list' => $list]); } //手机主题 public static function theme(): Json { $rs = ThemeModel::field('id,code') ->where(['is_del' => CommonModel::$del_normal, 'group_id' => self::$group_id, 'status' => CommonModel::$status_normal]) ->append(['modular']) ->withAttr('modular', function ($val, $data) { return Db::name('theme_modular') ->field('id,title,type') ->where(['is_del' => CommonModel::$del_normal, 'theme_id' => $data['id'], 'status' => CommonModel::$status_normal]) ->order(['addtime' => 'desc', 'id' => 'desc']) ->append(['data']) ->withAttr('data', function ($v, $d) { return Db::name('theme_modular_data') ->field('id,img,jump_type,jump_param,good_name,good_id,style_type') ->where(['is_del' => CommonModel::$del_normal, 'theme_modular_id' => $d['id']]) ->order(['addtime' => 'desc', 'id' => 'desc']) ->select() ->toArray(); }) ->select() ->toArray(); }) ->findOrEmpty() ->toArray(); return empty($rs) ? json_show(CommonModel::$error_param, '该手机主题不存在') : json_show(CommonModel::$success, '获取手机主题成功', $rs); } }