Browse Source

no message

xingzai 1 year ago
parent
commit
91c9dfeee7
3 changed files with 40 additions and 4 deletions
  1. 27 4
      controllers/collection.go
  2. 9 0
      routers/commentsRouter.go
  3. 4 0
      utils/constants.go

+ 27 - 4
controllers/collection.go

@@ -35,11 +35,10 @@ func (this *CollectionController) BannerList() {
 	var listA []*models.CollectionBannerResp
 	listB := new(models.CollectionBannerResp)
 	listA = []*models.CollectionBannerResp{
-		&models.CollectionBannerResp{Title: "B1", IndexImg: "https://hzstatic.hzinsights.com/banner/yx/web_1.png", Path: "/index/"},
-		&models.CollectionBannerResp{Title: "B2", IndexImg: "https://hzstatic.hzinsights.com/banner/yx/web_2.png", Path: ""},
+		&models.CollectionBannerResp{Title: "", IndexImg: "https://hzstatic.hzinsights.com/cygx/banner/web/jxkb.png", Path: "https://web.hzinsights.com/activity"},
 	}
-	listB.Title = "B2"
-	listB.IndexImg = "https://hzstatic.hzinsights.com/banner/yx/web_3.png"
+	listB.Title = ""
+	listB.IndexImg = "https://hzstatic.hzinsights.com/cygx/banner/web/lyhf.png"
 	listB.IsShowSustainable = true
 	resp.ListA = listA
 	resp.ListB = listB
@@ -49,6 +48,30 @@ func (this *CollectionController) BannerList() {
 	br.Data = resp
 }
 
+// @Title 精选看板跳转详情地址
+// @Description 精选看板跳转详情地址接口
+// @Success Ret=200 {object} cygx.CollectionBannerListResp
+// @router /detail [get]
+func (this *CollectionController) Detail() {
+	br := new(models.BaseResponse).Init()
+	defer func() {
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+	user := this.User
+	if user == nil {
+		br.Msg = "请登录"
+		br.ErrMsg = "请登录,SysUser Is Empty"
+		br.Ret = 408
+		return
+	}
+	resp := new(models.CollectionDetailResp)
+	br.Ret = 200
+	br.Success = true
+	br.Msg = "获取成功"
+	br.Data = resp
+}
+
 // @Title 提交精选看板申请接口
 // @Description 提交精选看板申请接口
 // @Param	request	body cygx.CygxBannerIdReq true "type json string"

+ 9 - 0
routers/commentsRouter.go

@@ -349,6 +349,15 @@ func init() {
             Filters: nil,
             Params: nil})
 
+    beego.GlobalControllerRouter["hongze/hongze_clpt/controllers:CollectionController"] = append(beego.GlobalControllerRouter["hongze/hongze_clpt/controllers:CollectionController"],
+        beego.ControllerComments{
+            Method: "Detail",
+            Router: `/detail`,
+            AllowHTTPMethods: []string{"get"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
     beego.GlobalControllerRouter["hongze/hongze_clpt/controllers:ConfigController"] = append(beego.GlobalControllerRouter["hongze/hongze_clpt/controllers:ConfigController"],
         beego.ControllerComments{
             Method: "AboutUs",

+ 4 - 0
utils/constants.go

@@ -209,3 +209,7 @@ const (
 	TPL_MSG                     = "tpl_msg"                     //王芳手机号地址参数
 	TPL_MSG_NEI_RONG_ZU         = "tpl_msg_nei_rong_zu"         //内容组四人
 )
+
+const (
+	COLLECTIONS_INFO_HTTP_URL = "https://vmp.hzinsights.com/v2/collections" // 上海策略平台精选看板路由
+)