Browse Source

no message

xingzai 3 years ago
parent
commit
06b3ced740
2 changed files with 3 additions and 2 deletions
  1. 1 0
      controllers/base_auth.go
  2. 2 2
      utils/constants.go

+ 1 - 0
controllers/base_auth.go

@@ -190,6 +190,7 @@ func checkSign(postData map[string]string, ip string) (err error) {
 	//md5.Sum([]byte(signStr+"key="+key))  这是md5加密出来后的每个字符的ascall码,需要再转换成对应的字符
 	//3,全转大写(md5(拼装的字符串后+分配给你的app_secret))
 	sign := strings.ToUpper(fmt.Sprintf("%x", md5.Sum([]byte(signStr+"secret="+openApiUserInfo.Secret))))
+	fmt.Println(sign)
 	if sign != ownSign {
 		utils.ApiLog.Println(fmt.Sprintf("签名校验异常,签名字符串:%v;服务端签名值:%v", signStr, sign))
 		return errors.New("签名校验异常,请核实签名")

+ 2 - 2
utils/constants.go

@@ -94,6 +94,6 @@ var PermissionAllClassifyArr = [...]string{"宏观经济", "化工产业", "黑
 
 const (
 	key          = "zDeESsxsXuionhqSLZYHWcDJ"         //全局加密KEY
-	ReportAppid  = "APPIDFwujYAMHqlNojIYPFhvEjFdPysz" //Appid
-	ReportSecret = "SecretPHAvGg9AIqBRGXGc2vVtxfl4DD" //AppSecret
+	ReportAppid  = "CQWx3EqDLNk7bVHo"                 //Appid
+	ReportSecret = "vRVFCk182Hpv8CyrHsxaHhA3CgGhh4Uu" //AppSecret
 )