tt
This commit is contained in:
@@ -32,8 +32,11 @@ func (a *API) Sign(paramsMap map[string]interface{}) string {
|
||||
paramsArr = append(paramsArr, value)
|
||||
}
|
||||
}
|
||||
|
||||
paramsArr = append(paramsArr, salt)
|
||||
if a.clientKey == TiktokJXDJAppID {
|
||||
paramsArr = append(paramsArr, salt2)
|
||||
} else {
|
||||
paramsArr = append(paramsArr, salt)
|
||||
}
|
||||
sort.Strings(paramsArr)
|
||||
return fmt.Sprintf("%x", md5.Sum([]byte(strings.Join(paramsArr, "&"))))
|
||||
}
|
||||
@@ -59,8 +62,8 @@ func (a *API) CreateOrderByTicktock(param *TickTokCreateOrder) (string, string,
|
||||
// 获取抖音token
|
||||
func (a *API) GetTiktokToken() error {
|
||||
tokenReq := make(map[string]interface{}, 3)
|
||||
tokenReq["appid"] = TiktokJXDJAppID
|
||||
tokenReq["secret"] = TiktokJXDJSecret
|
||||
tokenReq["appid"] = a.clientKey
|
||||
tokenReq["secret"] = a.clientSecret
|
||||
//tokenReq["appid"] = TiktokAppId
|
||||
//tokenReq["secret"] = TiktokSecret
|
||||
tokenReq["grant_type"] = "client_credential"
|
||||
|
||||
Reference in New Issue
Block a user