yaojianjun пре 9 месеци
родитељ
комит
683c923121
2 измењених фајлова са 19 додато и 19 уклоњено
  1. 18 18
      Tech/controllers/课程.go
  2. 1 1
      Tech/views/index.tpl

+ 18 - 18
Tech/controllers/课程.go

@@ -1913,15 +1913,15 @@ func (c *CourseController) GetTMSCoursePlan() {
 	}
 	}
 	var req Request
 	var req Request
 
 
-	if CurrentLoginMode == 0 {
-		c.Ctx.Output.SetStatus(500)
-		c.Data["json"] = map[string]interface{}{
-			"code": 500,
-			"msg":  "本地模式不支持该功能 ",
-		}
-		c.ServeJSON()
-		return
-	}
+	// if CurrentLoginMode == 1 {
+	// 	c.Ctx.Output.SetStatus(500)
+	// 	c.Data["json"] = map[string]interface{}{
+	// 		"code": 500,
+	// 		"msg":  "本地模式不支持该功能 ",
+	// 	}
+	// 	c.ServeJSON()
+	// 	return
+	// }
 
 
 	// 从app.conf中读取SYSDEVICEID作为SBID的值
 	// 从app.conf中读取SYSDEVICEID作为SBID的值
 	sbid, err := beego.AppConfig.String("SYSDEVICEID")
 	sbid, err := beego.AppConfig.String("SYSDEVICEID")
@@ -2057,15 +2057,15 @@ func (c *CourseController) GetTMSCoursePlanStudent() {
 		PXSSID string `json:"PXSSID"`
 		PXSSID string `json:"PXSSID"`
 	}
 	}
 
 
-	if CurrentLoginMode == 0 {
-		c.Ctx.Output.SetStatus(500)
-		c.Data["json"] = map[string]interface{}{
-			"code": 500,
-			"msg":  "本地模式不支持该功能 ",
-		}
-		c.ServeJSON()
-		return
-	}
+	// if CurrentLoginMode == 1 {
+	// 	c.Ctx.Output.SetStatus(500)
+	// 	c.Data["json"] = map[string]interface{}{
+	// 		"code": 500,
+	// 		"msg":  "本地模式不支持该功能 ",
+	// 	}
+	// 	c.ServeJSON()
+	// 	return
+	// }
 
 
 	if err := json.Unmarshal(c.Ctx.Input.RequestBody, &req); err != nil {
 	if err := json.Unmarshal(c.Ctx.Input.RequestBody, &req); err != nil {
 		c.Ctx.Output.SetStatus(400)
 		c.Ctx.Output.SetStatus(400)

+ 1 - 1
Tech/views/index.tpl

@@ -129,7 +129,7 @@
   <script>
   <script>
     // 接口默认参数配置
     // 接口默认参数配置
     const defaultParams = {
     const defaultParams = {
-      "/auth/login": '{"username": "admin", "password": "admin"}',
+      "/auth/login": '{"username": "00001", "password": "123", "LoginMode": 1}',
       "/course/list": '{}',
       "/course/list": '{}',
       "/course/listpage": '{"page": 1, "pageSize": 10}',
       "/course/listpage": '{"page": 1, "pageSize": 10}',
       "/course/detail/get": '{"id": 1}',
       "/course/detail/get": '{"id": 1}',