|
@@ -190,14 +190,14 @@ func GetUserTokenByMobile(mobile string) (token string, err error) {
|
|
|
}
|
|
|
|
|
|
//获取图表收藏
|
|
|
-func GetChartCollectionByApi(mobile string) (items []*models.HomeChartListResp, err error, total int) {
|
|
|
+func GetChartCollectionByApi(mobile string, take, skip int) (items []*models.HomeChartListResp, err error, total int) {
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
fmt.Println("GetChartPtagByApi Err:" + err.Error())
|
|
|
go utils.SendEmail(utils.APPNAME+"【"+utils.RunMode+"】"+"失败提醒", "GetChartPtagByApi ErrMsg:"+err.Error(), utils.EmailSendToUsers)
|
|
|
}
|
|
|
}()
|
|
|
- url := utils.ApiUrl + "charts/favorites"
|
|
|
+ url := utils.ApiUrl + "charts/favorites?take=" + strconv.Itoa(take) + "&skip=" + strconv.Itoa(skip)
|
|
|
authorization, err := GetUserTokenByMobile(mobile)
|
|
|
if err != nil {
|
|
|
fmt.Println(err)
|
|
@@ -224,8 +224,8 @@ func GetChartCollectionByApi(mobile string) (items []*models.HomeChartListResp,
|
|
|
item.CreateDate = v.ChartInfo.CreateDate
|
|
|
item.PtagName = v.ChartInfo.Ptag.Name
|
|
|
item.CtagName = v.ChartInfo.Ctag.Name
|
|
|
- item.BodyHtml = "https://vmp.hzinsights.com/v2/charts/" + strconv.Itoa(v.ChartId)
|
|
|
- item.HttpUrl = v.ChartInfo.Iframe
|
|
|
+ item.BodyHtml = v.ChartInfo.Cover
|
|
|
+ item.HttpUrl = "https://vmp.hzinsights.com/v2/charts/" + strconv.Itoa(v.ChartId)
|
|
|
item.IsNeedJump = true
|
|
|
items = append(items, item)
|
|
|
}
|