...
|
...
|
@@ -85,6 +85,8 @@ class PlusstarController extends AbstractAction |
|
|
$channel = $this->get('yh_channel');
|
|
|
// 标识是不是APP客户端
|
|
|
$isApp = is_numeric($channel);
|
|
|
// 标识是否是微信访问
|
|
|
$isWeixin = stripos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false;
|
|
|
// APP访问时通过频道参数判断性别
|
|
|
if ($isApp) {
|
|
|
switch (intval($channel)) {
|
...
|
...
|
@@ -99,7 +101,7 @@ class PlusstarController extends AbstractAction |
|
|
}
|
|
|
$uid = $this->get('uid');
|
|
|
$udid = $this->get('udid');
|
|
|
|
|
|
|
|
|
$this->setSession('uid', $uid);
|
|
|
}
|
|
|
// 从Cookie获取
|
...
|
...
|
@@ -138,14 +140,14 @@ class PlusstarController extends AbstractAction |
|
|
$data['ps']['newArrival']['moreUrl'] = $url;
|
|
|
$data['ps']['newArrival']['naList'] = $brandInfo['getNewProduct'];
|
|
|
$data['ps']['infos'] = array();
|
|
|
|
|
|
|
|
|
// 拼收藏的URL, 一个坑!
|
|
|
// 备注:此处是根据原来逛的代码硬扒过来的
|
|
|
$defaultUrl = Helpers::url('/plustar/brandinfo', array('id' => $id), 'guang');
|
|
|
if ($isApp) {
|
|
|
$url = $defaultUrl;
|
|
|
$url .= '&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo","param":{"id":'
|
|
|
. $id . '}},"requesturl":{"url":"\/guang\/api\/v1\/favorite\/togglebrand","param":{"brand_id":"' . $brandId . '"}},"priority":"Y"}}';
|
|
|
$url .= '&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo","param":{"id":'
|
|
|
. $id . '}},"requesturl":{"url":"\/guang\/api\/v1\/favorite\/togglebrand","param":{"brand_id":"' . $brandId . '"}},"priority":"Y"}}';
|
|
|
} else {
|
|
|
$url = Helpers::url('/signin.html', array('refer' => $defaultUrl));
|
|
|
}
|
...
|
...
|
@@ -161,16 +163,16 @@ class PlusstarController extends AbstractAction |
|
|
}
|
|
|
|
|
|
// 设置头部信息
|
|
|
if (!$isApp) {
|
|
|
if (!$isApp && !$isWeixin) {
|
|
|
$this->setNavHeader($data['ps']['name'], true, SITE_MAIN);
|
|
|
}
|
|
|
|
|
|
// 标识有微信分享
|
|
|
$data['hasWxShare'] = true;
|
|
|
|
|
|
|
|
|
$data['shareLink'] = $defaultUrl;
|
|
|
$data['shareTitle'] = $data['ps']['name'];
|
|
|
$data['shareDesc'] = (mb_strlen($data['ps']['intro'],'utf-8') > 800) ? mb_substr($data['ps']['intro'], 0, 800, 'utf-8') . '...' : $data['ps']['intro'];
|
|
|
$data['shareDesc'] = (mb_strlen($data['ps']['intro'], 'utf-8') > 800) ? mb_substr($data['ps']['intro'], 0, 800, 'utf-8') . '...' : $data['ps']['intro'];
|
|
|
$data['shareImg'] = $data['ps']['logo'];
|
|
|
|
|
|
$brandInfo = array();
|
...
|
...
|
|