- 美团配送使用页面API修改门店信息

This commit is contained in:
gazebo
2019-07-24 16:23:47 +08:00
parent b513ee9c74
commit aa05678e5d
4 changed files with 27 additions and 4 deletions

View File

@@ -61,7 +61,9 @@ func init() {
func Init() {
if !beego.AppConfig.DefaultBool("disableJd", false) {
JdAPI = jdapi.New(beego.AppConfig.String("jdToken"), beego.AppConfig.String("jdAppKey"), beego.AppConfig.String("jdSecret"))
JdAPI.SetStoreCookie(beego.AppConfig.DefaultString("jdStorePageCookie", ""))
cookieValue := beego.AppConfig.DefaultString("jdStorePageCookie", "")
JdAPI.SetCookie("shop.o2o.jd.com1", cookieValue)
JdAPI.SetCookie("lsp-store1.jddj.com", cookieValue)
} else {
JdAPI = nil
}
@@ -88,8 +90,8 @@ func Init() {
ebaiStorePageCookieWMUSS := beego.AppConfig.DefaultString("ebaiStorePageCookieWMUSS", "")
ebaiStorePageCookieWMSTOKEN := beego.AppConfig.DefaultString("ebaiStorePageCookieWMSTOKEN", "")
if ebaiStorePageCookieWMUSS != "" && ebaiStorePageCookieWMSTOKEN != "" {
EbaiAPI.SetStoreCookie("WMUSS", ebaiStorePageCookieWMUSS)
EbaiAPI.SetStoreCookie("WMSTOKEN", ebaiStorePageCookieWMSTOKEN)
EbaiAPI.SetCookie("WMUSS", ebaiStorePageCookieWMUSS)
EbaiAPI.SetCookie("WMSTOKEN", ebaiStorePageCookieWMSTOKEN)
}
} else {
EbaiAPI = nil
@@ -97,6 +99,9 @@ func Init() {
if !beego.AppConfig.DefaultBool("disableMtps", false) {
MtpsAPI = mtpsapi.New(beego.AppConfig.String("mtpsAppKey"), beego.AppConfig.String("mtpsSecret"))
if mtpsStoreToken := beego.AppConfig.DefaultString("mtpsStoreToken", ""); mtpsStoreToken != "" {
MtpsAPI.SetCookie("token", mtpsStoreToken)
}
} else {
MtpsAPI = nil
}