aa
This commit is contained in:
@@ -332,9 +332,6 @@ func Init() {
|
||||
if configs, err := dao.QueryConfigs(dao.GetDB(), "mtpsStoreToken", model.ConfigTypeCookie, ""); err == nil {
|
||||
mtpsStoreToken = configs[0].Value
|
||||
}
|
||||
if configs, err := dao.QueryConfigs(dao.GetDB(), "jdStorePageCookie", model.ConfigTypeCookie, ""); err == nil {
|
||||
JdStorePageCookie = configs[0].Value
|
||||
}
|
||||
if configs, err := dao.QueryConfigs(dao.GetDB(), "jdStorePageEarning", model.ConfigTypeCookie, ""); err == nil {
|
||||
jdStorePageEarning = configs[0].Value
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -47,8 +46,10 @@ func (a *APIManager) GetAPI(vendorID int, appOrgCode string) (pfAPI interface{})
|
||||
code := codes[0]
|
||||
api.JdAPI = jdapi.New(code.Token, code.AppKey, code.AppSecret)
|
||||
pfAPI = api.JdAPI
|
||||
cookieValue := beego.AppConfig.DefaultString("jdStorePageCookie", "")
|
||||
api.JdAPI.SetJdCookie(cookieValue)
|
||||
if configs, err := dao.QueryConfigs(dao.GetDB(), "jdStorePageCookie", model.ConfigTypeCookie, ""); err == nil {
|
||||
JdStorePageCookie := configs[0].Value
|
||||
api.JdAPI.SetJdCookie(JdStorePageCookie)
|
||||
}
|
||||
}
|
||||
case model.VendorIDMTWM:
|
||||
pfAPI = api.MtwmAPI
|
||||
|
||||
Reference in New Issue
Block a user