Sfoglia il codice sorgente

fix:调整数据节点token失败

Roc 5 mesi fa
parent
commit
971e9e2234
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      services/index_data/gn_base_data_platform.go

+ 1 - 1
services/index_data/gn_base_data_platform.go

@@ -385,7 +385,7 @@ func HttpPostGn(urlPath, token string, postDataParams interface{}, num int) ([]b
 	}
 
 	//如果是token失效,同时只是第一次请求(没有尝试强制刷新token,那么重新请求)
-	if utils.InArrayByStr([]string{""}, baseResp.Code) && num <= 0 {
+	if (utils.InArrayByStr([]string{""}, baseResp.Code) || strings.Contains(baseResp.Mesg, `无效token`)) && num <= 0 {
 		//token失效
 		token, err = refreshGnAccessToken()
 		if err != nil {