update: dis_plat.go

main
Leo 3 months ago
parent 32ae1fdc5f
commit b4fd10a1bb

@ -90,7 +90,7 @@ func handleDis() {
}).SetQueryParams(map[string]string{ }).SetQueryParams(map[string]string{
"page": "1", "page": "1",
"catid": id, "catid": id,
"limit": "15", "limit": "5",
"_": cast.ToString(time.Now().UnixNano() / int64(time.Millisecond)), "_": cast.ToString(time.Now().UnixNano() / int64(time.Millisecond)),
}).Get("http://aiportal.unicom.local/wsq/site/newsOne/v1/index/newList") }).Get("http://aiportal.unicom.local/wsq/site/newsOne/v1/index/newList")
if err != nil || resp.IsError() || gjson.Get(resp.String(), "code").Int() != 200 { if err != nil || resp.IsError() || gjson.Get(resp.String(), "code").Int() != 200 {
@ -105,7 +105,6 @@ func handleDis() {
} }
for i, v := range artID { for i, v := range artID {
_ = commonkit.RecoverFuncWrapper(func() { _ = commonkit.RecoverFuncWrapper(func() {
time.Sleep(1 * time.Second)
resp, err = disClient.R(). resp, err = disClient.R().
SetHeaders(map[string]string{ SetHeaders(map[string]string{
"Content-type": "application/json;charset=UTF-8", "Content-type": "application/json;charset=UTF-8",
@ -158,6 +157,7 @@ func handleDis() {
panic(exception.New("收藏失败 " + artName[i] + cast.ToString(resp.String()))) panic(exception.New("收藏失败 " + artName[i] + cast.ToString(resp.String())))
} }
logkit.Info("点赞收藏成功 " + artName[i]) logkit.Info("点赞收藏成功 " + artName[i])
time.Sleep(1 * time.Second)
}) })
} }
} }

Loading…
Cancel
Save