Commit 278ede97 authored by wangzhengwen's avatar wangzhengwen

课程

parent 3018043d
......@@ -160,7 +160,7 @@ class CourseProgressService
// 分页查询课程基本信息
$query = Course::where('id', 'in', $courseIds)
->with(['thumb'])
->field('id,title,description,thumb,price,content');
->field('id,title,description,thumb,price,content,is_sell');
// 根据类型筛选课程
if ($type === 1) {
......
......@@ -153,7 +153,7 @@ class Course extends Model
//获取课程详情
public function getCourseDetail($course_id = 0,$userId=0)
{
$where = ['status'=>3,'is_sell'=>1,'is_del'=>0];
$where = ['status'=>3,'is_del'=>0];
if ($course_id)
{
$where['id'] = $course_id;
......
......@@ -104,15 +104,15 @@ class Payment extends Model
$timeFormat = "%Y-%m-%d"; // 按天
break;
case 'quarter':
$startTime = strtotime('-3 month');
$startTime = strtotime('-2 month');
$timeFormat = "%Y-%m"; // 按月
break;
case 'halfyear':
$startTime = strtotime('-6 month');
$startTime = strtotime('-5 month');
$timeFormat = "%Y-%m"; // 按月
break;
case 'year':
$startTime = strtotime('-12 month');
$startTime = strtotime('-11 month');
$timeFormat = "%Y-%m"; // 按月
break;
case 'all':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment