Authored by 周少峰

qyh_union

... ... @@ -1063,8 +1063,12 @@ class CartModel
$userAgent = null;
$unionKey = '';
if (!empty($_COOKIE['_QYH_UNION'])) {
/* 解密客户端联盟信息 */
$unionKey = AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy');
// 新平台统一来源
$unionKey = Encryption::decrypt(urldecode($_COOKIE['_QYH_UNION']));
if (!json_decode($unionKey)) {
/* 解密客户端联盟信息(老逻辑) */
$unionKey = AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy');
}
/* 检查联盟参数是否有效 */
$unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true);
/* 模拟APP的User-Agent */
... ...