|
|
|
@ -725,6 +725,12 @@ func bindWxUser(context *gin.Context) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
//输出正确了~
|
|
|
|
|
//1、生成加密串
|
|
|
|
|
r, _ := AesUtil.Encrypt([]byte(identityId + "_" + personId + "_1_" + ConvertUtil.Int64ToString(CommonUtil.GetCurrentTimestamp())))
|
|
|
|
|
//2、转base64
|
|
|
|
|
encodeString := base64.RawURLEncoding.EncodeToString([]byte(r))
|
|
|
|
|
//3、写cookie
|
|
|
|
|
context.SetCookie(ConfigUtil.AccessToken, encodeString, 0, "/", "", false, true)
|
|
|
|
|
context.JSON(http.StatusOK, Model.Res{
|
|
|
|
|
Code: http.StatusOK,
|
|
|
|
|
Msg: "绑定成功!",
|
|
|
|
|