diff --git a/gin_server_admin/api/v1/archiveapi/archiveapihandle.go b/gin_server_admin/api/v1/archiveapi/archiveapihandle.go index 81b5ec9..ccf1305 100644 --- a/gin_server_admin/api/v1/archiveapi/archiveapihandle.go +++ b/gin_server_admin/api/v1/archiveapi/archiveapihandle.go @@ -218,3 +218,61 @@ func (a *ArchiveApiHandle) EiteArchiveInfo(c *gin.Context) { } response.Result(0, err, "修改成功!", c) } + +//批量修改栏目 +func (a *ArchiveApiHandle) BatchEiteArchiveState(c *gin.Context) { + var arrData batchArchiveState + err := c.ShouldBindJSON(&arrData) + if err != nil { + response.Result(101, err, "参数错误!请重新提交!", c) + return + } + if len(arrData.Id) < 1 { + response.Result(102, arrData, "参数错误!请重新提交!", c) + return + } + if arrData.State == 0 { + arrData.State = 1 + } + var archiveInfo archivesmodel.ArchivesType + if arrData.IsDel != 1 { + isTrue, saveErr := batchArchiveStateSet(archiveInfo, arrData) + if isTrue != true { + response.Result(103, saveErr, "修改失败!", c) + return + } + response.Result(0, arrData, "修改成功!", c) + } else { + if arrData.State == 3 { + archiveInfoErr := global.GVA_DB_Master.Where("at_id IN ?", arrData.Id).Delete(&archiveInfo).Error + if archiveInfoErr != nil { + response.Result(104, arrData, "删除失败!", c) + return + } + response.Result(0, arrData, "删除成功!", c) + } else { + isTrue, saveErr := batchArchiveStateSet(archiveInfo, arrData) + if isTrue != true { + response.Result(105, saveErr, "修改失败!", c) + return + } + response.Result(0, arrData, "修改成功!", c) + } + + } +} + +//批量状态软操作 +func batchArchiveStateSet(archiveInfo archivesmodel.ArchivesType, arrData batchArchiveState) (isTrue bool, archiveInfoErr error) { + isTrue = false + //软处理 + saveData := commonus.MapOut() + saveData["at_stater"] = arrData.State + saveData["at_time"] = time.Now().Unix() + archiveInfoErr = global.GVA_DB_Master.Model(&archiveInfo).Where("at_id IN ?", arrData.Id).Updates(saveData).Error + if archiveInfoErr != nil { + return + } + isTrue = true + return +} diff --git a/gin_server_admin/api/v1/archiveapi/graphicinformation.go b/gin_server_admin/api/v1/archiveapi/graphicinformation.go index b2d92c0..1e0f997 100644 --- a/gin_server_admin/api/v1/archiveapi/graphicinformation.go +++ b/gin_server_admin/api/v1/archiveapi/graphicinformation.go @@ -1,6 +1,8 @@ package archiveapi import ( + "time" + "github.com/flipped-aurora/gin-vue-admin/server/commonus" "github.com/flipped-aurora/gin-vue-admin/server/global" "github.com/flipped-aurora/gin-vue-admin/server/model/archivesmodel" @@ -145,3 +147,256 @@ func getBookArrter(id int64) (Reading, Comment, Collect, Likes, Tread, Score int } return } + +//添加文档 +func (g *GraphicInformation) AddArchiveFileInfo(c *gin.Context) { + var archiveFileInfo archivesmodel.ArchiveFile + archiveFileInfo.InitInfo() + err := c.ShouldBindJSON(&archiveFileInfo) + + if err != nil { + response.Result(101, archiveFileInfo, "参数错误!请重新提交!", c) + return + } + if archiveFileInfo.Title == "" { + response.Result(102, archiveFileInfo, "请输入文档标题!", c) + return + } + if archiveFileInfo.Parent == 0 { + response.Result(103, archiveFileInfo, "请输入文档所属顶级分类!", c) + return + } + if archiveFileInfo.ParentSun == 0 { + response.Result(104, archiveFileInfo, "请输入文档所属分类!", c) + return + } + if archiveFileInfo.Source == 2 && archiveFileInfo.SourceUrl == "" { + response.Result(105, archiveFileInfo, "请输入文档转载地址!", c) + return + } + if archiveFileInfo.Source != 2 && archiveFileInfo.Content == "" && archiveFileInfo.TestUrl == "" { + response.Result(106, archiveFileInfo, "正文内容不能为空", c) + return + } + if archiveFileInfo.UserKey == 0 { + response.Result(109, archiveFileInfo, "请确认编辑人员KEY!", c) + return + } + if archiveFileInfo.State <= 0 || archiveFileInfo.State > 4 { + archiveFileInfo.State = 2 + } + if archiveFileInfo.OuterLink != "" { + urlIsTrue := commonus.JudgeHttpOrHttps(archiveFileInfo.OuterLink) + if urlIsTrue != true { + response.Result(107, archiveFileInfo, "您输入的外链格式不正确!", c) + return + } + } + addArchiveFileErr := global.GVA_DB_BooImgkDate.Create(&archiveFileInfo).Error + if addArchiveFileErr != nil { + response.Result(108, archiveFileInfo, "数据写入失败!", c) + } else { + response.Result(0, archiveFileInfo, "数据写入成功!", c) + } +} + +//获取文档信息 +func (g *GraphicInformation) GetArchiveFileInfo(c *gin.Context) { + var getID commonus.SetId + err := c.ShouldBindJSON(&getID) + + if err != nil { + response.Result(101, getID, "参数错误!请重新提交!", c) + return + } + if getID.Id == 0 { + response.Result(101, getID, "参数错误!请重新提交!", c) + return + } + var archiveFileInfo archivesmodel.ArchiveFile + archiveFileInfo.InitInfo() + sysUserErr := global.GVA_DB_BooImgkDate.Where("g_id = ?", getID.Id).First(&archiveFileInfo).Error + if sysUserErr != nil { + response.Result(102, sysUserErr, "数据查询失败!", c) + } else { + response.Result(0, archiveFileInfo, "数据查询成功!", c) + } +} + +//修改文档信息 +func (g *GraphicInformation) EiteArchiveFileInfo(c *gin.Context) { + var archiveFileInfo archivesmodel.ArchiveFile + err := c.ShouldBindJSON(&archiveFileInfo) + if err != nil { + response.Result(101, archiveFileInfo, "参数错误!请重新提交!", c) + return + } + if archiveFileInfo.Id == 0 { + response.Result(108, archiveFileInfo, "!请提交文档ID!", c) + return + } + if archiveFileInfo.Title == "" { + response.Result(102, archiveFileInfo, "请输入文档标题!", c) + return + } + if archiveFileInfo.Parent == 0 { + response.Result(103, archiveFileInfo, "请输入文档所属顶级分类!", c) + return + } + if archiveFileInfo.ParentSun == 0 { + response.Result(104, archiveFileInfo, "请输入文档所属分类!", c) + return + } + if archiveFileInfo.Source == 2 && archiveFileInfo.SourceUrl == "" { + response.Result(105, archiveFileInfo, "请输入文档转载地址!", c) + return + } + if archiveFileInfo.Source != 2 && archiveFileInfo.Content == "" && archiveFileInfo.TestUrl == "" { + response.Result(106, archiveFileInfo, "正文内容不能为空", c) + return + } + if archiveFileInfo.UserKey == 0 { + response.Result(109, archiveFileInfo, "请确认编辑人员KEY!", c) + return + } + if archiveFileInfo.State <= 0 || archiveFileInfo.State > 4 { + archiveFileInfo.State = 2 + } + if archiveFileInfo.OuterLink != "" { + urlIsTrue := commonus.JudgeHttpOrHttps(archiveFileInfo.OuterLink) + if urlIsTrue != true { + response.Result(107, archiveFileInfo, "您输入的外链格式不正确!", c) + return + } + } + // addArchiveFileErr := global.GVA_DB_BooImgkDate.Create(&archiveFileInfo).Error + // if addArchiveFileErr != nil { + // response.Result(108, archiveFileInfo, "数据写入失败!", c) + // } else { + // response.Result(0, archiveFileInfo, "数据写入成功!", c) + // } + archiveFileInfo.EiteTime = time.Now().Unix() + var archiveFileMod archivesmodel.ArchiveFile + addArchiveFileErr := global.GVA_DB_BooImgkDate.Model(&archiveFileMod).Where("g_id = ?", archiveFileInfo.Id).Updates(archiveFileInfo).Error + if addArchiveFileErr != nil { + response.Result(110, addArchiveFileErr, "数据写入失败!", c) + return + } + response.Result(0, archiveFileInfo, "数据写入成功!", c) +} + +//状态修改及软硬删除文档信息 +func (g *GraphicInformation) ModifyArchiveFileInfo(c *gin.Context) { + var arrData archiveState + err := c.ShouldBindJSON(&arrData) + if err != nil { + response.Result(101, err, "参数错误!请重新提交!", c) + return + } + if arrData.Id == 0 { + response.Result(102, arrData, "参数错误!请重新提交!", c) + return + } + if arrData.State == 0 { + arrData.State = 3 + } + if arrData.IsDel != 1 { + isTrue := eiteArchiveFileState(arrData) + if isTrue != true { + response.Result(103, isTrue, "修改失败!", c) + return + } + response.Result(0, arrData, "修改成功!", c) + } else { + if arrData.State == 4 { + var archiveFileMod archivesmodel.ArchiveFile + archiveInfoErr := global.GVA_DB_BooImgkDate.Where("g_id = ?", arrData.Id).Delete(&archiveFileMod).Error + if archiveInfoErr != nil { + response.Result(104, arrData, "删除失败!", c) + return + } + response.Result(0, arrData, "删除成功!", c) + } else { + isTrue := eiteArchiveFileState(arrData) + if isTrue != true { + response.Result(105, isTrue, "修改失败!", c) + return + } + response.Result(0, arrData, "修改成功!", c) + } + } +} + +//修改文档状态 +func eiteArchiveFileState(arrData archiveState) (isTrue bool) { + isTrue = false + //软处理 + saveData := commonus.MapOut() + saveData["g_state"] = arrData.State + saveData["g_eite_time"] = time.Now().Unix() + var archiveFileMod archivesmodel.ArchiveFile + archiveInfoErr := global.GVA_DB_BooImgkDate.Model(&archiveFileMod).Where("g_id = ?", arrData.Id).Updates(saveData).Error + if archiveInfoErr != nil { + return + } + isTrue = true + return +} + +//批量删除 +func (g *GraphicInformation) BatchDeleteArchiveFile(c *gin.Context) { + var arrData batchArchiveState + err := c.ShouldBindJSON(&arrData) + if err != nil { + response.Result(101, err, "参数错误!请重新提交!", c) + return + } + if len(arrData.Id) < 1 { + response.Result(102, arrData, "参数错误!请重新提交!", c) + return + } + if arrData.State == 0 { + arrData.State = 3 + } + if arrData.IsDel != 1 { + isTrue := batchEiteArchiveFileState(arrData) + if isTrue != true { + response.Result(103, isTrue, "修改失败!", c) + return + } + response.Result(0, arrData, "修改成功!", c) + } else { + if arrData.State == 4 { + var archiveFileMod archivesmodel.ArchiveFile + archiveInfoErr := global.GVA_DB_BooImgkDate.Where("g_id IN ?", arrData.Id).Delete(&archiveFileMod).Error + if archiveInfoErr != nil { + response.Result(104, arrData, "删除失败!", c) + return + } + response.Result(0, arrData, "删除成功!", c) + } else { + isTrue := batchEiteArchiveFileState(arrData) + if isTrue != true { + response.Result(105, isTrue, "修改失败!", c) + return + } + response.Result(0, arrData, "修改成功!", c) + } + } +} + +//批量修改文档状态 +func batchEiteArchiveFileState(arrData batchArchiveState) (isTrue bool) { + isTrue = false + //软处理 + saveData := commonus.MapOut() + saveData["g_state"] = arrData.State + saveData["g_eite_time"] = time.Now().Unix() + var archiveFileMod archivesmodel.ArchiveFile + archiveInfoErr := global.GVA_DB_BooImgkDate.Model(&archiveFileMod).Where("g_id IN ?", arrData.Id).Updates(saveData).Error + if archiveInfoErr != nil { + return + } + isTrue = true + return +} diff --git a/gin_server_admin/api/v1/archiveapi/requestdata.go b/gin_server_admin/api/v1/archiveapi/requestdata.go index 33eb5f9..7f97b6e 100644 --- a/gin_server_admin/api/v1/archiveapi/requestdata.go +++ b/gin_server_admin/api/v1/archiveapi/requestdata.go @@ -33,6 +33,13 @@ type archiveState struct { IsDel int `json:"isdel"` // 是否强制删除 } +//批量 +type batchArchiveState struct { + commonus.BatchId + State int `json:"state"` // 状态 + IsDel int `json:"isdel"` // 是否强制删除 +} + //修改栏目 type eiteArchiveCont struct { commonus.SetId diff --git a/gin_server_admin/api/v1/fileuploaddownload/fileupdowntype.go b/gin_server_admin/api/v1/fileuploaddownload/fileupdowntype.go index 65aa0ce..e76a8c5 100644 --- a/gin_server_admin/api/v1/fileuploaddownload/fileupdowntype.go +++ b/gin_server_admin/api/v1/fileuploaddownload/fileupdowntype.go @@ -3,7 +3,6 @@ package fileuploaddownload import ( "bytes" "encoding/json" - "fmt" "io" "io/ioutil" "mime/multipart" @@ -112,7 +111,7 @@ func postFormDataWithSingleFile(filePath string, fileType int) (CallBackFileData } // var CallBackFileData CallBackFileData jsonErr := json.Unmarshal(b, &CallBackFileData) - fmt.Println(string(b)) + // fmt.Println(string(b)) // fmt.Println(CallBackFileData) if jsonErr != nil { CallBackFileData.Code = 105 diff --git a/gin_server_admin/api/v1/fileuploaddownload/fileuploaddown.go b/gin_server_admin/api/v1/fileuploaddownload/fileuploaddown.go index 7c2196f..a1cbd50 100644 --- a/gin_server_admin/api/v1/fileuploaddownload/fileuploaddown.go +++ b/gin_server_admin/api/v1/fileuploaddownload/fileuploaddown.go @@ -3,6 +3,7 @@ package fileuploaddownload import ( "os" "path" + "strconv" "time" "github.com/flipped-aurora/gin-vue-admin/server/commonus" @@ -13,21 +14,21 @@ import ( type FileUploadDownload struct{} type urlData struct { - Type int `json:"typeese"` + Type int `json:"type"` Sign string `json:"sign"` } //上传文件(远程) func (f *FileUploadDownload) LongRangeFileUpload(c *gin.Context) { + _, fileHeader, fileErr := c.Request.FormFile("file") + typePostForm := c.PostForm("type") var urlData urlData - // c.ShouldBindJSON(&urlData) if urlData.Type == 0 { - urlData.Type = 5 + typePostFormInt, _ := strconv.Atoi(typePostForm) + urlData.Type = typePostFormInt } - _, fileHeader, fileErr := c.Request.FormFile("file") - if fileErr != nil { response.Result(101, fileHeader, "获取文件错误!", c) return @@ -51,13 +52,13 @@ func (f *FileUploadDownload) LongRangeFileUpload(c *gin.Context) { // outPut["fileAttr"] = fileAttr fileCallBack := postFormDataWithSingleFile(filePath, urlData.Type) - // outPut["msg"] = fileCallBack.Msg + // outPut["msg"] = urlData if fileCallBack.Code != 0 && fileCallBack.Code != 1 { response.Result(102, outPut, fileCallBack.Msg, c) return } - var fileAttr FileAttribute + // var fileAttr FileAttribute //获取文件基础属性 var upLoadFileStruct UpLoadFileStruct @@ -66,7 +67,7 @@ func (f *FileUploadDownload) LongRangeFileUpload(c *gin.Context) { upLoadFileStruct.UpdatedAt = time.Now() upLoadFileStruct.Key = fileCallBack.Data.NewName upLoadFileStruct.Name = fileHeader.Filename - upLoadFileStruct.Tag = path.Ext(fileAttr.FileName) + upLoadFileStruct.Tag = path.Ext(fileHeader.Filename) upLoadFileStruct.Url = fileCallBack.Data.Callbackurl upLoadFileStruct.PhysicsPath = fileCallBack.Data.Physicspath upLoadFileStruct.FileSize = fileCallBack.Data.GetSize @@ -75,5 +76,5 @@ func (f *FileUploadDownload) LongRangeFileUpload(c *gin.Context) { os.RemoveAll(filePath) //删除转接文件 outPut["file"] = upLoadFileStruct // fmt.Printf("返回值====》%v\n", outPut) - response.Result(0, outPut, fileCallBack.Msg, c) + response.Result(0, upLoadFileStruct, fileCallBack.Msg, c) } diff --git a/gin_server_admin/commonus/md5Sub.go b/gin_server_admin/commonus/md5Sub.go index 8b94d99..d7d16d7 100644 --- a/gin_server_admin/commonus/md5Sub.go +++ b/gin_server_admin/commonus/md5Sub.go @@ -32,7 +32,7 @@ import ( //获取编号(副本) func GetFileNumberEs() (num int64) { // esult, _ := rand.Int(rand.Reader, big.NewInt(100)) - result, _ := rand.Int(rand.Reader, big.NewInt(1000)) + result, _ := rand.Int(rand.Reader, big.NewInt(10000)) result64 := result.Int64() // timeVal := time.Now().Unix() timeVal := time.Now().UnixNano() / 1e6 diff --git a/gin_server_admin/commonus/publichaneld.go b/gin_server_admin/commonus/publichaneld.go index d9a71b5..611e8a9 100644 --- a/gin_server_admin/commonus/publichaneld.go +++ b/gin_server_admin/commonus/publichaneld.go @@ -3,6 +3,7 @@ package commonus //公共函数类 import ( "encoding/json" + "regexp" "strconv" "strings" "time" @@ -564,3 +565,19 @@ func (g *GormTopMap) PublicOrmToMapOne() (returnData map[string]interface{}) { } return } + +//判断地址中是否还有http或https +func JudgeHttpOrHttps(urlStr string) (isTrue bool) { + isTrue = false + re := regexp.MustCompile(`(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?`) + result := re.FindAllStringSubmatch(urlStr, -1) + + // fmt.Printf("urlStr ======>%v\n", result) + // for _,regVal := range result{ + // if regVal + // } + if result == nil { + isTrue = true + } + return +} diff --git a/gin_server_admin/commonus/publicstruct.go b/gin_server_admin/commonus/publicstruct.go index 8a042b3..9f05054 100644 --- a/gin_server_admin/commonus/publicstruct.go +++ b/gin_server_admin/commonus/publicstruct.go @@ -4,3 +4,8 @@ package commonus type SetId struct { Id int64 `json:"id"` } + +//批量ID +type BatchId struct { + Id []int64 `json:"id"` +} diff --git a/gin_server_admin/model/archivesmodel/archives.go b/gin_server_admin/model/archivesmodel/archives.go index 25f3acb..1144c4c 100644 --- a/gin_server_admin/model/archivesmodel/archives.go +++ b/gin_server_admin/model/archivesmodel/archives.go @@ -1,6 +1,9 @@ package archivesmodel import ( + "time" + + "github.com/flipped-aurora/gin-vue-admin/server/commonus" "github.com/flipped-aurora/gin-vue-admin/server/global" ) @@ -67,6 +70,44 @@ func (ArchiveFile *ArchiveFile) TableName() string { return "graphicform" } +//初始化表单 +func (a *ArchiveFile) InitInfo() { + a.Id = commonus.GetFileNumberEs() + a.Title = "" + a.Key = "" + a.Describe = "" + a.Parent = 0 + a.ParentSun = 0 + a.Source = 1 + a.SourceUrl = "" + a.Thumbnail = "" + a.Sort = 50 + a.Comment = 1 + a.VisitStrat = 1 + a.State = 2 + a.Time = time.Now().Unix() + a.EiteTime = time.Now().Unix() + a.UserKey = 0 + a.FactoryID = 0 + a.PositionID = 0 + a.TeamId = 0 + a.DownloadState = 1 + a.Read = 0 + a.Discuss = 0 + a.Collection = 0 + a.Likes = 0 + a.Recommend = 2 + a.Content = "" + a.StepOn = 0 + a.Ranges = "" + a.WriteFactoryID = 0 + a.TextName = "" + a.TestUrl = "" + a.PhysicsPath = "" + a.WriteGroup = 3 + a.OuterLink = "" +} + //获取文档详细信息 func (a *ArchiveFile) GetArchiveFileInfo() (err error) { err = global.GVA_DB_BooImgkDate.Where("g_id = ?", a.Id).First(&a).Error diff --git a/gin_server_admin/model/systemuser/systemuser.go b/gin_server_admin/model/systemuser/systemuser.go new file mode 100644 index 0000000..c67929e --- /dev/null +++ b/gin_server_admin/model/systemuser/systemuser.go @@ -0,0 +1,60 @@ +package systemuser + +import "github.com/flipped-aurora/gin-vue-admin/server/global" + +//系统用户表 +type SystemUser struct { + Id int64 `json:"id" gorm:"column:u_id;type:bigint(20) unsigned;not null;comment:Id"` + Name string `json:"name" gorm:"column:u_name;type:varchar(36);not null;comment:用户名"` + PassWord string `json:"passWord" gorm:"column:u_password;type:varchar(30);not null;comment:密码"` + Role int64 `json:"role" gorm:"column:u_role;type:bigint(20) unsigned;not null;default:1;comment:用户类型"` + State int `json:"state" gorm:"column:u_set;type:tinyint(1) unsigned;default:1;not null;comment:是否启用(1:启用;2:禁用;3:删除)"` + Attribute int64 `json:"attribute" gorm:"column:u_attribute;type:bigint(20) unsigned;not null;default:0;comment:账号属性"` + Time int64 `json:"time" gorm:"column:u_time;type:bigint(30) unsigned;default:0;not null;comment:创建时间"` + EiteTime int64 `json:"eiteTime" gorm:"column:u_eite_time;type:bigint(30) unsigned;default:0;not null;comment:修改时间"` + Key int64 `json:"key" gorm:"column:u_key;type:bigint(50) unsigned;default:0;not null;comment:唯一识别码"` + Group int64 `json:"group" gorm:"column:u_group;type:bigint(20) unsigned;not null;default:0;comment:集团公司"` + Wand int `json:"wand" gorm:"column:u_wand;type:tinyint(3) unsigned;default:0;not null;comment:权重"` +} + +func (SystemUser *SystemUser) TableName() string { + return "system_user" +} + +//获取详细信息 +func (SystemUser *SystemUser) GetInfo(whereMap map[string]interface{}) (isTrue bool) { + isTrue = false + if len(whereMap) < 1 { + return + } + sysUserErr := global.GVA_DB_Master.Where(whereMap).First(&SystemUser).Error + if sysUserErr == nil { + isTrue = true + } + return +} + +//系统管理员属性资料 +type SystemUserAttribute struct { + Id int64 `json:"id" gorm:"column:ua_id;type:bigint(50) unsigned;not null;comment:Id"` + Name string `json:"name" gorm:"column:ua_name;type:varchar(20);not null;comment:姓名"` + Tel string `json:"tel" gorm:"column:ua_tel;type:varchar(30);not null;default:0;comment:电话"` + Time int64 `json:"time" gorm:"column:ua_time;type:bigint(20) unsigned;default:0;not null;comment:创建时间"` +} + +func (SystemUserAttribute *SystemUserAttribute) TableName() string { + return "system_user_attribute" +} + +//获取详细信息 +func (SystemUser *SystemUserAttribute) GetInfo(whereMap map[string]interface{}) (isTrue bool) { + isTrue = false + if len(whereMap) < 1 { + return + } + sysUserErr := global.GVA_DB_Master.Where(whereMap).First(&SystemUser).Error + if sysUserErr == nil { + isTrue = true + } + return +} diff --git a/gin_server_admin/router/archive/archiverouter.go b/gin_server_admin/router/archive/archiverouter.go index 7be9724..e268dc2 100644 --- a/gin_server_admin/router/archive/archiverouter.go +++ b/gin_server_admin/router/archive/archiverouter.go @@ -15,19 +15,22 @@ func (a *ArchiveStruct) InitGroupRouter(Router *gin.RouterGroup) { groupCodeRouter.GET("", authorityApi.Index) groupCodeRouter.POST("/", authorityApi.Index) groupCodeRouter.GET("/", authorityApi.Index) - groupCodeRouter.POST("archivetypelist", authorityApi.ArchiveTypeList) //获取文档栏目列表 - groupCodeRouter.POST("addarchivetype", authorityApi.AddArchive) //添加栏目 - groupCodeRouter.POST("getarchiveinfo", authorityApi.GetArchiveInfo) //获取单个栏目信息 - groupCodeRouter.POST("eitearchivestate", authorityApi.EiteArchiveState) //改变栏目状态 - groupCodeRouter.POST("eitearchiveinfo", authorityApi.EiteArchiveInfo) //修改栏目信息 - - // groupCodeRouter.POST("archivefilelist", authorityApi.ArchiveFileList) //文章列表 + groupCodeRouter.POST("archivetypelist", authorityApi.ArchiveTypeList) //获取文档栏目列表 + groupCodeRouter.POST("addarchivetype", authorityApi.AddArchive) //添加栏目 + groupCodeRouter.POST("getarchiveinfo", authorityApi.GetArchiveInfo) //获取单个栏目信息 + groupCodeRouter.POST("eitearchivestate", authorityApi.EiteArchiveState) //改变栏目状态 + groupCodeRouter.POST("eitearchiveinfo", authorityApi.EiteArchiveInfo) //修改栏目信息 + groupCodeRouter.POST("batcheitearchivestate", authorityApi.BatchEiteArchiveState) //批量处理栏目状态 } var arcjiveFileApi = v1.ApiGroupApp.ArchiveApi.GraphicInformation { - groupCodeRouter.POST("archivefilelist", arcjiveFileApi.ArchiveFileList) //文章列表 - + groupCodeRouter.POST("archivefilelist", arcjiveFileApi.ArchiveFileList) //文章列表 + groupCodeRouter.POST("addarchivefileinfo", arcjiveFileApi.AddArchiveFileInfo) //添加文章内容 + groupCodeRouter.POST("getarchivefileinfo", arcjiveFileApi.GetArchiveFileInfo) //获取文章内容 + groupCodeRouter.POST("eitearchivefileinfo", arcjiveFileApi.EiteArchiveFileInfo) //修改文章内容 + groupCodeRouter.POST("modifyArchiveFileInfo", arcjiveFileApi.ModifyArchiveFileInfo) //修改文章内容 + groupCodeRouter.POST("batchdeletearchivefile", arcjiveFileApi.BatchDeleteArchiveFile) //批量处理文章内容 } } diff --git a/web/src/view/example/upload/upload.vue b/web/src/view/example/upload/upload.vue index d5d9cd8..f21d286 100644 --- a/web/src/view/example/upload/upload.vue +++ b/web/src/view/example/upload/upload.vue @@ -5,7 +5,7 @@