|
@@ -502,6 +502,7 @@ func (this *CourseManage) CreateOnLineApi() {
|
|
|
c_type, _ := this.GetInteger("type") //课程类型:线下课程(1招标管理课程、2投标实物课程)、3线上课程
|
|
|
name := this.GetString("name")//课程名称
|
|
|
picUrl := this.GetString("picUrl")//头图
|
|
|
+ picUrl2 := this.GetString("picUrl2")//头图
|
|
|
price := this.GetString("price")//课程金额
|
|
|
if price == "" {
|
|
|
price = "0"
|
|
@@ -525,7 +526,7 @@ func (this *CourseManage) CreateOnLineApi() {
|
|
|
|
|
|
r := func() *FuncResult {
|
|
|
//数据校验
|
|
|
- if name == "" || picUrl == "" || videoUrl == "" || c_type != 3 ||
|
|
|
+ if name == "" || picUrl == "" || picUrl2 == "" || videoUrl == "" || c_type != 3 ||
|
|
|
courseDate == "" || endTime == "" {
|
|
|
return &FuncResult{false, errors.New("参数不完整"), nil}
|
|
|
}
|
|
@@ -583,6 +584,7 @@ func (this *CourseManage) CreateOnLineApi() {
|
|
|
"s_name": name,
|
|
|
"i_type": c_type,
|
|
|
"s_picUrl": picUrl,
|
|
|
+ "s_picUrl2": picUrl2,
|
|
|
"s_videoUrl": videoUrl,
|
|
|
"s_fileUrl": fileUrl,
|
|
|
"i_price": price3,
|
|
@@ -782,8 +784,9 @@ func (this *CourseManage) OnLineDetail(flag, id string) error{
|
|
|
if id == "" {
|
|
|
return errors.New("请求参数有误")
|
|
|
}
|
|
|
- rData := mongodb.FindById("jy_course", id, `{"_id":1,"i_status":1,"s_content":1,"s_name":1,"s_picUrl":1,"i_price":1,"l_publishtime":1,"l_endtime":1,"s_associatedCourses":1,"i_clickRate":1,"s_videoUrl":1,"s_fileUrl":1,"s_courseDate":1,"i_tradeRate":1}`)
|
|
|
+ rData := mongodb.FindById("jy_course", id, `{"_id":1,"i_status":1,"s_content":1,"s_name":1,"s_picUrl":1,"s_picUrl2":1,"i_price":1,"l_publishtime":1,"l_endtime":1,"s_associatedCourses":1,"i_clickRate":1,"s_videoUrl":1,"s_fileUrl":1,"s_courseDate":1,"i_tradeRate":1}`)
|
|
|
this.T["picUrl"] = (*rData)["s_picUrl"]
|
|
|
+ this.T["picUrl2"] = (*rData)["s_picUrl2"]
|
|
|
this.T["name"] = (*rData)["s_name"]
|
|
|
this.T["videoUrl"] = (*rData)["s_videoUrl"]
|
|
|
this.T["fileUrl"] = (*rData)["s_fileUrl"]
|