1
This commit is contained in:
@@ -3526,7 +3526,7 @@ func GetStoreCategoryMap(ctx *jxcontext.Context, parentID, level int, storeID in
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if ctx.GetLoginType() != weixin.AuthTypeMP && ctx.GetLoginType() != weixin.AuthTypeMini && ctx.GetLoginType() != weixin.AuthTypeWxApp && ctx.GetLoginType() != weixin.AuthTypeWxAppCaishi && ctx.GetLoginType() != auth2.AuthTypeMobile {
|
||||
if ctx.GetLoginType() != auth2.AuthTypePassword && ctx.GetLoginType() != weixin.AuthTypeMP && ctx.GetLoginType() != weixin.AuthTypeMini && ctx.GetLoginType() != weixin.AuthTypeWxApp && ctx.GetLoginType() != weixin.AuthTypeWxAppCaishi && ctx.GetLoginType() != auth2.AuthTypeMobile {
|
||||
return storeCatMaps, err
|
||||
}
|
||||
//表示没有门店分类
|
||||
|
||||
@@ -55,6 +55,7 @@ func HttpToGuoYuan(param map[string]interface{}, requestType string) (*http.Resp
|
||||
var paramData []byte
|
||||
var err error
|
||||
if requestType == "order" {
|
||||
param["data"] = utils.Format4Output(param["data"], false)
|
||||
paramData, err = json.Marshal([]interface{}{param})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -80,6 +81,7 @@ func HttpToGuoYuan(param map[string]interface{}, requestType string) (*http.Resp
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpReq.Header.Set("Content-Type", "application/json")
|
||||
|
||||
httpRes, err := http.DefaultClient.Do(httpReq)
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/tiktok_store"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -15,12 +16,17 @@ type TiktokController struct {
|
||||
// CallbackTiktokOrderMsg 抖店用户下单订单推送 (tiktokStore)
|
||||
func (t *TiktokController) CallbackTiktokOrderMsg() {
|
||||
// 1.防伪校验
|
||||
resp, byteList := api.TiktokStore.EventSignChange(t.Ctx.Request)
|
||||
if resp.Code != 0 {
|
||||
t.Data["json"] = resp
|
||||
t.ServeJSON()
|
||||
return
|
||||
var byteList []byte
|
||||
var resp *tiktok_api.CallbackResponse
|
||||
if beego.BConfig.RunMode != "jxgy" {
|
||||
resp, byteList = api.TiktokStore.EventSignChange(t.Ctx.Request)
|
||||
if resp.Code != 0 {
|
||||
t.Data["json"] = resp
|
||||
t.ServeJSON()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if strings.Contains(string(byteList), "\"msg_id\":\"0\"") {
|
||||
t.Data["json"] = tiktok_api.CallbackResponse{Code: tiktok_api.CallbackSuccessCode, Msg: tiktok_api.CallbackSuccess}
|
||||
t.ServeJSON()
|
||||
|
||||
Reference in New Issue
Block a user