|
|
@@ -28,17 +28,17 @@ func Config(c *gin.Context) { |
|
|
|
res := md.ConfigResp{} |
|
|
|
eg := db.Db |
|
|
|
NewArticleDb := implement.NewArticleDb(eg) |
|
|
|
article, _ := NewArticleDb.ArticleByTypeId("1") |
|
|
|
article, _ := NewArticleDb.GetArticle("112") |
|
|
|
if article != nil { |
|
|
|
res.Title = article.Title |
|
|
|
res.Content = article.Content |
|
|
|
} |
|
|
|
userArticle, _ := NewArticleDb.ArticleByTypeId("2") |
|
|
|
userArticle, _ := NewArticleDb.GetArticle("113") |
|
|
|
if userArticle != nil { |
|
|
|
res.UserTitle = userArticle.Title |
|
|
|
res.UserUrl = fmt.Sprintf("%s%s?id=%s&is_hide=1", svc.GetSysCfgStr("wap_host"), "/#/pages/course-detail-page/course-detail-page", utils.AnyToString(userArticle.Id)) |
|
|
|
} |
|
|
|
privacyArticle, _ := NewArticleDb.ArticleByTypeId("3") |
|
|
|
privacyArticle, _ := NewArticleDb.GetArticle("114") |
|
|
|
if privacyArticle != nil { |
|
|
|
res.PrivacyTitle = privacyArticle.Title |
|
|
|
res.PrivacyUrl = fmt.Sprintf("%s%s?id=%s&is_hide=1", svc.GetSysCfgStr("wap_host"), "/#/pages/course-detail-page/course-detail-page", utils.AnyToString(userArticle.Id)) |
|
|
|