Bladeren bron

更新

master
huangjiajun 1 jaar geleden
bovenliggende
commit
a72cd29baa
1 gewijzigde bestanden met toevoegingen van 7 en 5 verwijderingen
  1. +7
    -5
      tik_tok/svc_tik_tok_auth.go

+ 7
- 5
tik_tok/svc_tik_tok_auth.go Bestand weergeven

@@ -14,11 +14,13 @@ func FirstAuth(args map[string]string) map[string]string {
if err != nil {
return data
}
endTime := time.Now().Unix() + gjson.Get(send, "data.expires_in").Int() - 10
endTime := time.Now().Unix() + gjson.Get(send, "data.expires_in").Int()
refreshEndTime := time.Now().Unix() + gjson.Get(send, "data.refresh_expires_in").Int()
data = map[string]string{
"tik_tok_acc_token": gjson.Get(send, "data.access_token").String(),
"tik_tok_acc_token_time": zhios_third_party_utils.Int64ToStr(endTime),
"tik_tok_acc_refresh_token": gjson.Get(send, "data.refresh_token").String(),
"tik_tok_acc_token": gjson.Get(send, "data.access_token").String(),
"tik_tok_acc_token_time": zhios_third_party_utils.Int64ToStr(endTime),
"tik_tok_acc_refresh_token_time": zhios_third_party_utils.Int64ToStr(refreshEndTime),
"tik_tok_acc_refresh_token": gjson.Get(send, "data.refresh_token").String(),
}
return data
}
@@ -29,7 +31,7 @@ func RefreshAuth(args map[string]string) map[string]string {
if err != nil {
return data
}
endTime := time.Now().Unix() + gjson.Get(send, "data.expires_in").Int() - 10
endTime := time.Now().Unix() + gjson.Get(send, "data.expires_in").Int()
data = map[string]string{
"tik_tok_acc_token": gjson.Get(send, "data.access_token").String(),
"tik_tok_acc_token_time": zhios_third_party_utils.Int64ToStr(endTime),


Laden…
Annuleren
Opslaan