This commit is contained in:
xuyucheng 2021-12-07 16:43:50 +08:00
parent 9f07af5e75
commit f442d1a980
3 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ job:
- docker stop esg-report-backend - docker stop esg-report-backend
- docker rm esg-report-backend - docker rm esg-report-backend
- docker build -t esg-report-backend . - docker build -t esg-report-backend .
- docker run -d --restart=always --network=host --name esg-report-backend esg-report-backend - docker run -d --restart=always 51002:51002 --name esg-report-backend esg-report-backend
only: only:
- master - master
tags: tags:

View File

@ -31,7 +31,7 @@ func SetNews(c *gin.Context){
var list Models.List var list Models.List
list.Title = c.PostForm("title") list.Title = c.PostForm("title")
list.Cover = c.PostForm("cover") list.Cover = c.PostForm("cover")
list.Picture = c.PostForm("img") list.Content = c.PostForm("img")
data := list.SetNews() data := list.SetNews()
c.JSON(http.StatusOK, gin.H{ c.JSON(http.StatusOK, gin.H{
"data": data, "data": data,

View File

@ -8,7 +8,7 @@ type List struct{
ID int `gorm:"primary_key"` ID int `gorm:"primary_key"`
Title string `gorm:"column:title"` Title string `gorm:"column:title"`
Cover string `gorm:"column:cover"` Cover string `gorm:"column:cover"`
Picture string `gorm:"column:picture"` Content string `gorm:"column:content"`
} }
//查询列表数据库 //查询列表数据库