浏览代码

fix:调整数据节点token失败

Roc 5 月之前
父节点
当前提交
971e9e2234
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 {