caipin 4 anni fa
parent
commit
036a0e4de2
2 ha cambiato i file con 2 aggiunte e 4 eliminazioni
  1. 1 3
      web/api/annex_api.go
  2. 1 1
      web/viewmodels/safe.go

+ 1 - 3
web/api/annex_api.go

@@ -8,7 +8,6 @@ package api
 
 import (
 	"fmt"
-	"strconv"
 
 	"github.com/kataras/iris/v12"
 	"go.mod/services"
@@ -41,8 +40,7 @@ func (c *AnnexApi) Get() {
 		return
 	}
 	dataId, err := utils.GetDecryptId(annexData.DataId)
-	dataType, err := strconv.Atoi(annexData.DataType)
-	data = c.ServiceAnnex.Get(dataType, dataId)
+	data = c.ServiceAnnex.Get(int(annexData.DataType), dataId)
 	c.Ctx.JSON(iris.Map{
 		"code": 0,
 		"msg":  "请求成功",

+ 1 - 1
web/viewmodels/safe.go

@@ -2,7 +2,7 @@
  * @description: 安全巡检
  * @Author: LanJianRong
  * @Date: 2020-11-18
- * @FilePath: \construction_management\web\viewmodels\project.go
+ * @FilePath: \construction_management\web\viewmodels\safe.go
  */
 package viewmodels