瀏覽代碼

更新

master
huangjiajun 1 年之前
父節點
當前提交
a72cd29baa
共有 1 個檔案被更改,包括 7 行新增5 行删除
  1. +7
    -5
      tik_tok/svc_tik_tok_auth.go

+ 7
- 5
tik_tok/svc_tik_tok_auth.go 查看文件

@@ -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),


Loading…
取消
儲存