后台赠送课程前端个人中心我的课程数据不正确
修改文件:application\wap\model\special\special
修复方法:getMyGradeList()
public static function getMyGradeList($page, $limit, $uid, $is_member, $active = 0)
{
$model = self::PreWhere('a')->join('SpecialBuy s', 'a.id=s.special_id')->where('s.is_del', 0)->group('s.special_id')
->order('a.sort desc,s.add_time desc');
$list = $model->where('s.uid', $uid)->field('a.*,a.type as types,s.*')->page($page, $limit)->select();
$list = count($list) > 0 ? $list->toArray() : [];
foreach ($list as &$item) {
$item['image'] = get_oss_process($item['image'], 4);
if (is_string($item['label'])) $item['label'] = json_decode($item['label'], true);
$id = $item['special_id'];
$item['s_id'] = $id;
$item['count'] = self::numberChapters($item['types'], $item['s_id']);
if ($item['is_light']) {
$item['type'] = self::lightType($item['light_type']);
}
}
$page += 1;
return compact('list', 'page');
}
{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}
作者 管理员 企业
{{itemf.name}}
{{itemc.user_info.nickname}}
{{itemc.user_name}}
回复 {{itemc.comment_user_info.nickname}}
{{itemf.name}}