🐛 token解码有问题

This commit is contained in:
sunxiaolong
2024-05-29 01:04:08 +08:00
parent ecde3111a0
commit 1ccf950d9b
4 changed files with 4 additions and 22 deletions

View File

@@ -1,12 +1,3 @@
/***************************************************
** @Desc : 过滤功能
** @Time : 2019/8/8 16:10
** @Author : yuebin
** @File : filter
** @Last Modified by : yuebin
** @Last Modified time: 2019/8/8 16:10
** @Software: GoLand
****************************************************/
package controllers
import (
@@ -18,7 +9,7 @@ type FilterController struct {
web.Controller
}
// jsonp请求过来的函数
// Filter jsonp请求过来的函数
func (c *FilterController) Filter() {
userID, ok := c.GetSession("userID").(string)

View File

@@ -100,7 +100,7 @@ func (c *PageController) RechargeAppleAccountPage() {
tokenB, err := utils.AesCBCEncrypt([]byte(now), []byte(secretCfg.Key), []byte(secretCfg.IV))
if err == nil {
//base64编码
token = base64.StdEncoding.EncodeToString(tokenB)
token = base64.URLEncoding.EncodeToString(tokenB)
}
c.Data["token"] = token
fmt.Println("token", token)
@@ -120,7 +120,7 @@ func (c *PageController) RechargeAppleOrderPage() {
tokenB, err := utils.AesCBCEncrypt([]byte(now), []byte(secretCfg.Key), []byte(secretCfg.IV))
if err == nil {
//base64编码
token = base64.StdEncoding.EncodeToString(tokenB)
token = base64.URLEncoding.EncodeToString(tokenB)
}
c.Data["token"] = token
c.TplName = "apple-card/recharge-order.html"

View File

@@ -1,14 +1,5 @@
package controllers
/***************************************************
** @Desc : This file for ...
** @Time : 2019/11/6 14:03
** @Author : yuebin
** @File : query.go
** @Last Modified by : yuebin
** @Last Modified time: 2019/11/6 14:03
** @Software: GoLand
****************************************************/
import (
"boss/service"
"github.com/beego/beego/v2/server/web"

View File

@@ -6,6 +6,6 @@ import (
)
func TestGetOtp(t *testing.T) {
otp, _ := GetOtp("10086", "admin", "TT37BPUE3RJOT372X3ZNX5HM7Y")
otp, _ := GetOtp("10086", "admin", "JIHAOZJ5PA6RCHJABBZSWFW3CE", "XOLNgC")
fmt.Println(otp.QrImage)
}