Authored by 周少峰

newWay

... ... @@ -467,9 +467,9 @@ class IndexController extends AbstractAction
/* 判断是否是友盟过来的用户 */
$userAgent = null;
$unionKey = '';
if (!empty($_COOKIE['_QYH_UNION'])) {
/* 解密客户端联盟信息 */
$unionKey = AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy');
if (!empty($_COOKIE['mkt_code']) || !empty($_COOKIE['_QYH_UNION'])) {
/* 解密客户端联盟信息 mkt_code优先*/
$unionKey = !empty($_COOKIE['mkt_code']) ? '{"client_id": 800'.$_COOKIE['mkt_code'].'}' : AuthCode::decode($_COOKIE['_QYH_UNION'], 'q_union_yohobuy');
/* 检查联盟参数是否有效 */
$unionInfo = empty($unionKey) ? array() : json_decode($unionKey, true);
/* 模拟APP的User-Agent */
... ...