Authored by 周少峰

Merge branch 'hotfix/unionData' into release/5.4.1

@@ -1074,13 +1074,10 @@ class CartModel @@ -1074,13 +1074,10 @@ class CartModel
1074 $unionKey = AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy'); 1074 $unionKey = AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy');
1075 } 1075 }
1076 } else { 1076 } else {
1077 - $unionKey = '{"client_id":' . $_COOKIE['mkt_code'] . '}'; 1077 + $unionKey = '{"client_id":' . $_COOKIE['mkt_code'] . $_COOKIE['union_data'] ? ', union_data: '.$_COOKIE['union_data']: '' . '}';
1078 } 1078 }
1079 /* 检查联盟参数是否有效 */ 1079 /* 检查联盟参数是否有效 */
1080 $unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true); 1080 $unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true);
1081 - if (empty($unionKey) && !empty($_COOKIE['union_data'])){  
1082 - $unionKey = $_COOKIE['union_data'];  
1083 - }  
1084 /* 模拟APP的User-Agent */ 1081 /* 模拟APP的User-Agent */
1085 $userAgent = isset($unionInfo['client_id']) ? 'YOHO!Buy/3.8.2.259(Model/PC;Channel/' . $unionInfo['client_id'] . ';uid/' . $uid . ')' : null; 1082 $userAgent = isset($unionInfo['client_id']) ? 'YOHO!Buy/3.8.2.259(Model/PC;Channel/' . $unionInfo['client_id'] . ';uid/' . $uid . ')' : null;
1086 } 1083 }