添加抖音小程序二维码

This commit is contained in:
邹宗楠
2022-06-09 14:13:31 +08:00
parent 5a2e8d7cc1
commit bd9bb69dc3
4 changed files with 22 additions and 13 deletions

View File

@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
"sort"
"strings"
"time"
@@ -58,9 +59,10 @@ func (a *API) CreateOrderByTicktock(param *TickTokCreateOrder) (string, string,
// 获取抖音token
func (a *API) GetTiktokToken() error {
tokenReq := make(map[string]interface{}, 3)
tokenReq["appid"] = a.GetAppID()
tokenReq["secret"] = a.GetSecret()
tokenReq["appid"] = TiktokAppId
tokenReq["secret"] = TiktokSecret
tokenReq["grant_type"] = "client_credential"
globals.SugarLogger.Debug("=============", tokenReq)
result, err := a.AccessAPI2(GetTiktokToken, tokenReq)
if err != nil {
return err