Merge branch 'hotfix/unionData' into 'gray'
union_data 参数 json_decode 单独独立出来 See merge request !12
Showing
1 changed file
with
6 additions
and
2 deletions
@@ -702,13 +702,17 @@ class IndexController extends AbstractAction | @@ -702,13 +702,17 @@ class IndexController extends AbstractAction | ||
702 | } else { | 702 | } else { |
703 | $unionKey = AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy'); | 703 | $unionKey = AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy'); |
704 | } | 704 | } |
705 | + | ||
706 | + /* 检查联盟参数是否有效 */ | ||
707 | + $unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true); | ||
705 | } else { | 708 | } else { |
706 | $unionKey = '{"client_id":' . $_COOKIE['mkt_code'] . | 709 | $unionKey = '{"client_id":' . $_COOKIE['mkt_code'] . |
707 | (empty($_COOKIE['union_data']) ? '' : ',"union_data":' . $_COOKIE['union_data']) . '}'; | 710 | (empty($_COOKIE['union_data']) ? '' : ',"union_data":' . $_COOKIE['union_data']) . '}'; |
708 | - } | ||
709 | 711 | ||
710 | /* 检查联盟参数是否有效 */ | 712 | /* 检查联盟参数是否有效 */ |
711 | - $unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true); | 713 | + $unionInfo = json_decode('{"client_id":' . $_COOKIE['mkt_code'] . '}', true); |
714 | + } | ||
715 | + | ||
712 | /* 模拟APP的User-Agent */ | 716 | /* 模拟APP的User-Agent */ |
713 | $userAgent = isset($unionInfo['client_id']) ? 'YOHO!Buy/3.8.2.259(Model/PC;Channel/' . $unionInfo['client_id'] . ';uid/' . $uid . ')' : null; | 717 | $userAgent = isset($unionInfo['client_id']) ? 'YOHO!Buy/3.8.2.259(Model/PC;Channel/' . $unionInfo['client_id'] . ';uid/' . $uid . ')' : null; |
714 | 718 |
-
Please register or login to post a comment