Browse Source

文章

master
huangjiajun 1 day ago
parent
commit
5f8fe2d964
2 changed files with 6 additions and 1 deletions
  1. +1
    -0
      app/router/router.go
  2. +5
    -1
      app/svc/article/svc_list.go

+ 1
- 0
app/router/router.go View File

@@ -262,6 +262,7 @@ func rInstitutionalManagement(r *gin.RouterGroup) { //制度管理
rModuleSetting := r.Group("/moduleSetting")
{
rModuleSetting.GET("/getModuleSetting", module_setting.ModuleSettingGet)
rModuleSetting.POST("/getArticle", article.List)
rModuleSetting.POST("/updateModuleSetting", module_setting.ModuleSettingUpdate)
}
}


+ 5
- 1
app/svc/article/svc_list.go View File

@@ -59,6 +59,10 @@ func List(c *gin.Context) {
}
if notice != nil {
for _, v := range *notice {
isHide := "1"
if v.Pid == 4 {
isHide = "0"
}
tmp := md.ArticleList{
CateId: utils.IntToStr(v.CateId),
Title: v.Title,
@@ -69,7 +73,7 @@ func List(c *gin.Context) {
Sort: utils.IntToStr(v.Sort),
IsShow: utils.IntToStr(v.IsShow),
Pid: utils.IntToStr(v.Pid),
Url: fmt.Sprintf("%s%s?id=%s&is_hide=0", svc.GetSysCfgStr("wap_host"), "/#/pages/course-detail-page/course-detail-page", utils.AnyToString(v.Id)),
Url: fmt.Sprintf("%s%s?id=%s&is_hide=%s", svc.GetSysCfgStr("wap_host"), "/#/pages/course-detail-page/course-detail-page", utils.AnyToString(v.Id), isHide),
}
noticeList = append(noticeList, tmp)
}


Loading…
Cancel
Save