Authored by 徐祁xuqi

Merge branch 'release/4.5'

... ... @@ -204,6 +204,7 @@ class PlusstarData
$result['getArticleByBrand'] = array();
$param = Yohobuy::param();
$param['brand_id'] = $brandInfo['data']['brand_id'];
$param['uid'] = $uid;
$param['udid'] = $udid;
$param['limit'] = 3;
$param['client_type'] = $clientType;
... ...
... ... @@ -36,7 +36,7 @@ class RecomData
$param['yh_channel'] = $channel;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 3600);
return Yohobuy::get(Yohobuy::API_URL, $param, 300);
}
/**
... ... @@ -55,7 +55,7 @@ class RecomData
$param['yh_channel'] = '3';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 3600);
return Yohobuy::get(Yohobuy::API_URL, $param, 300);
}
/**
... ... @@ -74,7 +74,27 @@ class RecomData
$param['yh_channel'] = '4';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 3600);
return Yohobuy::get(Yohobuy::API_URL, $param, 300);
}
/**
* 活动模板-商品列表接口
* @param type int $templateId 模板id
* @param type string $order 排序
* @param type int $page 页码
* @param type int $limit 条数
* @return type []
*/
public static function newPreference($templateId, $order = '', $page = 1, $limit = 50)
{
$param = Yohobuy::param();
$param['template_id'] = intval($templateId);
$param['order'] = $order;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v5/activitytemplate/getProduct', $param, 300);
}
}
... ...
... ... @@ -36,7 +36,7 @@ class SearchData
// return 'http://101.200.31.165/yohosearch/search.json';
return 'http://192.168.10.64:8080/yohosearch/search.json';
case 'testing':
return 'http://192.168.102.216:8080/yohosearch/search.json';
return 'http://testing.yohoops.org/yohosearch/search.json';
case 'developer':
default:
return 'http://searchyohoops.yohobuy.com/yohosearch/search.json';
... ...
... ... @@ -354,8 +354,8 @@ class Helpers
$result['showTags'] = $showTag;
$result['img'] = isset($articleData['src']) ? self::getImageUrl($articleData['src'], 640, 640) : '';
//逛详情页app跳转url处理 20160601
$result['url'] = self::getUrlSafe($articleData['url']) . '&openby:yohobuy={"action":"go.h5","params":{"param":{"id":"' . $articleData['id'] . '"},"shareparam":{"id":"' . $articleData['id'] . '"},"share":"/guang/api/v1/share/guang","id":' . $articleData['id'] . ',"type":0,"url":"' .'https:'. self::url('/info/index', array(), 'guang') . '","islogin":"N"}}';
//$result['url'] = $articleData['url']; //$isApp ? $articleData['url'] : self::url('/info/index', array('id' => $articleData['id']), 'guang');
$result['url'] = $isApp ? self::getUrlSafe($articleData['url']) . '&openby:yohobuy={"action":"go.h5","params":{"param":{"id":"' . $articleData['id'] . '"},"shareparam":{"id":"' . $articleData['id'] . '"},"share":"/guang/api/v1/share/guang","id":' . $articleData['id'] . ',"type":1,"url":"' .'http:'. self::url('/info/index', array(), 'guang') . '","islogin":"N"}}' : $articleData['url'];
//$result['url'] = $articleData['url']; // ? $articleData['url'] : self::url('/info/index', array('id' => $articleData['id']), 'guang');
if (strrpos($result['url'], 'feature.yoho.cn') || strrpos($result['url'], 'cdn.yoho.cn')) {
$result['url'] = self::transHttpsUrl($result['url']);
... ... @@ -389,7 +389,6 @@ class Helpers
}
//编辑人员 app跳转url处理 20160601
$articleData['author']['url'] = self::getUrlSafe($articleData['author']['url']).'&openby:yohobuy={"action":"go.h5","params":{"param":{"id":"' . $articleData['author']['author_id'] . '"},"share":"","id":' . $articleData['author']['author_id'] . ',"type":0,"islogin":"N","url":"' .'https:'.self::url('/author/index', array(), 'guang') . '"}}';
$articleData['author']['url'] = self::getUrlSafe($articleData['author']['url']);
$result['author'] = $articleData['author'];
if (isset($result['author']['avatar'])) {
$result['author']['avatar'] = strtr($result['author']['avatar'], array('http://' => '//'));
... ...
server
{
listen 80;
server_name huodong.m.yohobuy.com;
root /Data/code/git/yohobuy/yohobuy/huodong.m.yohobuy.com/public;
access_log /Data/logs/access.huodong.m.yohobuy.com.log combined;
error_log /Data/logs/nginx/error.huodong.m.yohobuy.com.log warn;
location / {
root /Data/code/git/yohobuy/yohobuy/huodong.m.yohobuy.com/public;
proxy_redirect off;
proxy_pass http://yohobuy;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
expires 30d;
}
location =/crossdomain.xml {
expires 30d;
}
location =/sitemap.xml {
expires 1d;
}
location =/robots.txt {
expires 1d;
}
}
server
{
listen 80;
server_name static.buy.test.yoho.cn;
root /Data/code/git/yohobuy/static;
location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
expires 30d;
}
location =/crossdomain.xml {
expires 30d;
}
location =/sitemap.xml {
expires 1d;
}
location =/robots.txt {
expires 1d;
}
}
server
{
listen 80;
server_name m.yohobuy.com;
#access_log /Data/logs/access.buy.test.yoho.cn.log combined;
error_log /Data/logs/nginx/error.m.yohobuy.com.log warn;
root /Data/code/git/yohobuy/yohobuy/m.yohobuy.com/public;
location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
expires 30d;
}
location =/crossdomain.xml {
expires 7d;
}
location =/sitemap.xml {
expires 1d;
}
location =/robots.txt {
expires 1d;
}
# login and register 301 redirect to https
location = /reg.html {
proxy_redirect off;
proxy_pass http://yohobuy;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location = /signin.html {
proxy_redirect off;
proxy_pass http://yohobuy;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location = /login.html {
proxy_redirect off;
proxy_pass http://yohobuy;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location = /coupon/index {
proxy_redirect off;
proxy_pass http://yohobuywap-node;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location =/appembed {
default_type application/json;
return 200 '{"code":200,"message":"app embed","data":{"open":"N","url":"http://m.yohobuy.com"}}';
}
location =/lb/v1 {
#cc: e0323a9039add2978bf5b49550572c7c oo:e47ca7a09cf6781e29634502345930a7
#acecl:7ea6bdf07376a928c5d4677789c45463 opqcl:kai: 352f028bd6ecf28de1c285c573642659 guang:7ea6bdf07376a928c5d4677789c45463
#srp 62a165d59f8daf42e2df5f3c5aed8a2f krp:17d7a40f313560d4d9a1189a91e45ab9
#boc 94931e4a3036baeecdacb975e10a8ec6 bcc:dc9262a469f6f315f74c087a7b3a7f35
default_type application/json;
return 200 '{"code":200,"message":"Config Success","md5":"1231231231231","data":{"ae":"e0323a9039add2978bf5b49550572c7c","url":"http://m.yohobuy.com","tl":"7ea6bdf07376a928c5d4677789c45463","rp":"62a165d59f8daf42e2df5f3c5aed8a2f","bv":"94931e4a3036baeecdacb975e10a8ec6","dl":"5b2d8b4b242e067616c6cd98851b2306"}}';
}
# 一些静态页面有关
location = /help/shareorder.html {
root /Data/code/git/yohobuy/assets;
expires 7d;
}
location = /emailback.html {
root /Data/code/git/yohobuy/assets;
expires 7d;
}
location = /phoneback.html {
root /Data/code/git/yohobuy/assets;
expires 7d;
}
location = /error.html {
root /Data/code/git/yohobuy/assets;
expires 7d;
}
location ^~ /dist/ {
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://cdn.yoho.cn/;
}
# location / {
# return 301 https://m.yohobuy.com$request_uri;
# }
location / {
proxy_redirect off;
proxy_pass http://yohobuy;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
# 老页面
location =/invite.html {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location =/app.html {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location =/yohood.html {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /home/lottery {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /home/redenvelopes {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /home/orders/tickets {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /home/currency/ {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location = /home/orders/cancel {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /wechat {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /huodong {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /download {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /events {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /appactive {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /cart/success {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /shopping/success {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /shopping/pay/aliwap {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location = /shopping/pay/wechatwap {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /passport/syncsignin {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location =/product/index/search {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ^~ /share_ {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
}
server
{
listen 80;
server_name search.yohoops.org testing.yohoops.org searchyohoops.yohobuy.com;
location / {
proxy_pass http://192.168.102.216:8080/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server
{
listen 80;
server_name *.m.yohobuy.com;
#access_log /Data/logs/access.buy.test.yoho.cn.log combined;
error_log /Data/logs/nginx/error.m.yohobuy.com.log warn;
root /Data/code/git/yohobuy/yohobuy/m.yohobuy.com/public;
location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
expires 30d;
}
location =/crossdomain.xml {
expires 7d;
}
location =/sitemap.xml {
expires 1d;
}
location =/robots.txt {
expires 1d;
}
location = /error.html {
root /Data/code/git/yohobuy/assets;
expires 7d;
}
location ^~ /Passport/session {
proxy_redirect off;
proxy_pass http://192.168.50.69;
proxy_set_header Host m1.yohobuy.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
# location / {
# return 301 https://$host$request_uri;
# }
#
location / {
proxy_redirect off;
proxy_pass http://yohobuy;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
}
# server
# {
# listen 443;
# server_name m.yohobuy.com;
# ssl on;
# ssl_certificate /Data/local/nginx-1.8.0/ssl/server.crt;
# ssl_certificate_key /Data/local/nginx-1.8.0/ssl/server.key;
# root /Data/code/git/yohobuy/yohobuy/m.yohobuy.com/public;
# location = /appembed {
# default_type application/json;
# return 200 '{"code":200,"message":"app embed","data":{"open":"N","url":"http://m.yohobuy.com"}}';
# }
# location = /lb/v1 {
# #cc: e0323a9039add2978bf5b49550572c7c oo:e47ca7a09cf6781e29634502345930a7
# #acecl:7ea6bdf07376a928c5d4677789c45463 opqcl:kai: 352f028bd6ecf28de1c285c573642659 guang:7ea6bdf07376a928c5d4677789c45463
# #srp 62a165d59f8daf42e2df5f3c5aed8a2f krp:17d7a40f313560d4d9a1189a91e45ab9
# #boc 94931e4a3036baeecdacb975e10a8ec6 bcc:dc9262a469f6f315f74c087a7b3a7f35
# default_type application/json;
# return 200 '{"code":200,"message":"Config Success","md5":"1231231231231","data":{"ae":"e0323a9039add2978bf5b49550572c7c","url":"http://m.yohobuy.com","tl":"7ea6bdf07376a928c5d4677789c45463","rp":"62a165d59f8daf42e2df5f3c5aed8a2f","bv":"94931e4a3036baeecdacb975e10a8ec6"}}';
# }
# location = /help/shareorder.html {
# root /Data/code/git/yohobuy/assets;
# expires 7d;
# }
# location = /emailback.html {
# root /Data/code/git/yohobuy/assets;
# expires 7d;
# }
# location = /phoneback.html {
# root /Data/code/git/yohobuy/assets;
# expires 7d;
# }
# location = /error.html {
# root /Data/code/git/yohobuy/assets;
# expires 7d;
# }
# # login and register 301 redirect to https
# location = /reg.html {
# return 301 https://login.m.yohobuy.com$request_uri;
# }
# location = /signin.html {
# return 301 https://login.m.yohobuy.com$request_uri;
# }
# location = /login.html {
# return 301 https://login.m.yohobuy.com$request_uri;
# }
# location ^~ /Passport/session {
# proxy_redirect off;
# proxy_pass http://192.168.50.69;
# proxy_set_header Host m1.yohobuy.com;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Accept-Encoding "gzip";
# }
# location / {
# proxy_redirect off;
# proxy_pass http://yohobuy;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Accept-Encoding "gzip";
# }
# location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
# expires 30d;
# }
# location =/crossdomain.xml {
# expires 30d;
# }
# location =/sitemap.xml {
# expires 1d;
# }
# location =/robots.txt {
# expires 1d;
# }
# }
# server
# {
# listen 443;
# server_name *.m.yohobuy.com;
# ssl on;
# ssl_certificate /Data/local/nginx-1.8.0/ssl/server.crt;
# ssl_certificate_key /Data/local/nginx-1.8.0/ssl/server.key;
# root /Data/code/git/yohobuy/yohobuy/m.yohobuy.com/public;
# location = /error.html {
# root /Data/code/git/yohobuy/assets;
# expires 7d;
# }
# location ^~ /Passport/session {
# proxy_redirect off;
# proxy_pass http://192.168.50.69;
# proxy_set_header Host m1.yohobuy.com;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Accept-Encoding "gzip";
# }
# location / {
# proxy_redirect off;
# proxy_pass http://yohobuy;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Accept-Encoding "gzip";
# }
# location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
# expires 30d;
# }
# location =/crossdomain.xml {
# expires 30d;
# }
# location =/sitemap.xml {
# expires 1d;
# }
# location =/robots.txt {
# expires 1d;
# }
# }
server
{
listen 80;
server_name analytics.m.yohobuy.com;
location / {
proxy_redirect off;
proxy_pass http://analytics.yhurl.com;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
expires 30d;
}
location =/crossdomain.xml {
expires 30d;
}
location =/sitemap.xml {
expires 1d;
}
location =/robots.txt {
expires 1d;
}
}
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... ... @@ -197,14 +197,13 @@ function reMarginFooter(fixedElement) {
(function() {
var uid = getUid(),
hasParentBp = false, // 判断是否有父级埋点,如果有,点击子埋点,不处罚父埋点。
basicBpDataLength = 3;
var sendBpData,
basicBpDataLength = 3,
sendBpData,
bindBpEvent;
uid = uid === 0 ? '' : uid;
window._ozuid = uid;//暴露ozuid
window._ozuid = uid; // 暴露ozuid
if (window._yas) {
window._yas(1 * new Date(), '1.0.15', 'yohobuy_m', uid, '', '');
... ... @@ -217,27 +216,32 @@ function reMarginFooter(fixedElement) {
jsonData = {
page: bpIdArr[0],
floor: bpIdArr[1],
data: bpIdArr[2]
data: /_[1|0]$/.test(bpIdArr.join('_')) ? bpIdArr[2] : bpIdArr.slice(2).join('_') //防止值字符串中有_导致的问题
};
window._yas.sendCustomInfo(jsonData, Boolean(parseInt(bpIdArr[3]) || 1));
if (window._yas.sendCustomInfo) {
window._yas.sendCustomInfo(jsonData, Boolean(parseInt(bpIdArr[3]) || 1));
}
}
};
// 绑定埋点点击事件
bindBpEvent = function() {
$(document).off('click').on('click', '.buriedpoint', function(e) {
$('.buriedpoint').off('click');
$(document).on('click', '.buriedpoint', function(e) {
var databpid = $(this).attr('data-bp-id') || '',
bpIdArr = databpid.split('_'),
hasParentBp = false;
bpIdArr = databpid.split('_');
var $target = $(e.target),
partentBpLength = $target.parents('.buriedpoint').length;
if ($(e.target).parents('.buriedpoint').length > 0) {
hasParentBp = true;
}
if (!hasParentBp && bpIdArr && bpIdArr.length >= basicBpDataLength) {
sendBpData(bpIdArr);
}
if ($target.hasClass('buriedpoint') && partentBpLength > 0 ||
partentBpLength >= 2) {
hasParentBp = true;
}
});
};
... ... @@ -250,7 +254,7 @@ function reMarginFooter(fixedElement) {
$(document).on('shouldSendBpData', function(e, dataPbId) {
var bpIdArr;
if (dataPbId && (dataPbId.length && dataPbId.length > 0)) {
if (dataPbId && dataPbId.length && dataPbId.length > 0) {
hasParentBp = false;
bpIdArr = dataPbId.split('_');
sendBpData(bpIdArr);
... ...
... ... @@ -46,6 +46,10 @@ module.exports = function(specificGender) {
'1,3' : '2,3',
url = '/product/recom/maylike?gender=' + gender;
}
//日韩馆-你可能喜欢的
if ($('.mobile-wrap').hasClass('yoho-channel-page')) {
url = '/product/recom/newPreference?template_id=' + $.queryString().template_id;
}
$curNav = $navList.children('.focus');
... ...
... ... @@ -29,8 +29,12 @@ function highlightMainItem() {
var $mainItem = $('.filter-body .classify');
$mainItem.on('touchstart', '.shower', function() {
var bpIdData = $(this).attr('data-bp-id') || '';
$mainItem.removeClass('highlight');
$(this).addClass('highlight');
$(document).trigger('shouldSendBpData', [bpIdData]);
}).on('touchend touchcancel', '.shower', function() {
$(this).removeClass('highlight');
});
... ...
... ... @@ -68,6 +68,7 @@ $('#likeBtn').on('touchstart', function() {
$('#addtoCart').on('touchstart', function() {
$('.cart-bar').hide();
productCode && chosePanel.setLimitGoodModeWithSknId(productCode, skn);
chosePanel.show();
... ... @@ -81,3 +82,8 @@ $('#addtoCart').on('touchstart', function() {
return false;
});
$('#buyLimit').on('touchstart', function() {
tip.show('打开APP可抢购该商品哦~');
return false;
});
... ...
... ... @@ -600,7 +600,7 @@ $subNav.on('touchend touchcancel', function(e) {
nav,
navType,
$active;
var bpIdData = $(this).find('.buriedpoint').attr('data-bp-id') || '';
var bpIdData = $this.attr('data-bp-id') || '';
e.preventDefault();
$(document).trigger('shouldSendBpData', [bpIdData]);
... ...
... ... @@ -40,7 +40,6 @@
}
.owner-info {
border-bottom: 1px solid #e0e0e0;
line-height: 1.5;
}
.range{
... ... @@ -207,26 +206,23 @@
visibility: hidden;
.reason-box {
border-bottom: solid 1px #CCCCCC;
border-bottom: 1px solid #ccc;
font: inherit;
vertical-align: baseline;
position: absolute;
left: 50%;
top: 50%;
margin-left: -270px;
margin-top: -290px;
width: 540px;
height:580px;
bottom: 0;
width: 100%;
height: 380px;
color: #444;
background: #fff;
border-radius: 10px;
padding-bottom: 20px;
.box-head {
height: 60px;
line-height: 60px;
text-align: right;
font-size: 36px;
font-size: 24px;
background: rgb(240, 240, 240);
padding-right: 30px;
}
... ... @@ -234,15 +230,17 @@
.box-main {
background: #FFFFFF;
padding: 20px;
height:480px;
height:300px;
.active-mask {
width: 500px;
height: 60px;
position: absolute;
left: 50%;
top: 50%;
margin-top: -44px;
height: 88px;
margin-top: -18px;
margin-left: -250px;
z-index: 8;
width: 500px;
background: rgba(255, 255, 255, 0.1);
border-bottom: 1px solid rgb(223,224,224);
border-top: 1px solid rgb(223,224,224);
... ... @@ -253,18 +251,16 @@
text-align: center;
background: #FFF;
color: rgba(0, 0, 0, .5);
font-size: 38px;
font-size: 28px;
}
.swiper-slide-active {
padding-top: 0;
font-style: normal;
font-size: 38px;
color: rgb(0,0,0);
line-height: 78px;
font-size: 32px;
color: rgb(0, 0, 0);
line-height: 58px;
}
}
}
}
... ...
... ... @@ -12,19 +12,15 @@
visibility: hidden;
.reason-box {
border-bottom: solid 1px #CCCCCC;
border-bottom: 1px solid #ccc;
font: inherit;
vertical-align: baseline;
position: absolute;
left: 50%;
top: 50%;
margin-left: -270px;
margin-top: -290px;
width: 540px;
height:580px;
bottom: 0;
width: 100%;
height: 380px;
color: #444;
background: #fff;
border-radius: 10px;
padding-bottom: 20px;
.box-head {
... ... @@ -39,15 +35,17 @@
.box-main {
background: #FFFFFF;
padding: 20px;
height:480px;
height:300px;
.active-mask {
width: 500px;
height: 60px;
position: absolute;
left: 50%;
top: 50%;
margin-top: -44px;
height: 88px;
margin-top: -18px;
margin-left: -250px;
z-index: 8;
width: 500px;
background: rgba(255, 255, 255, 0.1);
border-bottom: 1px solid rgb(223,224,224);
border-top: 1px solid rgb(223,224,224);
... ... @@ -58,15 +56,15 @@
text-align: center;
background: #FFF;
color: rgba(0, 0, 0, .5);
font-size: 38px;
font-size: 28px;
}
.swiper-slide-active {
padding-top: 0;
font-style: normal;
font-size: 38px;
color: rgb(0,0,0);
line-height: 78px;
font-size: 32px;
color: rgb(0, 0, 0);
line-height: 58px;
}
}
}
... ...
... ... @@ -68,12 +68,13 @@
text-overflow: ellipsis;
white-space: nowrap;
}
.brand-name {
width: 60%;
font-size: 28px;
width: 40%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
position: absolute;
}
.brand-thumb {
... ... @@ -85,7 +86,6 @@
}
.entry {
width: 150px;
color: #999;
font-size: 28px;
float: right;
... ...
... ... @@ -14,6 +14,7 @@
.shop-back-img {
height: 100%;
width: 100%;
}
}
... ...
... ... @@ -38,17 +38,16 @@
<ul class="history clearfix local-history">
</ul>
</div>
<div class="hot-search">
<h3><span class="iconfont">&#xe64b;</span>热门搜索</h3>
<ul class="hot clearfix">
{{# hot}}
<li>
<a href="{{url}}" brandName="{{name}}"">{{name}}</a>
</li>
{{/ hot}}
</ul>
</div>
{{# hot}}
<div class="hot-search">
<h3><span class="iconfont">&#xe64b;</span>热门搜索</h3>
<ul class="hot clearfix">
<li>
<a href="{{url}}" brandName="{{name}}"">{{name}}</a>
</li>
</ul>
</div>
{{/ hot}}
</div>
</div>
... ...
... ... @@ -38,10 +38,10 @@
</div>
<div id="load-more-info" class="load-more-info">
<div class="loading status">
<div class="loading status hide">
正在加载...
</div>
<span class="no-more status hide">没有更多啦</span>
<span class="no-more status">没有更多啦</span>
</div>
<input id="gender" type="hidden" value={{gender}}>
{{/ guang}}
... ...
... ... @@ -20,10 +20,10 @@
</div>
<div id="load-more-info" class="load-more-info">
<div class="loading status">
<div class="loading status hide">
正在加载...
</div>
<span class="no-more status hide">没有更多啦</span>
<span class="no-more status">没有更多啦</span>
</div>
{{#if tag}}
... ...
... ... @@ -152,7 +152,7 @@
{{/if}}
{{#if canBuyLimit}}
<a href="javascript:;" id="addtoCart" class="addto-cart">立即购买</a>
<a href="javascript:;" id="buyLimit" class="addto-cart">立即购买</a>
{{/if}}
{{#if noLimitCode}}
... ...
... ... @@ -91,7 +91,7 @@
<div class="popularity-title">
人气单品
<a class="more" href="{{more_url}}">&#xe618;</a>
<a class="more buriedpoint" href="{{more_url}}" data-bp-id="shop_popularity_{{more_url}}">&#xe618;</a>
</div>
<ul class="product-list">
... ...
... ... @@ -3,14 +3,14 @@
<div class="filter-body">
<ul class="classify">
{{#each classify}}
<li class="buriedpoint classify-item{{#if @first}} active{{/if}}" data-bp-id="filter_classify_{{name}}_1">
<p class="shower{{#if default}} default{{/if}}">
<li class="classify-item{{#if @first}} active{{/if}}">
<p class="buriedpoint shower{{#if default}} default{{/if}}" data-bp-id="filter_classify_{{title}}_1">
<span class="title">{{title}}:</span>
{{name}}
</p>
<ul class="sub-classify" data-type={{dataType}}>
{{# subs}}
<li class="buriedpoint sub-item{{#if chosed}} chosed{{/if}}" data-id={{dataId}} data-bp-id="filter_subclassify_{{name}}_1">
<li class="buriedpoint sub-item{{#if chosed}} chosed{{/if}}" data-id="{{dataId}}" data-bp-id="filter_subclassify_{{name}}_1">
{{name}}
<i class="iconfont chosed-icon">&#xe617;</i>
</li>
... ...
... ... @@ -17,7 +17,7 @@
<img class="brand-thumb" src={{thumb}}>
<span class="brand-name">{{name}}</span>
<span class="entry">
进入品牌
进入店铺
<i class="iconfont">&#xe614;</i>
</span>
</a>
... ...
... ... @@ -295,8 +295,11 @@ class UserModel
$brand['brandName'] = $val['brand_name'];
$brand['update'] = $val['new_product_num'];
$brand['discount'] = $val['product_discount_num'];
$brand['link'] = Helpers::url('', array(), $val['brand_domain']);
if ($val['brandOrShopType'] == 'brandOrShopType') {
$brand['link'] = Helpers::url('/product/index/brand', array('shop_id' => $val['shop_id']));
} else {
$brand['link'] = Helpers::url('', array(), $val['brand_domain']);
}
// 处理品牌产品
$product = array();
foreach ($val['new_product'] as $one) {
... ...
... ... @@ -189,14 +189,8 @@ class IndexController extends AbstractAction
// 构建资讯文章内容
if (!empty($article['data']['list']['artList'])) {
$build = array();
// foreach ($article['data']['list']['artList'] as $article) {
// $build[] = Helpers::formatArticle($article, true, $isApp, false, $uid);
// }
foreach ($article['data']['list']['artList'] as $articlekey =>$article) {
$build[$articlekey] = Helpers::formatArticle($article, true, $isApp, false, $uid);
if($this->isApp()){
$build[$articlekey]['collect']['url'] = Helpers::url('/author/index', array('id' => $id), 'guang');
}
foreach ($article['data']['list']['artList'] as $article) {
$build[] = Helpers::formatArticle($article, true, $isApp, false, $uid);
}
$data['guang']['infos'] = $build;
}
... ...
... ... @@ -61,7 +61,7 @@ class InfoController extends AbstractAction
//guang双头部的问题 20160601
$authorTmp = explode("?id=", $detail['getAuthor']['url']);
$authorId=$authorTmp[1];
$data['guang']['author']['url'] = Helpers::getUrlSafe($detail['getAuthor']['url']) .'&openby:yohobuy={"action":"go.h5","params":{"param":{"id":"' . $authorId . '"},"share":"","id":' .$authorId . ',"type":0,"islogin":"N","url":"'.'https:'.Helpers::url('/author/index', array(), 'guang').'"}}';
$data['guang']['author']['url'] = Helpers::getUrlSafe($detail['getAuthor']['url']) .'&openby:yohobuy={"action":"go.h5","params":{"param":{"id":"' . $authorId . '"},"share":"","id":' .$authorId . ',"type":0,"islogin":"N","url":"'.'http:'.Helpers::url('/author/index', array(), 'guang').'"}}';
}
$data['detail'] = array();
... ...
... ... @@ -4,6 +4,7 @@ use Action\AbstractAction;
use LibModels\Wap\Guang\PlusstarData;
use Plugin\Helpers;
use Plugin\Images;
use Plugin\UdpLog;
/**
* 明星品牌和原创品牌
... ... @@ -119,6 +120,7 @@ class PlusstarController extends AbstractAction
} catch (\Exception $e) {
// do nothing
}
UdpLog::info('==$brandInfo==', $brandInfo);
if (empty($brandInfo['getBrandInfo']['data']['brand_id'])) {
break;
}
... ... @@ -164,7 +166,16 @@ class PlusstarController extends AbstractAction
// 相关文章
foreach ($brandInfo['getArticleByBrand'] as $value) {
$result = Helpers::formatArticle($value, false, $isApp, false, $uid);
$result = Helpers::formatArticle($value, false, false, false, $uid);
// $result = array(
// 'id' => $value['id'],
// 'url' => $value['id'],
// 'title' => $value['id'],
// 'pageView' => $value['id'],
// 'img' => $value['src'],
// 'text' => $value['intro'],
// 'publishTime' => $value['publish_time']
// );
if (!$isApp) {
$result['like'] = $value['like'];
}
... ...
... ... @@ -163,5 +163,47 @@ class RecomController extends AbstractAction
$this->_view->display('maylikelife', $data);
}
/**
* 日韩馆-你可能喜欢的
*/
public function newPreferenceAction()
{
$data = array();
do {
/* 判断是否是AJAX请求 */
if (!$this->isAjax()) {
break;
}
//模板id
$templateId = $this->get('template_id', 0);
/* 创意生活只有一页数据 */
$page = $this->get('page', 1);
if (intval($page) > 1 || empty($templateId)) {
break;
}
/* 取可能喜欢的数据 */
$recom = RecomData::newPreference($templateId);
/* 构建人气单品数据 */
if (empty($recom) || empty($recom['data']['product_list'])) {
break;
}
$data = array();
$build = array();
$build['show'] = true;
foreach ($recom['data']['product_list'] as $value) {
$build['goods'][] = Helpers::formatProduct($value, true, false, false);
}
$data['goodsContainer'][] = $build;
} while (false);
$this->_view->display('maylikelife', $data);
}
}
... ...