【OK】
()
| 1006 | |
| 1007 | // 【OK】 |
| 1008 | func (this *CommonController) Banners() { |
| 1009 | t := this.GetString("type", "wechat") |
| 1010 | banners, _ := models.NewBanner().Lists(t) |
| 1011 | bannerSize, _ := strconv.ParseFloat(models.GetOptionValue("MOBILE_BANNER_SIZE", "2.619"), 64) |
| 1012 | if bannerSize <= 0 { |
| 1013 | bannerSize = 2.619 |
| 1014 | } |
| 1015 | |
| 1016 | for idx, banner := range banners { |
| 1017 | banner.Image = this.completeLink(banner.Image) |
| 1018 | banners[idx] = banner |
| 1019 | } |
| 1020 | |
| 1021 | this.Response(http.StatusOK, messageSuccess, map[string]interface{}{"banners": banners, "size": bannerSize}) |
| 1022 | } |
| 1023 | |
| 1024 | func (this *CommonController) Download() { |
| 1025 | identify := this.GetString("identify") |
nothing calls this directly
no test coverage detected