Ver Fonte

Merge branch 'feature/v4.8.50_ws' of qmx/jy into feature/v4.8.50

fuwencai há 2 anos atrás
pai
commit
da67c6607e

+ 2 - 1
src/jfw/modules/publicapply/src/oneclick/entity/entity.go

@@ -175,6 +175,7 @@ type authToken struct {
 func GetAuthTokenWithOptions(host string) (_err error, token *authToken) {
 	// 判断是微信还是h5的域名
 	origin, url := "", ""
+	log.Println(initjson.OneClick.H5.Origin, "========", host)
 	if strings.Contains(initjson.OneClick.H5.Origin, host) {
 		origin = initjson.OneClick.H5.Origin
 		url = initjson.OneClick.H5.Url
@@ -185,7 +186,7 @@ func GetAuthTokenWithOptions(host string) (_err error, token *authToken) {
 		log.Println("未匹配到host:", host)
 		return errors.New("host未匹配到"), token
 	}
-	redisKey := fmt.Sprintf("oneclick_token_%s", origin)
+	redisKey := fmt.Sprintf("oneclick_token_%s", host)
 	// 查缓存
 	if reidsCatche, redisErr := redis.GetBytes("other", redisKey); redisErr == nil && reidsCatche != nil {
 		errs := json.Unmarshal(*reidsCatche, &token)