From 73d9dd52ff7e322a4ca07f2a475a550875cbc73e Mon Sep 17 00:00:00 2001 From: tommy <3405129587@qq.com> Date: Wed, 27 May 2020 19:15:35 +0800 Subject: [PATCH] change sub_appid to appid --- controllers/client/login.go | 3 +++ controllers/client/wx.go | 2 +- utils/define/define.go | 9 +++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/controllers/client/login.go b/controllers/client/login.go index 20ec1a6..17ea124 100644 --- a/controllers/client/login.go +++ b/controllers/client/login.go @@ -7,6 +7,7 @@ import ( "hudongzhuanjia/libs/im" "hudongzhuanjia/libs/jwt" "hudongzhuanjia/libs/wechat" + "hudongzhuanjia/logger" "hudongzhuanjia/models" activity_service "hudongzhuanjia/services/activity" "hudongzhuanjia/utils/code" @@ -61,6 +62,7 @@ func (t *UserCtl) WxLogin() { activityId := t.MustGetInt64("activity_id") wxcode := t.MustGet("code") + logger.Error("微信code:", wxcode) activity, exist, err := activity_service.GetActivityById(activityId) t.CheckErr(err) @@ -153,6 +155,7 @@ func (t *UserCtl) Login() { wxcode := t.MustGet("code") // _type, _ := t.Get("type") + logger.Error("错误code:", wxcode) user := new(models.User) token, err := wechat.GetToken(wxcode) t.CheckErr(err) diff --git a/controllers/client/wx.go b/controllers/client/wx.go index 8cc84b0..4ff8a4f 100644 --- a/controllers/client/wx.go +++ b/controllers/client/wx.go @@ -57,7 +57,7 @@ func (t *WxCtl) Ticket() { "noncestr": nonceStr, "timestamp": timestamp, "ticket": cache.Ticket, - "appid": define.SubAppId, + "appid": define.AppId, }) } diff --git a/utils/define/define.go b/utils/define/define.go index c1ddf43..a025c86 100644 --- a/utils/define/define.go +++ b/utils/define/define.go @@ -98,12 +98,13 @@ const ( //SubMchId = `` // 欧轩 -> 服务商 - AppId = `wx662a1633304bfd42` ApiKey = `6e281c8b5430c674034594cab789334F` - //AppId = `wx662a1633304bfd42` + AppId = `wx662a1633304bfd42` + //SubAppId = `wx662a1633304bfd42` //Secret = `7e4ecfe06ad1e075c210059d5b0162a3` - MchId = `1441266702` - SubMchId = `1394404502` + MchId = `1441266702` + //SubMchId = `1394404502` + SubMchId = `1594049151` // 认证服务号:欧轩(用于申请微信服务商) // AppID:wx662a1633304bfd42 // 密钥:7e4ecfe06ad1e075c210059d5b0162a3