Merge branch 'hotfix/unionData' into 'gray'
union data to json See merge request !13
Showing
1 changed file
with
8 additions
and
3 deletions
@@ -706,11 +706,16 @@ class IndexController extends AbstractAction | @@ -706,11 +706,16 @@ class IndexController extends AbstractAction | ||
706 | /* 检查联盟参数是否有效 */ | 706 | /* 检查联盟参数是否有效 */ |
707 | $unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true); | 707 | $unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true); |
708 | } else { | 708 | } else { |
709 | - $unionKey = '{"client_id":' . $_COOKIE['mkt_code'] . | ||
710 | - (empty($_COOKIE['union_data']) ? '' : ',"union_data":' . $_COOKIE['union_data']) . '}'; | 709 | + $unionObj = array("client_id" => $_COOKIE['mkt_code']); |
710 | + | ||
711 | + if (!empty($_COOKIE['union_data'])) { | ||
712 | + $unionObj = array_merge($unionObj, array("union_data" => $_COOKIE['union_data'])); | ||
713 | + } | ||
714 | + | ||
715 | + $unionKey = json_encode($unionObj); | ||
711 | 716 | ||
712 | /* 检查联盟参数是否有效 */ | 717 | /* 检查联盟参数是否有效 */ |
713 | - $unionInfo = json_decode('{"client_id":' . $_COOKIE['mkt_code'] . '}', true); | 718 | + $unionInfo = array("client_id" => $_COOKIE['mkt_code']); |
714 | } | 719 | } |
715 | 720 | ||
716 | /* 模拟APP的User-Agent */ | 721 | /* 模拟APP的User-Agent */ |
-
Please register or login to post a comment