jd2配置
SyncSkuNames SyncCategorys
This commit is contained in:
@@ -32,8 +32,11 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
JdAPI *jdapi.API
|
||||
JdPageAPI *jdapi.API
|
||||
JdAPI *jdapi.API
|
||||
JdPageAPI *jdapi.API
|
||||
|
||||
Jd2API *jdapi.API
|
||||
|
||||
ElmAPI *elmapi.API
|
||||
EbaiAPI *ebaiapi.API
|
||||
MtwmAPI *mtwmapi.API
|
||||
@@ -79,6 +82,11 @@ func Init() {
|
||||
conf := platformapi.NewDefAPIConfig()
|
||||
conf.MaxSleepSecondWhenExceedLimit = 60 * 30 // 最大重试间隙30分钟
|
||||
JdPageAPI = jdapi.NewPageOnly(cookieValue, conf)
|
||||
|
||||
if globals.Jd2OrgCode != "" {
|
||||
Jd2API = jdapi.New(beego.AppConfig.String("jd2Token"), beego.AppConfig.String("jd2AppKey"), beego.AppConfig.String("jd2Secret"))
|
||||
Jd2API.SetJdCookie(beego.AppConfig.DefaultString("jd2StorePageCookie", ""))
|
||||
}
|
||||
} else {
|
||||
JdAPI = nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user