aa
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/base64"
|
||||
"net/http"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
@@ -29,7 +31,14 @@ func (c *DingDingController) Msg() {
|
||||
// callbackResponse = api.DingDingAPI.Err2CallbackResponse(nil)
|
||||
// }
|
||||
//}
|
||||
callbackResponse = api.DingDingAPI.PackCallbackResult("success")
|
||||
aesKey := api.DingDingAPI.GetCallbackAESKey()
|
||||
buf := bytes.NewBuffer(nil)
|
||||
//buf.WriteString(utils.GetUUID()[:16])
|
||||
//binary.Write(buf, binary.BigEndian, int32(len("success")))
|
||||
buf.WriteString("success")
|
||||
//buf.WriteString(a.corpID)
|
||||
binResult, _ := utils.AESCBCEncpryt(buf.Bytes(), aesKey, aesKey[:16])
|
||||
callbackResponse.Encrypt = base64.StdEncoding.EncodeToString(binResult)
|
||||
c.Data["json"] = callbackResponse
|
||||
c.ServeJSON()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user