Showing
1 changed file
with
8 additions
and
3 deletions
@@ -695,11 +695,16 @@ class IndexController extends AbstractAction | @@ -695,11 +695,16 @@ class IndexController extends AbstractAction | ||
695 | /* 检查联盟参数是否有效 */ | 695 | /* 检查联盟参数是否有效 */ |
696 | $unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true); | 696 | $unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true); |
697 | } else { | 697 | } else { |
698 | - $unionKey = '{"client_id":' . $_COOKIE['mkt_code'] . | ||
699 | - (empty($_COOKIE['union_data']) ? '' : ',"union_data":' . $_COOKIE['union_data']) . '}'; | 698 | + $unionObj = ["client_id": $_COOKIE['mkt_code']]; |
699 | + | ||
700 | + if (!empty($_COOKIE['union_data'])) { | ||
701 | + $unionObj = array_merge($unionObj, ["union_data": $_COOKIE['union_data']]); | ||
702 | + } | ||
703 | + | ||
704 | + $unionKey = json_encode($unionObj); | ||
700 | 705 | ||
701 | /* 检查联盟参数是否有效 */ | 706 | /* 检查联盟参数是否有效 */ |
702 | - $unionInfo = json_decode('{"client_id":' . $_COOKIE['mkt_code'] . '}', true); | 707 | + $unionInfo = ["client_id": $_COOKIE['mkt_code']]; |
703 | } | 708 | } |
704 | 709 | ||
705 | /* 模拟APP的User-Agent */ | 710 | /* 模拟APP的User-Agent */ |
-
Please register or login to post a comment