Browse Source

fix:同花顺http请求token过期

Roc 1 year ago
parent
commit
c7e5a50640
1 changed files with 1 additions and 1 deletions
  1. 1 1
      services/base_from_ths_http.go

+ 1 - 1
services/base_from_ths_http.go

@@ -208,7 +208,7 @@ func postCurl(urlStr string, dataMap map[string]interface{}, num int) (body []by
 	utils.FileLog.Info(fmt.Sprint("post request url:", urlStr, ";token:", token, ";params:", reqStr, ";response:", string(body)))
 
 	//如果是token失效,同时只是第一次请求(没有尝试强制刷新token,那么重新请求)
-	if utils.InArrayByInt([]int{-1010}, int(response.ErrorCode)) && num <= 0 {
+	if utils.InArrayByInt([]int{-1010, -1302}, int(response.ErrorCode)) && num <= 0 {
 		//token失效
 		_, tmpErr := refreshAccessToken()
 		if tmpErr != nil {