Showing
1 changed file
with
6 additions
and
2 deletions
@@ -1063,8 +1063,12 @@ class CartModel | @@ -1063,8 +1063,12 @@ class CartModel | ||
1063 | $userAgent = null; | 1063 | $userAgent = null; |
1064 | $unionKey = ''; | 1064 | $unionKey = ''; |
1065 | if (!empty($_COOKIE['_QYH_UNION'])) { | 1065 | if (!empty($_COOKIE['_QYH_UNION'])) { |
1066 | - /* 解密客户端联盟信息 */ | ||
1067 | - $unionKey = AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy'); | 1066 | + // 新平台统一来源 |
1067 | + $unionKey = Encryption::decrypt(urldecode($_COOKIE['_QYH_UNION'])); | ||
1068 | + if (!json_decode($unionKey)) { | ||
1069 | + /* 解密客户端联盟信息(老逻辑) */ | ||
1070 | + $unionKey = AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy'); | ||
1071 | + } | ||
1068 | /* 检查联盟参数是否有效 */ | 1072 | /* 检查联盟参数是否有效 */ |
1069 | $unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true); | 1073 | $unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true); |
1070 | /* 模拟APP的User-Agent */ | 1074 | /* 模拟APP的User-Agent */ |
-
Please register or login to post a comment