hsun 3 年之前
父节点
当前提交
3152aad77c
共有 2 个文件被更改,包括 10 次插入11 次删除
  1. 6 6
      services/share_poster.go
  2. 4 5
      services/wx_app/wx_app.go

+ 6 - 6
services/share_poster.go

@@ -36,12 +36,12 @@ func CreatePosterFromSource(codePage, codeScene, source, version, pars string) (
 		if err != nil {
 			global.LOG.Critical(fmt.Sprintf("CreatePosterFromSource: source=%s, pars:%s, errMsg:%s", source, pars, errMsg))
 			reqSlice := make([]string, 0)
-			reqSlice = append(reqSlice, fmt.Sprint("CodePage:", codePage))
-			reqSlice = append(reqSlice, fmt.Sprint("CodeScene:", codeScene))
-			reqSlice = append(reqSlice, fmt.Sprint("Source:", source))
-			reqSlice = append(reqSlice, fmt.Sprint("Version:", version))
-			reqSlice = append(reqSlice, fmt.Sprint("Pars:", pars))
-			go alarm_msg.SendAlarmMsg("CreatePosterFromSource生成分享海报失败, Msg:"+errMsg+";Err:"+err.Error()+";Req:"+strings.Join(reqSlice, ";"), 2)
+			reqSlice = append(reqSlice, fmt.Sprint("CodePage:", codePage, "\n"))
+			reqSlice = append(reqSlice, fmt.Sprint("CodeScene:", codeScene, "\n"))
+			reqSlice = append(reqSlice, fmt.Sprint("Source:", source, "\n"))
+			reqSlice = append(reqSlice, fmt.Sprint("Version:", version, "\n"))
+			reqSlice = append(reqSlice, fmt.Sprint("Pars:", pars, "\n"))
+			go alarm_msg.SendAlarmMsg("CreatePosterFromSource生成分享海报失败, Msg:"+errMsg+";Err:"+err.Error()+";Req:\n"+strings.Join(reqSlice, ";"), 2)
 		}
 	}()
 	if codePage == "" || source == "" || pars == "" {

+ 4 - 5
services/wx_app/wx_app.go

@@ -9,7 +9,6 @@ import (
 	"github.com/silenceper/wechat/v2/miniprogram/config"
 	"github.com/silenceper/wechat/v2/miniprogram/encryptor"
 	"github.com/silenceper/wechat/v2/miniprogram/qrcode"
-	"hongze/hongze_yb/global"
 )
 
 //微信小程序配置信息
@@ -26,10 +25,10 @@ func init() {
 	WxId = `gh_75abb562a946`
 	WxAppSecret = `1737c73e9f69a21de1a345b8f0800258`
 	WxPlatform = 6 //弘则研报来源
-	EnvVersion = "trial"
-	if global.CONFIG.Serve.RunMode == "release" {
-		EnvVersion = "release"
-	}
+	EnvVersion = "release"
+	//if global.CONFIG.Serve.RunMode == "release" {
+	//	EnvVersion = "release"
+	//}
 }
 
 func GetWxApp() (miniprogram *miniprogram.MiniProgram) {