瀏覽代碼

线上课程发布时间可以为null

weixianghui 5 年之前
父節點
當前提交
f320557fce

+ 2 - 1
core/src/qfw/manage/course.go

@@ -521,7 +521,8 @@ func (this *CourseManage) CreateOnLineApi() {
 		}
 		publishtime, err := time.ParseInLocation(qutil.Date_Full_Layout, s_publishtime, time.Local)
 		if err != nil {
-			return &FuncResult{false, errors.New("发布时间异常"), nil}
+			//return &FuncResult{false, errors.New("发布时间异常"), nil}
+			publishtime , err = time.ParseInLocation(qutil.Date_Full_Layout, time.Now().Format("2006-01-02 15:04:05"), time.Local)
 		}
 		l_endTime, err := time.ParseInLocation(qutil.Date_Full_Layout, endTime, time.Local)
 		if err != nil {

+ 2 - 1
core/src/web/staticres/css/issue.css

@@ -16,10 +16,11 @@
   line-height: 38px;
 }
 .issue .items .items-right {
+  flex: 1;
   margin-left: 16px;
 }
 .issue .items .items-right input {
-  width: 900px;
+  width: 80%;
   background-color: #fff;
 }
 .issue .items .items-right input.price {

+ 6 - 4
core/src/web/templates/manage/course/onLineContent.html

@@ -365,10 +365,12 @@
             $($Obj).removeAttr("disabled");
             return
         }
-        if (!publishtime) {
-            bootbox.alert("请输入发布时间");
-            $($Obj).removeAttr("disabled");
-            return
+        if (Dotype == "edit"){
+            if (!publishtime) {
+                bootbox.alert("请输入发布时间");
+                $($Obj).removeAttr("disabled");
+                return
+            }
         }
 
         var param = {