- 区分菜市与果园的调试端口

This commit is contained in:
gazebo
2019-08-27 10:00:40 +08:00
parent e0fdd2055c
commit 7dfa59e6e0
3 changed files with 23 additions and 19 deletions

View File

@@ -1808,7 +1808,8 @@ func AddStoreBossByMoble(ctx *jxcontext.Context, mobile string, storeID int) (nu
num = 1 num = 1
} }
} }
} else { }
if !globals.DisableWXAuth1 {
num, err = BindMobile2Store(ctx, mobile, storeID) num, err = BindMobile2Store(ctx, mobile, storeID)
} }
} }

View File

@@ -431,13 +431,14 @@ func HandleUserWXRemark(db *dao.DaoDB, mobile string, mobileIsUerID bool) (err e
storeID := 0 storeID := 0
remark := "" remark := ""
if !globals.EnableWXAuth2 { if !globals.DisableWXAuth1 {
wxinfo, err := dao.GetUserStoreInfo(db, "tel", mobile) wxinfo, err := dao.GetUserStoreInfo(db, "tel", mobile)
if err == nil { if err == nil {
openID = wxinfo.OpenID openID = wxinfo.OpenID
storeID = wxinfo.JxStoreID storeID = wxinfo.JxStoreID
} }
} else { }
if globals.EnableWXAuth2 {
userID := "" userID := ""
if mobileIsUerID { if mobileIsUerID {
userID = mobile userID = mobile
@@ -459,7 +460,6 @@ func HandleUserWXRemark(db *dao.DaoDB, mobile string, mobileIsUerID bool) (err e
} }
} }
if err == nil {
if openID != "" { if openID != "" {
if storeID > 0 { if storeID > 0 {
store := &model.Store{} store := &model.Store{}
@@ -477,7 +477,6 @@ func HandleUserWXRemark(db *dao.DaoDB, mobile string, mobileIsUerID bool) (err e
err = api.WeixinAPI.CBUpdateRemark(openID, remark) err = api.WeixinAPI.CBUpdateRemark(openID, remark)
} }
} }
}
return err return err
} }

View File

@@ -150,7 +150,11 @@ func main() {
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger" beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
} }
go func() { go func() {
http.ListenAndServe("0.0.0.0:8899", nil) if globals.IsMainProductEnv() {
http.ListenAndServe("0.0.0.0:6061", nil)
} else {
http.ListenAndServe("0.0.0.0:6060", nil)
}
}() }()
beego.Run() beego.Run()
} }