Authored by 郝肖肖

合master

Showing 53 changed files with 654 additions and 773 deletions
<?php return function ($in, $debugopt = 1) {
$cx = array(
'flags' => array(
'jstrue' => false,
'jsobj' => false,
'spvar' => true,
'prop' => false,
'method' => false,
'mustlok' => true,
'echo' => false,
'debug' => $debugopt,
),
'constants' => array(),
'helpers' => array(),
'blockhelpers' => array(),
'hbhelpers' => array(),
'partials' => array(),
'scopes' => array(),
'sp_vars' => array('root' => $in),
'lcrun' => 'Plugin\LCRun3',
);
return ''.''.'<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('title')), ENT_QUOTES, 'UTF-8').'</title>
<meta name="keywords" content="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('keywords')), ENT_QUOTES, 'UTF-8').'">
<meta name="description" content="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('description')), ENT_QUOTES, 'UTF-8').'">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="cleartype" content="on">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta content="telephone=no" name="format-detection" />
<meta content="email=no" name="format-detection" />
<script type="text/javascript">
(function(doc, win) {
var docEl = doc.documentElement;
(function() {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
docEl.style.fontSize = 20 * (clientWidth / 320) + \'px\';
}());
})(document, window);
</script>
<link rel="dns-prefetch" href="//cdn.yoho.cn">
<link rel="dns-prefetch" href="//static.yohobuy.com">
<link rel="dns-prefetch" href="//img12.static.yhbimg.com">
<link rel="dns-prefetch" href="//img13.static.yhbimg.com">
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('rlsEnv')), $in, function($cx, $in) {return '<link rel="stylesheet" href="//cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/index.css">
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('preEnv')), $in, function($cx, $in) {return '<link rel="stylesheet" href="//cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/index.css">
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('testEnv')), $in, function($cx, $in) {return '<link rel="stylesheet" href="//cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/index.css">
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('devEnv')), $in, function($cx, $in) {return '<link rel="stylesheet" href="//static.dev.yohobuy.com/css/index.css">
';}).'<link rel="apple-touch-icon-precomposed" href="//static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png">
<link rel="apple-touch-startup-image" sizes="640x920" href="//static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)">
<link rel="apple-touch-startup-image" sizes="320x460" href="//static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)">
</head>
<body class="'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('isPassportPage')), $in, function($cx, $in) {return 'passport-body';}).' '.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('isWechat')), $in, function($cx, $in) {return 'wechat-body';}).'">
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('systemUpdate')), $in, function($cx, $in) {return ' <div class="systemUpdate">
<a href="index/systemUpdate" class="systemHeader">Yoho!Buy有货关于系统升级的公告</a>
<span>X</span>
</div>
';}).''.''.''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('pageHeader')), $in, false, function($cx, $in) {return '<header id="yoho-header" class="yoho-header'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('boys')), $in, function($cx, $in) {return ' boys';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('girls')), $in, function($cx, $in) {return ' girls';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('kids')), $in, function($cx, $in) {return ' kids';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('lifeStyle')), $in, function($cx, $in) {return ' life-style';}).'">
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('navBack')), $in, false, function($cx, $in) {return ' <a href="'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('backUrl')), $in, function($cx, $in) {return ''.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('backUrl')), ENT_QUOTES, 'UTF-8').'';}, function($cx, $in) {return 'javascript:history.go(-1);';}).'" class="iconfont nav-back buriedpoint" data-bp-id="page_header_back_0">&#xe610;</a>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('navBtn')), $in, false, function($cx, $in) {return ' <span class="iconfont nav-home">&#xe638;</span>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('shopPage')), $in, false, function($cx, $in) {return ' <a href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('url')), ENT_QUOTES, 'UTF-8').'" class="nav-sub-right">'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').'</a>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('currencyPage')), $in, false, function($cx, $in) {return ' <a href="/home/helpDetail?code=20151230-102233&caption=有货币介绍" class="iconfont nav-home">&#xe639;</a>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('currencyDetailPage')), $in, false, function($cx, $in) {return ' <a href="/home/helpDetail?code=20111130-152530&caption=如何使用有货币支付" class="iconfont nav-home">&#xe639;</a>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('navPhone')), $in, false, function($cx, $in) {return ' <a href="'.htmlentities((string)$in, ENT_QUOTES, 'UTF-8').'" class="iconfont nav-home">&#xe641;</a>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('navTitle')), $in, false, function($cx, $in) {return ' <p class="nav-title">'.htmlentities((string)$in, ENT_QUOTES, 'UTF-8').'</p>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('suggestSub')), $in, false, function($cx, $in) {return ' <span class="nav-btn">提交</span>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('orderDetail')), $in, false, function($cx, $in) {return ' <a href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('serviceUrl')), ENT_QUOTES, 'UTF-8').'" target="_blank" class="iconfont nav-home">&#xe63c;</a>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('invoiceNotice')), $in, false, function($cx, $in) {return ' <span class="invoice-btn">'.htmlentities((string)$in, ENT_QUOTES, 'UTF-8').'</span>
';}).'</header>
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('navBtn')), $in, false, function($cx, $in) {return '<div class="homebuttom hide '.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $cx['scopes'][count($cx['scopes'])-1], array('boys')), $in, function($cx, $in) {return ' boys';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $cx['scopes'][count($cx['scopes'])-1], array('girls')), $in, function($cx, $in) {return ' girls';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $cx['scopes'][count($cx['scopes'])-1], array('kids')), $in, function($cx, $in) {return ' kids';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $cx['scopes'][count($cx['scopes'])-1], array('lifeStyle')), $in, function($cx, $in) {return ' life-style';}).'">
<ul>
<li>
<a href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('indexUrl')), ENT_QUOTES, 'UTF-8').'">
<i class="iconfont">&#xe62a;</i>
<span>首页</span>
</a>
</li>
<li>
<a href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('categoryUrl')), ENT_QUOTES, 'UTF-8').'">
<i class="iconfont">&#xe62d;</i>
<span>分类</span>
</a>
</li>
<li>
<a href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shoppingCartUrl')), ENT_QUOTES, 'UTF-8').'">
<i class="iconfont">&#xe62c;</i>
<span>购物车</span>
</a>
</li>
<li>
<a href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('mineUrl')), ENT_QUOTES, 'UTF-8').'">
<i class="iconfont">&#xe62b;</i>
<span>我的</span>
</a>
</li>
</ul>
</div>
';}).'
';}).''.''.'<div class="ps-detail-page ps-page yoho-page">
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('ps')), $in, false, function($cx, $in) {return ' <div id="brand-info" class="header brand-info ps-block" data-id="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('id')), ENT_QUOTES, 'UTF-8').'">
<img class="banner lazy" data-original="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('banner')), ENT_QUOTES, 'UTF-8').'">
<img class="logo lazy" data-original="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('logo')), ENT_QUOTES, 'UTF-8').'">
<div class="header-content clearfix">
<p class="name-islike-container">
<span class="name">'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('name')), ENT_QUOTES, 'UTF-8').'</span>
<a id="brand-like" class="brand-islike iconfont '.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('isLike')), $in, false, function($cx, $in) {return 'like';}).'" href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('likeUrl')), ENT_QUOTES, 'UTF-8').'">
&#xe605;
</a>
</p>
<div id="more-intro-click-range" class="clearfix">
<p id="intro" class="intro">
'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('intro')), ENT_QUOTES, 'UTF-8').'
</p>
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('intro')), $in, function($cx, $in) {return ' <span id="more-intro" class="more-intro">
<span id="intro-more-txt">more</span>
<i class="icon iconfont">&#xe609;</i>
</span>
';}).' </div>
</div>
</div>
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('newArrival')), $in, false, function($cx, $in) {return ' <div class="new-arrival ps-block">
<div class="floor-header-more">
<h2>NEW ARRIVAL</h2>
<a class="more-btn iconfont buriedpoint" href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('moreUrl')), ENT_QUOTES, 'UTF-8').'" data-bp-id="shop_more_btn_0">&#xe606;</a>
</div>
<div class="new-arrival-content clearfix">
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('naList')), $in, false, function($cx, $in) {return ''.'
'.Plugin\LCRun3::ifv($cx, $in, $in, function($cx, $in) {return '
<div class="good-info" data-id="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('id')), ENT_QUOTES, 'UTF-8').'">
<div class="tag-container clearfix">
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('tags')), $in, false, function($cx, $in) {return ''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('is_new')), $in, false, function($cx, $in) {return ' <p class="good-tag new-tag">NEW</p>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('is_advance')), $in, false, function($cx, $in) {return ' <p class="good-tag renew-tag">再到着</p>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('is_discount')), $in, false, function($cx, $in) {return ' <p class="good-tag sale-tag">SALE</p>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('is_yohood')), $in, false, function($cx, $in) {return ' <p class="good-tag new-festival-tag">新品节</p>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('is_limited')), $in, false, function($cx, $in) {return ' <p class="good-tag limit-tag">限量商品</p>
';}).'';}).' </div>
<div class="good-detail-img">
<a class="good-thumb buriedpoint" href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('url')), ENT_QUOTES, 'UTF-8').'" data-bp-id="shop_good_'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('thumb')), ENT_QUOTES, 'UTF-8').'_0">
<img class="lazy" data-original="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('thumb')), ENT_QUOTES, 'UTF-8').'">
</a>
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('is_soon_sold_out')), $in, false, function($cx, $in) {return ' <p class="few-tag">即将售罄</p>
';}).' </div>
<div class="good-detail-text">
<div class="name">
<a href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('url')), ENT_QUOTES, 'UTF-8').'">'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('name')), ENT_QUOTES, 'UTF-8').'</a>
</div>
<div class="price '.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('students')), $in, function($cx, $in) {return 'student-price';}).'">
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('students')), $in, function($cx, $in) {return ' <span class="sale-price '.((Plugin\LCRun3::isec($cx, Plugin\LCRun3::v($cx, $in, array('price')))) ? 'no-price' : '').'">¥'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('studentPrice')), ENT_QUOTES, 'UTF-8').'</span>
<span class="students-price-tag"></span>
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('salePrice')), $in, false, function($cx, $in) {return ' <span class="market-price">¥'.htmlentities((string)$in, ENT_QUOTES, 'UTF-8').'</span>
';}).'';}, function($cx, $in) {return ' <span class="sale-price '.((Plugin\LCRun3::isec($cx, Plugin\LCRun3::v($cx, $in, array('price')))) ? 'no-price' : '').'">¥'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('salePrice')), ENT_QUOTES, 'UTF-8').'</span>
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('price')), $in, false, function($cx, $in) {return ' <span class="market-price">¥'.htmlentities((string)$in, ENT_QUOTES, 'UTF-8').'</span>
';}).'';}).' </div>
</div>
</div>
';}).''.'';}).' </div>
<div class="more-goods-container">
<a class="mg-text" href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('moreUrl')), ENT_QUOTES, 'UTF-8').'">
更多商品
<span class="more-prods iconfont">&#xe604;</span>
</a>
</div>
</div>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('infos')), $in, function($cx, $in) {return ' <div class="related-infos ps-block">
<div>
<h2 class="related-info-title">相关资讯</h2>
</div>
<div id="related-infos-container" class="related-infos-container">
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('infos')), $in, false, function($cx, $in) {return ''.' <div class="guang-info" data-id="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('id')), ENT_QUOTES, 'UTF-8').'">
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('author')), $in, false, function($cx, $in) {return ' <a class="info-author clearfix" href='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('url')), ENT_QUOTES, 'UTF-8').'>
<img class="lazy avatar" data-original='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('avatar')), ENT_QUOTES, 'UTF-8').'>
<span class="name">'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('name')), ENT_QUOTES, 'UTF-8').'</span>
</a>
';}).'
<div class="info-img">
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('showTags')), $in, function($cx, $in) {return ' <a href="javascript:;" class="info-match">
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('isTip')), $in, false, function($cx, $in) {return ' 小贴士
<div class="info-tag tip"></div>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('isCollocation')), $in, false, function($cx, $in) {return ' 搭配
<div class="info-tag collocation"></div>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('isFashionMan')), $in, false, function($cx, $in) {return ' 潮人
<div class="info-tag fashion-man"></div>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('isFashionGood')), $in, false, function($cx, $in) {return ' 潮品
<div class="info-tag fashion-good"></div>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('isTopic')), $in, false, function($cx, $in) {return ' 话题
<div class="info-tag topic"></div>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('isSpecialTopic')), $in, false, function($cx, $in) {return ' 专题
<div class="info-tag special-topic"></div>
';}).' </a>
';}).' <a href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('url')), ENT_QUOTES, 'UTF-8').'">
<img class="lazy" data-original="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('img')), ENT_QUOTES, 'UTF-8').'" alt="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('alt')), ENT_QUOTES, 'UTF-8').'">
</a>
</div>
<div class="info-deps">
<a class="info-title-container" href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('url')), ENT_QUOTES, 'UTF-8').'">
<h2 class="info-title">'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('title')), ENT_QUOTES, 'UTF-8').'</h2>
</a>
<p class="info-text">'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').'</p>
'.' <div class="time-view-like-share clearfix">
<i class="iconfont">&#xe603;</i>
'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('publishTime')), ENT_QUOTES, 'UTF-8').'&nbsp;&nbsp;&nbsp;&nbsp;
<i class="iconfont">&#xe602;</i>
<span class="page-view">'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('pageView')), ENT_QUOTES, 'UTF-8').'</span>
<div class="like-share-container">
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('like')), $in, false, function($cx, $in) {return ' <i class="iconfont like-btn'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('isLiked')), $in, false, function($cx, $in) {return ' like';}).'">&#xe601;</i>
<span class="like-count">'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('count')), ENT_QUOTES, 'UTF-8').'</span>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('collect')), $in, false, function($cx, $in) {return ' <a href='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('url')), ENT_QUOTES, 'UTF-8').'>
<i class="iconfont collect-btn'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('isCollected')), $in, false, function($cx, $in) {return ' collected';}).'">&#xe605;</i>
</a>
';}).''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('share')), $in, false, function($cx, $in) {return ' <a href="'.htmlentities((string)$in, ENT_QUOTES, 'UTF-8').'" class="iconfont share-btn">&#xe600;</a>
';}).' </div>
</div>'.' </div>
</div>'.'';}).' </div>
</div>
';}).'
<input id="jump-to-app" type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('jumpToApp')), ENT_QUOTES, 'UTF-8').'">
<input id="shareLink" type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareLink')), ENT_QUOTES, 'UTF-8').'">
<input id="shareImg" type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareImg')), ENT_QUOTES, 'UTF-8').'">
<input id="shareTitle" type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareTitle')), ENT_QUOTES, 'UTF-8').'">
<input id="shareDesc" type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareDesc')), ENT_QUOTES, 'UTF-8').'">
';}).'</div>
'.''.''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('pageFooter')), $in, false, function($cx, $in) {return '<footer id="yoho-footer" class="yoho-footer hide">
<p class="op-row">
<span class="back-to-top">
Back to top
<i class="iconfont">&#xe608;</i>
</span>
</p>
<address class="copyright">
CopyRight©2007-2016 南京新与力文化传播有限公司
</address>
</footer>
';}).'
'.''.''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('showDownloadApp')), $in, false, function($cx, $in) {return '<div class="float-layer hide" id="float-layer-app">
<div class="float-layer-left">
<span class="yoho-icon iconfont">&#xe60d;</span>
<p>新用户送惊喜礼包</p>
</div>
<a href="javascript:void(0);" id="float-layer-close" >
<i class="close-icon iconfont">&#xe623;</i>
<div class="circle-rightbottom"></div>
</a>
<a href="javascript:void(0);" id="float-layer-btn">
立即下载
</a>
</div>
';}).'
'.''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('hasWxShare')), $in, function($cx, $in) {return '<script type="text/javascript" charset="utf-8" src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('rlsEnv')), $in, function($cx, $in) {return '<script src="//cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/lib.js"></script>
<script src="//cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/index.js"></script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('preEnv')), $in, function($cx, $in) {return '<script src="//cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/lib.js?v='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'"></script>
<script src="//cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/index.js?v='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'"></script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('testEnv')), $in, function($cx, $in) {return '<script src="//cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/lib.js?v='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'"></script>
<script src="//cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/index-debug.js?v='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'"></script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('devEnv')), $in, function($cx, $in) {return '<script src="//127.0.0.1:8000/static/js/sea.js?nowrap"></script>
<script>seajs.config({base: \'//127.0.0.1:8000/\'});</script>
';}).''.'<script>
seajs.use(\'js/common\');
</script>
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('psList')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/guang/plus-star/list\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('psDetail')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/guang/plus-star/detail\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('guangHome')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/guang/home\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('guangList')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/guang/list\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('guangDetail')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/guang/detail\', function(d) {
d.i(true);
});
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('guangEzine')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/guang/detail\', function(d) {
d.i(false);
});
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('regIndex')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/passport/register/register\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('regCode')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/passport/register/code\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('regPwd')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/passport/register/password\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('bindIndex')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/passport/bind/bind\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('bindCode')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/passport/bind/code\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('relateCode')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/passport/bind/relate\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('bindPwd')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/passport/bind/password\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('loginIndex')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/passport/login/login\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('loginInternational')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/passport/login/international\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('backEmail')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/passport/back/email\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('backEmailSuccess')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/passport/back/email-success\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('backMobile')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/passport/back/mobile\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('backCode')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/passport/back/code\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('backNewPwd')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/passport/back/new-password\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('channelPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/index/channel\');
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('grilsHomePage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/home/home\', function(h) {
h.set(\'girls\');
});
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('boysHomePage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/home/home\', function(h) {
h.set(\'boys\');
});
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('kidsHomePage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/home/home\', function(h) {
h.set(\'kids\');
});
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('lifestyleHomePage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/home/home\', function(h) {
h.set(\'lifestyle\');
});
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('secondChannelPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/home/home\');
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('newArrivalPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/product/newsale/newarrival\');
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('discountPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/product/newsale/discount\');
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('hotrankPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/product/newsale/hot-rank\');
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('goodListPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/product/list\');
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('goodsDetailPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/product/detail/detail\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('goodsCommentsPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/product/detail/loadmore\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('goodsConsultsPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/product/detail/comments-consults\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('consultformPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/product/detail/consultform\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('categoryPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/category/index\');
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('brandPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/category/brand\');
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('searchPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/index/search\');
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('shoppingCartPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/cart/cart\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('giftPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/cart/gift-advance\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('advanceBuyPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/cart/gift-advance\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('orderEnsurePage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/cart/order-ensure\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('invoiceInfoPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/cart/invoice-info\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('selectAddressPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/address\');
seajs.use(\'js/cart/select-address\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('selectCouponPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/cart/select-coupon\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('myIndexPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/index\');
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('orderPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/order\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('orderDetailPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/order-detail\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('favPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/fav\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('suggestPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/suggest\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('couponsPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/coupons\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('onlineServicePage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/online-service\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('onlineServiceDetailPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/index/footer\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('addressPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/address\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('addressActionPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/address-act\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('myGuangPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/my-guang\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('personalDetailsPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/personal-details\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('browseRecordPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/browse-record\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('logisticInfoPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/logistic\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('payCenterPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/pay\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('currencyDetail')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/currency\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('currencyPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/currency-new\');
</script>
';}).'
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('trendClassHomePage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/guang/star-classroom\');
seajs.use(\'js/guang/calendar\');
</script>
';}).'
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('trendClassCollocationPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/guang/collocation-list\');
</script>
';}).'
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('trendClassTopPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/guang/check-top\');
</script>
';}).'
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('messagePage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/message\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('messageDetailPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/message-detail\');
</script>
';}).'
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('floorPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/index/coupon\');
</script>
';}).'
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('jitDetailPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/cart/jit-detail\');
</script>
';}).'
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('productCategoryPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/product/product-category\');
</script>
';}).'
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('shopPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/product/shop\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('addressModifyPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/me/address-modify\');
seajs.use(\'js/me/address\');
</script>
';}).'
'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('lifePage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/life/login\');
</script>
';}).''.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('couponPage')), $in, function($cx, $in) {return '<script>
seajs.use(\'js/life/coupon\');
</script>
';}).''.''.'<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-W958MG" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>
var _hmt = _hmt || [];
function async_load(){
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({\'gtm.start\':
new Date().getTime(),event:\'gtm.js\'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=\'dataLayer\'?\'&l=\'+l:\'\';j.async=true;j.src=
\'//www.googletagmanager.com/gtm.js?id=\'+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,\'script\',\'dataLayer\',\'GTM-W958MG\');
}
window.addEventListener(\'load\', async_load, false);
</script>
'.'</body>
</html>
'.'';
}
?>
\ No newline at end of file
... ... @@ -155,16 +155,11 @@ class PlusstarData
if (isset($getUidBrandFav['code']) && $getUidBrandFav['code'] == 200) {
$cached['getUidBrandFav'] = true;
}else{
$getUidBrandFavResult = false;
$cached['getUidBrandFav'] = false;
}
}
}else{
$getUidBrandFavResult = false;
}
if (!empty($cached)) {
$cached['getUidBrandFav'] = $getUidBrandFavResult;
return $cached;
}
}
... ... @@ -177,14 +172,18 @@ class PlusstarData
$param['client_secret'] = Sign::getSign($param);
$brandInfo = Yohobuy::get(SERVICE_URL . self::URI_BRANDINFO_PLUSSTAR_NEW . 'getbrandinfo', $param, 3600);
if (!isset($brandInfo['data']['brand_id'])) {
// 再尝试获取二级缓存(master), 有数据则直接返回.
$cached = Cache::get($key, 'slave');
if (!empty($cached)) {
return $cached;
}
return $result;
} else {
// if (!isset($brandInfo['data']['brand_id'])) {
// // 再尝试获取二级缓存(master), 有数据则直接返回.
// $cached = Cache::get($key, 'slave');
// if (!empty($cached)) {
// return $cached;
// }
// return $result;
// } else {
// $result['getBrandInfo'] = $brandInfo;
// }
if (isset($brandInfo['data']['brand_id'])) {
$result['getBrandInfo'] = $brandInfo;
}
... ...
... ... @@ -109,6 +109,31 @@ class SearchData
}
/**
* 通过 SKN 查询商品
* @param $condition
* @return mixed
*/
public static function searchBySkn($condition)
{
$param = Yohobuy::param();
$param['method'] = 'h5.product.batch';
if (!isset($condition['order'])) {
$param['order'] = 's_t_desc';
}
if (!isset($condition['page'])) {
$param['page'] = 1;
}
if (!isset($condition['limit'])) {
$param['limit'] = 60;
}
if (!empty($condition)) {
$param += $condition;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(API_URL, $param);
}
/**
* 根据给定查询数据搜索数据列表 (新的)
*
* @param string $query 查询条件, 默认为null
... ...
... ... @@ -16,12 +16,12 @@ class ListProcess
* @param $data
* @return array 处理之后的商品数据
*/
public static function getListData($data, $returnFilter = true, $showTag = true, $tagNew = true, $tagSale = true)
public static function getListData($data, $returnFilter = true, $showTag = true, $tagNew = true, $tagSale = true, $coverChannel = '')
{
$result = array();
if (isset($data['product_list'])) {
$result['new'] = self::getProductData($data['product_list'], false, $showTag, $tagNew, $tagSale);
$result['new'] = self::getProductData($data['product_list'], false, $showTag, $tagNew, $tagSale, $coverChannel);
}
if ($returnFilter && isset($data['filter'])) {
$result['filter'] = self::getFilterData($data['filter']);
... ... @@ -36,13 +36,13 @@ class ListProcess
* @param $data
* @return array 处理之后的商品数据
*/
public static function getProductData($data, $isApp = false, $showTag = true, $tagNew = true, $tagSale = true)
public static function getProductData($data, $isApp = false, $showTag = true, $tagNew = true, $tagSale = true, $coverChannel = '')
{
// 处理商品
$products = array();
foreach ($data as $value) {
$products[] = Helpers::formatProduct($value, $showTag, $tagNew, $tagSale, 235, 314, true);
$products[] = Helpers::formatProduct($value, $showTag, $tagNew, $tagSale, 235, 314, true, true, $coverChannel);
}
return $products;
... ...
... ... @@ -122,7 +122,7 @@ class ShopProcess
self::$shopData['shopIntroHref'] = Helpers::url('/product/index/intro', array('shop_id' => self::$shopId, 'app_version' => self::$appVersion));
}
//搜索链接
self::$shopData['url'] = Helpers::url('', array('shop_id' => self::$shopId), 'search');
self::$shopData['url'] = Helpers::url('/index/search/searchShop', array('shop_id' => self::$shopId));
//人气单品的链接
self::$shopData['more_url'] = Helpers::url('', array('shop_id' => self::$shopId, 'order' => 's_n_d', 'title' => '人气单品',), 'search');
if (self::$appVersion) {
... ... @@ -305,7 +305,7 @@ class ShopProcess
}
/* tar modified 160826 根据资源位接口返回的 skn 去查数据,查到后取商品数据,查不到取资源位接口数据 */
$hotProducts = SearchData::searchByCondition($condition);
$hotProducts = SearchData::searchBySkn($condition);
if (isset($hotProducts['code']) && $hotProducts['code'] === 200 && isset($hotProducts['data']['product_list'])) {
foreach ($hotProducts['data']['product_list'] as $val) {
... ...
... ... @@ -126,6 +126,30 @@ class Helpers
return '1,2,3';
}
}
/**
* 根据yh_channel判断频道
*
* @return string
*/
public static function getYhHhannel($yhChannel)
{
if (empty($yhChannel)) {
return '';
}
switch (intval($yhChannel)) {
case 1: // 男
return '1,3';
case 2: // 女
return '2,3';
case 3://潮童
return '3,3';
case 4://创意生活
return '4,3';
default: // 其它
return '1,2,3';
}
}
/**
* 根据用户访问的COOKIE判断出频道
... ... @@ -235,9 +259,10 @@ class Helpers
* @param int $height 图片的高度
* @param bool $isApp 判断是不是APP访问
* @param bool $showPoint 商品价格是否显示小数位,默认显示
* @param bool $coverChannel 频道 | 1,3男,2,3女
* @return array | false
*/
public static function formatProduct($productData, $showTags = true, $showNew = true, $showSale = true, $width = 290, $height = 388, $isApp = false, $showPoint = true)
public static function formatProduct($productData, $showTags = true, $showNew = true, $showSale = true, $width = 290, $height = 388, $isApp = false, $showPoint = true, $coverChannel = '')
{
// 商品信息有问题,则不显示
if (!isset($productData['product_skn']) || !isset($productData['goods_list'][0])) {
... ... @@ -256,7 +281,7 @@ class Helpers
foreach ($productData['goods_list'] as $oneGoods) {
// 此skc是默认的,则将图片赋值给skn
if ($oneGoods['is_default'] === 'Y') {
$productData['default_images'] = self::procProductImg($oneGoods);
$productData['default_images'] = self::procProductImg($oneGoods, $productData['default_images'], $coverChannel);
$flag = true;
break;
}
... ... @@ -291,10 +316,13 @@ class Helpers
$result['url'] .= '?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":' . $productData['product_skn'] . '}}';
}
/* tar add 160909 sale 根据价格处理 sale 标签*/
$isShowSaleTagDis = $productData['sales_price'] * 2 < $productData['market_price'];
if ($showTags) {
$result['tags'] = array();
$result['tags']['is_new'] = $showNew && isset($productData['is_new']) && $productData['is_new'] === 'Y'; // 新品
$result['tags']['is_discount'] = $showSale && isset($productData['is_discount']) && $productData['is_discount'] === 'Y'; // 在售
$result['tags']['is_discount'] = $showSale && isset($productData['is_discount']) && $productData['is_discount'] === 'Y' && $isShowSaleTagDis; // 在售
$result['tags']['is_limited'] = isset($productData['is_limited']) && $productData['is_limited'] === 'Y'; // 限量
$result['tags']['is_yohood'] = isset($productData['is_yohood']) && $productData['is_yohood'] === 'Y'; // YOHOOD
$result['tags']['midYear'] = isset($productData['mid-year']) && $productData['mid-year'] === 'Y'; // 年中
... ... @@ -326,17 +354,32 @@ class Helpers
* @param array $images
* @return string 商品图片
*/
public static function procProductImg($images)
public static function procProductImg($images, $defaultImages = '', $coverChannel = '')
{
$img = '';
$imgUrl = isset($images['images_url']) ? $images['images_url'] : '';
$cover1 = isset($images['cover_1']) ? $images['cover_1'] : '';
$cover2 = isset($images['cover_2']) ? $images['cover_2'] : '';
$gender = self::getGenderByCookie();
if ($gender === '2,3') {
return !empty($cover2) ? $cover2 : (!empty($cover1) ? $cover1 : $imgUrl);
} else {
return !empty($cover1) ? $cover1 : (!empty($cover2) ? $cover2 : $imgUrl);
//如果选择了所有性别,则取当前频道
$gender = empty($coverChannel) || $coverChannel === '1,2,3' ? self::getGenderByCookie() : $coverChannel;
switch ($gender) {
case '1,3':
$img = empty($cover1) ? $imgUrl : $cover1;
break;
case '2,3':
$img = empty($cover2) ? $imgUrl : $cover2;
break;
default:
$img = $imgUrl;
break;
}
if (empty($img)) {
$img = $defaultImages;
}
return $img;
}
/**
... ...
No preview for this file type
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.
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.
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.
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.
... ... @@ -12,7 +12,7 @@ var $confim = $('.confim-mask'),
require('../common');
$('.address-item').on('touchend', function() {
$('.address-item').on('click', function() {
var $this = $(this);
var addressId = $this.data('address-id');
var address = {
... ... @@ -26,14 +26,15 @@ $('.address-item').on('touchend', function() {
orderInfo('addressId', addressId);
orderInfo('address', address);
window.location.href = $this.data('href') + (orderInfo('limitUrlSufix') || '');
}).on('touchend', '.edit', function() {
}).on('click', '.edit', function() {
window.location.href = $(this).data('href');
return false;
}).on('touchstart', '.del', function() {
}).on('click', '.del', function() {
deleteId = $(this).data('id');
});
$confim.on('touchend', '.confim', function() {
$confim.on('click', '.confim', function() {
if (orderInfo('addressId') === deleteId) {
orderInfo('addressId', null);
orderInfo('address', null);
... ...
... ... @@ -378,6 +378,11 @@ function search(opt) {
require('./suspend-cart'); //悬浮购物车
/* tar add 160914 */
if ($brandHeader.data('isbaseshop') === 1) {
Object.assign(defaultOpt, {shop_id: $brandHeader.data('id')});
}
$.ajax({
type: 'GET',
url: location.protocol + '//m.yohobuy.com/search/filter',
... ... @@ -557,14 +562,19 @@ if ($brandHeader.length > 0) {
var appVersion = $('input[name="app_version"]').val();
/* 如果是基础店铺,POST 的数据一样 */
postData = {
shop_id: id,
app_version: appVersion
};
if ($this.hasClass('coled')) {
postData = {
shop_id: id,
app_version: appVersion,
opt: 'cancel'
};
postUrl = '/product/index/cancelShopFav';
} else {
postData = {
shop_id: id,
app_version: appVersion,
opt: 'ok'
};
postUrl = '/product/index/shopFav';
}
} else {
... ... @@ -586,7 +596,7 @@ if ($brandHeader.length > 0) {
$.ajax({
type: 'POST',
type: 'GET',
url: postUrl,
data: postData,
success: function(data) {
... ... @@ -599,8 +609,12 @@ if ($brandHeader.length > 0) {
} else {
tip.show('取消收藏成功');
}
} else if (data.code === 400) {
location.href = data.data;//未登录跳转登录页
} else if (data.code === 401) {
url = data.url;
if ($('#jump-login').length <= 0) {
$('body').append('<a href=\'' + url + '\'><span id="jump-login"><span></a>');
}
$('#jump-login').click();
} else {
tip.show(data.message);
}
... ...
... ... @@ -33,6 +33,7 @@ var $subNav = $('.home-sub-nav'),
shopId = $('input[name="shop_id"]').val(),
appVersion = $('input[name="app_version"]').val(),
brand = $('input[name="brand"]').val(),
coverChannel = $('input[name="coverChannel"]').val(),
favId = $('input[name="favId"]').val();
var winH = $(window).height(),
... ... @@ -143,6 +144,10 @@ function getPageGoods(info) {
return;
}
if (info.data && coverChannel) {
info.data.coverChannel = coverChannel;
}
searching = true;
$.ajax({
type: 'GET',
... ... @@ -156,7 +161,7 @@ function getPageGoods(info) {
info.callBack(data);
},
error: function() {
alert('网络断开连接了~');
tip.show('网络断开连接了~');
searching = false;
}
});
... ... @@ -213,7 +218,7 @@ function hotData(callback) {
req.callBack = function(data) {
$('#popularity').append(data);
navInfo.hot.page++;
myScroll.refresh();
// myScroll.refresh();
lazyLoad($('#popularity .lazy'));
scH = $('#scroller').outerHeight();
searching = false;
... ... @@ -259,7 +264,7 @@ function tabChange(dom, index) {
$nav1.removeClass('fixed-top absolute');
$nav2.removeClass('fixed-top absolute');
}
myScroll && myScroll.refresh();
// myScroll && myScroll.refresh();
scH = $('#scroller').outerHeight();
if (!$nav1.hasClass('hide')) {
myScroll && myScroll.scrollTo(0, 0 - imgH);
... ... @@ -453,7 +458,7 @@ $(window).ready(function() {
setTimeout(function() {
scH = $('#scroller').outerHeight();
}, 1000);
}, 500);
myScroll.on('scroll', scrollHandler);
... ... @@ -498,6 +503,8 @@ function search(opt) {
opt.url = location.protocol + '//m.yohobuy.com/index/search/search';
}
$pre = $listNav.find('.active').eq(0);
if (!opt.nextPage) {
//筛选项变更则重置reload为true
... ... @@ -520,6 +527,8 @@ function search(opt) {
ext = {
gender: opt.id
};
ext.coverChannel = opt.id;
break;
case 'brand':
ext = {
... ... @@ -579,6 +588,12 @@ function search(opt) {
//不需要重新加载并且数据请求结束
return;
}
//封面图,defaultOpt对象也有可能包含coverChannel,但defaultOpt优先级高
if (coverChannel) {
setting.coverChannel = coverChannel;
}
$.extend(setting, defaultOpt, {
type: navType,
order: nav.order,
... ... @@ -588,10 +603,13 @@ function search(opt) {
if (brand) {
setting.brand = brand;
}
if (shopId) {
setting.shop_id = shopId;
}
searching = true;
loading.showLoadingMask();
... ... @@ -642,7 +660,7 @@ function search(opt) {
window.rePosFooter();
myScroll.refresh();
myScroll && myScroll.refresh();
reNav1Pos();
bindGoodThumbClick();
... ... @@ -680,18 +698,9 @@ $subNav.on('touchend touchcancel', function(e) {
//筛选面板切换状态
if ($this.hasClass('active')) {
filter.hideFilter();
//点击筛选钱的active项回复active
$pre.addClass('active');
$this.removeClass('active');
myScroll && myScroll.enable();
} else {
$pre = $this.siblings('.active');
$pre.removeClass('active');
$this.addClass('active');
myScroll && myScroll.scrollTo(0, -(imgH + main1oH + nav1H));
theY = imgH + main1oH + nav1H;
... ... @@ -736,7 +745,6 @@ $subNav.on('touchend touchcancel', function(e) {
// 价格/折扣切换排序状态
$this.find('.icon > .iconfont').toggleClass('cur');
$pre = $this; //更新pre为当前项
nav.reload = true; //重置reload,HTML会被替换为逆序的HTML
nav.order = nav.order === 0 ? 1 : 0; //切换排序
... ... @@ -760,8 +768,6 @@ $subNav.on('touchend touchcancel', function(e) {
} else {
$active = $subNav.find('.active');
$pre = $this; //$pre为除筛选导航的其他导航项,若当前active的为筛选,则把$pre置为当前点击项
if ($active.hasClass('filter')) {
//若之前active项为筛选,则隐藏筛选面板
... ... @@ -784,6 +790,9 @@ $subNav.on('touchend touchcancel', function(e) {
$dgc.removeClass('hide');
break;
}
theY = imgH + main1oH + nav1H;
reNav1Pos();
}
$subNav.children().removeClass('active');
... ... @@ -800,6 +809,8 @@ $subNav.on('touchend touchcancel', function(e) {
});
}
}
e.stopPropagation();
});
... ... @@ -823,14 +834,14 @@ $listNav.on('touchstart', 'li', function(e) {
$(this).addClass('bytouch');
}).on('touchend touchcancel', function() {
$listNav.find('li').removeClass('bytouch');
myScroll && myScroll.refresh();
// myScroll && myScroll.refresh();
});
$nav2.on('touchstart', 'li', function(e) {
$(this).addClass('bytouch');
}).on('touchend touchcancel', function() {
$nav2.find('li').removeClass('bytouch');
myScroll && myScroll.refresh();
// myScroll && myScroll.refresh();
});
//底部导航点击
... ... @@ -878,28 +889,31 @@ function postCollect(info) {
if (data.code === 200) {
if ($('#collect').hasClass('alreadyCollect')) {
$('#collect').attr('class', 'notCollect');
tip.show('取消收藏成功');
} else {
$('#collect').attr('class', 'alreadyCollect');
tip.show('收藏成功');
}
}
if (data.code === 401) {
url = 'http://m.yohobuy.com/signin.html?refer=' + encodeURIComponent(location.href) + '&openby:yohobuy=';
url += JSON.stringify({"action": "go.weblogin", "params": { "jumpurl": { "url": 'http://m.yohobuy.com' + location.pathname, "param": info.data }, "requesturl": { "param": {}, "url": "" }, "priority": "N" } });
$('body').append('<a href=\'' + url + '\'><span class="jump-login"><span></a>');
$('.jump-login').click();
// url = 'http://m.yohobuy.com/signin.html?refer=' + encodeURIComponent(location.href) + '&openby:yohobuy=';
// url += JSON.stringify({"action": "go.weblogin", "params": { "jumpurl": { "url": 'http://m.yohobuy.com' + location.pathname, "param": info.data }, "requesturl": { "param": {}, "url": "" }, "priority": "N" } });
url = data.url;
if ($('#jump-login').length <= 0) {
$('body').append('<a href=\'' + url + '\'><span id="jump-login"><span></a>');
}
$('#jump-login').click();
}
setTimeout(function() {
myScroll.refresh();
// myScroll.refresh();
scH = $('#scroller').outerHeight();
}, 1000);
}, 500);
searching = false;
},
error: function() {
alert('网络断开连接了~');
tip.show('网络断开连接了~');
searching = false;
}
});
... ...
{
"name": "yohobuy",
"version": "4.9.20",
"version": "4.9.23",
"description": "yohobuy statics",
"keywords": [],
"homepage": "",
... ...
... ... @@ -48,7 +48,7 @@
}
.default {
color: #999;
//color: #999;
}
.title {
... ...
... ... @@ -103,7 +103,7 @@
color: #444;
font-size: 22px;
line-height: 30px;
padding: 5px 0; /* 商品标题限制行数的bug修复 增加元素的clientHeight */
padding: 3px 0; /* 商品标题限制行数的bug修复 增加元素的clientHeight */
display: -webkit-box;
overflow: hidden;
word-break: break-all;
... ...
... ... @@ -473,6 +473,14 @@
}
.title {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
word-break: break-all;
overflow: hidden;
}
.publish-time {
font-size: 18px;
margin-top: 0;
... ...
... ... @@ -49,7 +49,6 @@
.img-cover {
position: absolute;
//background-image: url('/product/shop_bg_hot.png');
height: 42px;
line-height: 42px;
text-align: center;
... ...
{{> layout/header}}
<div class="good-list-page search-page yoho-page">
{{> product/shop-list}}
</div>
{{#if students}}
<div class="float-layer students-layer">
{{#if oldApp}}
<div class="float-layer-left">
<p>请升级最新APP版本,完成认证</p>
</div>
{{^}}
<div class="float-layer-left">
<p>快来认证吧,认证通过即可享受专属优惠!</p>
</div>
<a href="{{students}}" class="students-btn">
立即认证
</a>
{{/if}}
</div>
{{/if}}
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -6,12 +6,11 @@
<div id="nav-top">
{{> layout/page_header}}
<!-- tar modifield 160826 -->
<input type="hidden" name="shopIdForFilter" value="{{shopIdForFilter}}">
<input type="hidden" name="channel" value="{{channel}}">
<input type="hidden" name="app_version" value="{{appVersion}}">
<input type="hidden" name="shop_id" value="{{shopId}}">
<input type="hidden" name="brand" value="{{brand}}">
<input type="hidden" name="favId" value="{{favId}}">
<input type="hidden" name="coverChannel" value="{{coverChannel}}">
{{#unless appVersion}}
<div class="search-area">
... ... @@ -19,6 +18,8 @@
<form id="search-form" action={{url}} method="get">
<i class="search-icon iconfont">&#xe60f;</i>
<input type="text" placeholder="搜索店铺内潮品" name="query" class="buriedpoint">
<input type="hidden" name="shop_id" value="{{shopId}}">
<input type="hidden" name="coverChannel" value="{{coverChannel}}">
<i class="clear-input iconfont hide">&#xe626;</i>
<button id="search" class="search buriedpoint" type="submit" data-bp-id="shop_search_btn_0">搜索</button>
</form>
... ... @@ -90,7 +91,7 @@
{{! 热门品类}}
<div class="first">
{{# hotCategory}}
{{> home/hot_category}}
{{> product/hot_category}}
{{/ hotCategory}}
</div>
... ...
... ... @@ -74,7 +74,7 @@
{{! 热门品类}}
{{# hotCategory}}
{{> home/hot_category}}
{{> product/hot_category}}
{{/ hotCategory}}
<div class="popularity-title">
... ...
... ... @@ -14,7 +14,6 @@
<img src="{{img}}" alt="">
</div>
</a>
<div class="img-cover">{{name}}</div>
</li>
{{/ list}}
</ul>
... ...
<div class="hot-category">
{{> home/floor_header}}
{{# banner}}
<a class="category-banner" href="{{url}}">
<img class="lazy" data-original="{{img}}">
</a>
{{/ banner}}
<ul class="category-list clearfix">
{{# list}}
<li data-bp-id="shop_hotcategory_{{img}}_0" class="buriedpoint">
<a href="{{url}}">
<div class="img-box">
<img src="{{img}}" alt="">
</div>
</a>
<div class="img-cover">{{name}}</div>
</li>
{{/ list}}
</ul>
</div>
\ No newline at end of file
... ...
{{# goodList}}
<div id="search-input" class="search-input">
<form id="search-form" action="{{url}}" method="get">
<i class="search-icon iconfont">&#xe60f;</i>
<input type="text" value="{{default}}" name="query" class="buriedpoint" data-bp-id="shop-search_input_1" autocomplete="off">
<input type="hidden" value="{{shopId}}" name="shop_id">
<i class="clear-input iconfont hide">&#xe626;</i>
<span id="search" class="search buriedpoint" type="submit" data-bp-id="shop-search_btn_0">搜索</span>
</form>
</div>
{{# brandWay}}
<div class="brand-way">
<a href={{url}}>
<img class="brand-thumb" src={{thumb}}>
<span class="brand-name">{{name}}</span>
<span class="entry">
进入店铺
<i class="iconfont">&#xe614;</i>
</span>
</a>
</div>
{{/ brandWay}}
{{# shopBanner}}
<div class="brand-header">
<img class="lazy" data-original={{banner}}>
</div>
{{/ shopBanner}}
<!-- 品牌页面 -->
{{# brandHome}}
<div id="brand-header" class="brand-header" data-id={{id}}>
<img class="lazy" data-original={{banner}}>
<a class="btn-intro" href="javascript:void(0);">
品牌介绍
</a>
<a class="btn-col{{#if collected}} coled{{/if}}" href="javascript:void(0);">
<span class="iconfont">&#xe622;</span>
<span class="txt"></span>
</a>
</div>
<div id="intro-box" class="brand-intro-box hide">
<div id="brand-intro" class="brand-intro">
<h2>品牌介绍</h2>
<div class="con">
{{{intro}}}
</div>
<p class="fo">
<span class="iconfont">&#xe629;</span>
100%品牌授权正品
</p>
<span class="iconfont close-intro">&#xe623;</span>
</div>
</div>
{{/ brandHome}}
<!-- /品牌页面 -->
<!-- 基础店铺页面 -->
{{# baseShopHome}}
<div id="brand-header" class="brand-header" data-id={{id}} data-isbaseshop="{{isBaseShop}}">
<img class="lazy" data-original={{banner}}>
<a class="btn-intro" href="javascript:void(0);">
店铺介绍
</a>
<a class="btn-col{{#if collected}} coled{{/if}}" href="javascript:void(0);">
<span class="iconfont">&#xe622;</span>
<span class="txt"></span>
</a>
</div>
<div id="intro-box" class="brand-intro-box hide">
<div id="brand-intro" class="brand-intro">
<h2>店铺介绍</h2>
<div class="con">
{{{intro}}}
</div>
<p class="fo">
<span class="iconfont">&#xe629;</span>
100%品牌授权正品
</p>
<span class="iconfont close-intro">&#xe623;</span>
</div>
</div>
<input type="hidden" name="app_version" value="{{appVersion}}">
{{/ baseShopHome}}
<!-- /基础店铺页面 -->
<ul id="list-nav" class="list-nav clearfix">
{{#if isSearch}}
<li class="new active buriedpoint" data-bp-id="">
<a href="javascript:void(0);">
<span class="nav-txt">默认</span>
<span class="iconfont cur">&#xe616;</span>
</a>
</li>
{{else}}
<li class="new active buriedpoint" data-bp-id="shop_listnav_new_1">
<a href="javascript:void(0);">
<span class="nav-txt">最新</span>
<span class="iconfont cur">&#xe616;</span>
</a>
</li>
{{/if}}
<li class="price buriedpoint" data-bp-id="shop_listnav_price_1">
<a href="javascript:void(0);">
<span class="nav-txt">价格</span>
<span class="icon">
<i class="iconfont up cur">&#xe615;</i>
<i class="iconfont down">&#xe616;</i>
</span>
</a>
</li>
<li class="discount buriedpoint" data-bp-id="shop_listnav_discount_1">
<a href="javascript:void(0);">
<span class="nav-txt">折扣</span>
<span class="icon">
<i class="iconfont up cur">&#xe615;</i>
<i class="iconfont down">&#xe616;</i>
</span>
</a>
</li>
<li class="filter buriedpoint" data-bp-id="shop_listnav_filter_1">
<a href="javascript:void(0);">
<span class="nav-txt">筛选</span>
<span class="iconfont cur">&#xe613;</span>
</a>
</li>
</ul>
<div id="goods-container" class="goods-container {{#if students}} students-container {{/if}}">
<div class="new-goods container clearfix"></div>
<div class="price-goods container clearfix hide"></div>
<div class="discount-goods container clearfix hide"></div>
{{> filter}}
</div>
{{> product/query-param}}
{{> product/suspend-cart}}
{{/ goodList}}
... ...
... ... @@ -2,7 +2,6 @@
use Action\AbstractAction;
use LibModels\Wap\Product\SearchData;
use LibModels\Wap\Home\UserData;
use Plugin\DataProcess\ListProcess;
use Plugin\Helpers;
... ... @@ -45,124 +44,29 @@ class SearchController extends AbstractAction
{
$uid = $this->getUid() ? $this->getUid() : $this->get('uid');
$isApp = $this->isApp();
// 过滤请求参数
$condition = filter_input_array(INPUT_GET, array(
'shop_id' => FILTER_DEFAULT,
'categoryId' => FILTER_DEFAULT,
'subCategoryId' => FILTER_DEFAULT,
'title' => FILTER_DEFAULT,
'query' => FILTER_DEFAULT,
'brand' => FILTER_DEFAULT,
'sort' => FILTER_DEFAULT,
'msort' => FILTER_DEFAULT,
'misort' => FILTER_DEFAULT,
'color' => FILTER_DEFAULT,
'size' => FILTER_DEFAULT,
'style' => FILTER_DEFAULT,
'price' => FILTER_DEFAULT,
'discount' => FILTER_DEFAULT,
'gender' => FILTER_DEFAULT,
'channel' => FILTER_DEFAULT,
'outlets' => FILTER_DEFAULT,
'ageLevel' => FILTER_DEFAULT,
'p_d' => FILTER_DEFAULT,
'students' => FILTER_DEFAULT,
'app_type' => FILTER_DEFAULT,
'filter_poolId' => FILTER_DEFAULT), false);
if (isset($condition['shop_id'])) {
$condition['shopId'] = $condition['shop_id'];
}
$query = empty($condition['query']) ? null : strtolower(trim($condition['query']));
if (isset($condition['discount'])) {
$condition['p_d'] = rawurldecode($condition['discount']);
// unset($condition['discount']); 为了兼容js中传参的discount
}
// 为了兼容现在运营在用的p_d
if (isset($condition['p_d'])) {
$condition['discount'] = rawurldecode($condition['p_d']);
}
if (isset($condition['query'])) {
$condition['query'] = rawurlencode($condition['query']);
}
// 标识用户是否有输入搜索内容
$haveQuery = !empty($query);
// 标识用户搜的是不是一级品类
$isQueryFirstClass = false;
// 标识用户搜的是不是二级品类
$isQuerySecondClass = false;
/* 判断是不是品牌, 是品牌跳到品牌列表页(显示搜索框) */
if ($haveQuery) {
$domain = null;
$brandNames = Product\ListModel::getAllBrandNames();
do {
/* 精确查品牌域名 */
if (isset($brandNames[$query])) {
$domain = $query;
break;
}
/* 获取处理查询字符串 */
$condition = \Product\SearchModel::conditionHandle();
$query = empty($condition['query']) ? null : strtolower(trim($condition['query']));
/* 精确查品牌名称 */
$domains = array_keys($brandNames, $query, true);
if (isset($domains[0])) {
$domain = $domains[0];
break;
}
// 标识用户是否有输入搜索内容
$haveQuery = !empty($query);
/* 模糊查品牌域名 tar notice 使用模糊搜索会出现直接跳转店铺,搜不到大量商品*/
// foreach ($brandNames as $key => $domains) {
// if (strpos($key, $query) !== false) {
// $domain = $key;
// break;
// }
// }
} while (false);
// 清空变量做释放
$brandNames = array();
// 跳转到品牌商品列表页
if ($domain !== null && empty($condition['shop_id'])) {
$url = Helpers::url('', array(
'from' => 'search',
'query' => $query
), $domain);
$this->go($url);
}
/* 判断是不是品牌, 是品牌跳到品牌列表页(显示搜索框) */
if ($haveQuery) {
\Product\SearchModel::brandHandle($condition, $query);
}
/* 判断是不是品类, 是品类加导航标题(不显示搜索框) */
if ($haveQuery) {
$classNames = Category\ClassModel::getClassNames();
do {
// 品类名称为空时跳出
if (empty($classNames)) {
break;
}
/* 精确查一级品类 */
$sorts = array_keys($classNames['first'], $query, true);
if (isset($sorts[0])) {
$isQueryFirstClass = true;
break;
}
/* 精确查二级品类 */
$sorts = array_keys($classNames['second'], $query, true);
if (isset($sorts[0])) {
$isQuerySecondClass = true;
break;
}
} while (false);
$classNames = array();
$queryClassType = \Product\SearchModel::categoryHandle($query);
$isQueryFirstClass = $queryClassType['isQueryFirstClass'];
$isQuerySecondClass = $queryClassType['isQuerySecondClass'];
} else {
$condition['query'] = '';
}
... ... @@ -242,34 +146,88 @@ class SearchController extends AbstractAction
// 搜索列表将最新改成默认的标识
$data['isSearch'] = true;
/* 学生类型用户处理 */
if (isset($condition['students'])) {
// 获取用户信息判断是否为学生
if ($uid) {
$userInfo = UserData::userData($uid);
if ($userInfo['code'] === 200 && isset($userInfo['data']['vip_info']['is_student']) && $userInfo['data']['vip_info']['is_student'] === 1) {
$data['students'] = '';
} else {
$data['students'] = Helpers::url('/activity/student/register');
}
} else {
if ($isApp) {
$data['students'] = '/signin.html?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http://m.yohobuy.com/activity/student/register","antarget":"1"}}}';
} else {
$data['students'] = Helpers::url('/signin.html?refer=//m.yohobuy.com/activity/student/register');
}
array_merge($data, \Product\SearchModel::studentsHandle($uid, $isApp, $this->get('app_version')));
}
$this->_view->display('list', $data);
}
/**
*
* 店铺内的搜索
*/
public function searchShopAction()
{
$uid = $this->getUid() ? $this->getUid() : $this->get('uid');
$isApp = $this->isApp();
/* 获取处理查询字符串 */
$condition = \Product\SearchModel::conditionHandle();
$query = empty($condition['query']) ? null : strtolower(trim($condition['query']));
$data = array();
$data['goodListPage'] = true;
$data['goodList'] = $condition;
$data['default'] = $data['query'] = $query;
$data['shopId'] = $condition['shop_id'];
// 用户自定义商品类目
if(isset($condition['filter_poolId'])){
$data['filter_poolId'] = rawurldecode($condition['filter_poolId']);
}
// 右下角的购物车链接
$data['goodList']['cartUrl'] = Helpers::url('/cart/index/index', null);
// 显示底部悬浮下载
$data['showDownloadApp'] = $this->isApp() ? false : true;
// 显示页面底部登录信息
$data['pageFooter'] =true;
// 查询数据
if (!isset($condition['query'])) {
$data['goodList'] += Product\ListModel::getClassData($condition);
} else {
$listData = SearchData::searchByCondition($condition);
// 处理返回的数据
if (!empty($listData['data']['brand'])) {
$brandData = $listData['data']['brand'];
$data['brandWay'] = array(
'url' => 'http://' . $brandData['brand_domain'] . SUB_DOMAIN,
'thumb' => Helpers::getImageUrl($brandData['brand_ico'], 75, 40),
'name' => $brandData['brand_name']
);
// 设置品牌默认值
$data['goodList']['brand'] = $brandData['id'];
$data['goodList'] += ListProcess::getListData($listData['data']);
}
$data['showDownloadApp'] = false;
$listData = array();
}
/* 标题处理 */
$this->setTitle('搜索');
$this->setNavHeader('搜索', true, SITE_MAIN);
if (isset($condition['title'])) {
if ($isApp) {
//判断app版本是否低于4.9.1,用于显示下方的提示
$appVersion = str_replace('.', '', $this->get('app_version'));
if (intval(substr($appVersion, 0, 3)) < 491) {
$data['oldApp'] = true;
}
$this->setTitle($condition['title'], false, '');
} else {
$this->setNavHeader($condition['title'], true, SITE_MAIN);
}
}
// 搜索列表将最新改成默认的标识
$data['isSearch'] = true;
$this->_view->display('list', $data);
/* 学生类型用户处理 */
if (isset($condition['students'])) {
array_merge($data, \Product\SearchModel::studentsHandle($uid, $isApp, $this->get('app_version')));
}
$this->_view->display('shop-list', $data);
}
/**
... ...
... ... @@ -89,6 +89,7 @@ class IndexModel
}
$data['guang']['infos'][] = $build;
}
//print_r($data['guang']['infos']);
// 分页需要参数
$data['guang']['gender'] = $gender;
... ... @@ -189,6 +190,7 @@ class IndexModel
// 内容列表
if (!empty($article['data']['list']['artList'])) {
foreach ($article['data']['list']['artList'] as $value) {
$data['guang']['infos'][$curIndex]['info'][] = Helpers::formatArticle($value, true, false, true);
}
... ... @@ -212,6 +214,8 @@ class IndexModel
$category = array();
$article = array();
//print_r($data);
return $data;
}
... ...
... ... @@ -421,7 +421,7 @@ class ListModel
//店铺使用基础模板,返回品牌页面
if (isset($data['shopInfo']['shop_template_type']) && $data['shopInfo']['shop_template_type'] == 1) {
return array('goBrand' => $data['shopInfo']['data']);
return array('goBrand' => $data['shopInfo']);
}
//店铺分类
$channel = empty($_GET['yh_channel']) ? Helpers::getChannelByCookie() : $_GET['yh_channel'];
... ...
... ... @@ -2,10 +2,12 @@
namespace Product;
use Category\ClassModel;
use Configs\CacheConfig;
use LibModels\Wap\Product\SearchData;
use LibModels\Wap\Category\BrandData;
use LibModels\Wap\Category\ClassData;
use LibModels\Wap\Home\UserData;
use Plugin\DataProcess\ListProcess;
use Plugin\Cache;
use Plugin\Helpers;
... ... @@ -22,6 +24,179 @@ class SearchModel
{
/**
* 搜索列表页处理筛选参数
* @return mixed
*/
public static function conditionHandle()
{
// 过滤请求参数
$condition = filter_input_array(INPUT_GET, array(
'shop_id' => FILTER_DEFAULT,
'categoryId' => FILTER_DEFAULT,
'subCategoryId' => FILTER_DEFAULT,
'title' => FILTER_DEFAULT,
'query' => FILTER_DEFAULT,
'brand' => FILTER_DEFAULT,
'sort' => FILTER_DEFAULT,
'msort' => FILTER_DEFAULT,
'misort' => FILTER_DEFAULT,
'color' => FILTER_DEFAULT,
'size' => FILTER_DEFAULT,
'style' => FILTER_DEFAULT,
'price' => FILTER_DEFAULT,
'discount' => FILTER_DEFAULT,
'gender' => FILTER_DEFAULT,
'channel' => FILTER_DEFAULT,
'outlets' => FILTER_DEFAULT,
'ageLevel' => FILTER_DEFAULT,
'p_d' => FILTER_DEFAULT,
'students' => FILTER_DEFAULT,
'app_type' => FILTER_DEFAULT,
'filter_poolId' => FILTER_DEFAULT), false);
if (isset($condition['shop_id'])) {
$condition['shopId'] = $condition['shop_id'];
}
if (isset($condition['discount'])) {
$condition['p_d'] = rawurldecode($condition['discount']);
// unset($condition['discount']); 为了兼容js中传参的discount
}
// 为了兼容现在运营在用的p_d
if (isset($condition['p_d'])) {
$condition['discount'] = rawurldecode($condition['p_d']);
}
if (isset($condition['query'])) {
$condition['query'] = rawurldecode($condition['query']);
}
return $condition;
}
/**
* 会员增加学生类型搜索的处理
* @param $uid
* @param $isApp
* @param $appVersion
* @return mixed
*/
public static function studentsHandle($uid, $isApp, $appVersion)
{
// 获取用户信息判断是否为学生
if ($uid) {
$userInfo = UserData::userData($uid);
if ($userInfo['code'] === 200 && isset($userInfo['data']['vip_info']['is_student']) && $userInfo['data']['vip_info']['is_student'] === 1) {
$data['students'] = '';
} else {
$data['students'] = Helpers::url('/activity/student/register');
}
} else {
if ($isApp) {
$data['students'] = '/signin.html?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http://m.yohobuy.com/activity/student/register","antarget":"1"}}}';
} else {
$data['students'] = Helpers::url('/signin.html?refer=//m.yohobuy.com/activity/student/register');
}
}
$data['showDownloadApp'] = false;
if ($isApp) {
//判断app版本是否低于4.9.1,用于显示下方的提示
if (intval(substr(str_replace('.', '', $appVersion), 0, 3)) < 491) {
$data['oldApp'] = true;
}
}
return $data;
}
/**
* 搜索-品牌处理
* @param $condition
* @param $query
*/
public static function brandHandle($condition, $query)
{
$domain = null;
$brandNames = ListModel::getAllBrandNames();
do {
/* 精确查品牌域名 */
if (isset($brandNames[$query])) {
$domain = $query;
break;
}
/* 精确查品牌名称 */
$domains = array_keys($brandNames, $query, true);
if (isset($domains[0])) {
$domain = $domains[0];
break;
}
/* 模糊查品牌域名 tar notice 使用模糊搜索会出现直接跳转店铺,搜不到大量商品*/
// foreach ($brandNames as $key => $domains) {
// if (strpos($key, $query) !== false) {
// $domain = $key;
// break;
// }
// }
} while (false);
// 清空变量做释放
$brandNames = array();
// 跳转到品牌商品列表页
if ($domain !== null && empty($condition['shop_id'])) {
$url = Helpers::url('', array(
'from' => 'search',
'query' => $query
), $domain);
/* 跳转 */
headers_sent() || header('Location: ' . $url);
exit();
}
}
/**
* 搜索-品类处理
* @param $query
* @return array
*/
public static function categoryHandle($query)
{
$classNames = ClassModel::getClassNames();
$queryClassType = array(
'isQueryFirstClass' => false,
'isQuerySecondClass' => false
);
do {
// 品类名称为空时跳出
if (empty($classNames)) {
break;
}
/* 精确查一级品类 */
$sorts = array_keys($classNames['first'], $query, true);
if (isset($sorts[0])) {
$queryClassType['isQueryFirstClass'] = true;
break;
}
/* 精确查二级品类 */
$sorts = array_keys($classNames['second'], $query, true);
if (isset($sorts[0])) {
$queryClassType['isQuerySecondClass'] = true;
break;
}
} while (false);
$classNames = array();
return $queryClassType;
}
/**
* 获取搜索的数据
*
* @param array $condition 查询条件
... ... @@ -43,13 +218,16 @@ class SearchModel
}
}
//频道参数
$coverChannel = empty($condition['coverChannel']) ? '' : $condition['coverChannel'];
// 调用接口查询数据 (使用新的 Elastic Engine)
$listData = SearchData::searchElasticByCondition($condition);
// 调用接口查询数据 (使用老的 Sphinx Engine)
// $listData = SearchData::searchByCondition($condition);
// 处理返回的数据
if (isset($listData['code']) && $listData['code'] === 200) {
$result = ListProcess::getListData($listData['data'], false, $showTag, $tagNew, $tagSale);
$result = ListProcess::getListData($listData['data'], false, $showTag, $tagNew, $tagSale, $coverChannel);
}
if (USE_CACHE) {
... ... @@ -247,6 +425,7 @@ class SearchModel
'showTag' => FILTER_DEFAULT,
'tagNew' => FILTER_DEFAULT,
'students' => FILTER_DEFAULT,
'coverChannel' => FILTER_DEFAULT,
'tagSale' => FILTER_DEFAULT), false);
... ... @@ -314,6 +493,11 @@ class SearchModel
$condition['filter_poolId'] = rawurldecode($condition['filter_poolId']);
}
// 封面频道参数
if (isset($condition['coverChannel'])) {
$condition['coverChannel'] = rawurldecode($condition['coverChannel']);
}
// 转换排序方式
// $type = $this->get('type', '');
// $order = $this->get('order', 0);
... ...
... ... @@ -24,7 +24,6 @@ class IndexController extends AbstractAction
$this->setTitle('逛');
$this->setNavHeader('逛', true, SITE_MAIN);
$uid = $this->getUid();
$udid = $this->getUdid();
$type = $this->get('id', 0);
... ...
... ... @@ -20,6 +20,7 @@ class InfoController extends AbstractAction
public function indexAction()
{
$id = $this->get('id');
// $id= 34282;
// 判断参数是否有效, 无效会跳转到错误页面
if (!is_numeric($id)) {
... ...
... ... @@ -486,27 +486,25 @@ class IndexController extends AbstractAction
}
/* tar add 160826 */
$data['shopIdForFilter'] = $shopId;
$data['gender'] = $this->get('gender');
$data['channel'] = $this->get('yh_channel') ? $this->get('yh_channel') : Helpers::getChannelByCookie();
//接受APP传来的封面频道参数
$coverChannel = Helpers::getYhHhannel($this->get('yh_channel', ''));
$filter = Product\SearchModel::filter(array(
$filter = Product\SearchModel::filter(array(
'shop_id' => $shopId,
'gender' => $data['gender'],
'channel' => $data['channel'],
'brand' => $data['brand']
'gender' => isset($data['gender']) ? $data['gender'] : '',
'brand' => isset($data['brand']) ? $data['brand'] : ''
));
$data['filter'] = $filter['filter'];
$data['filter'] = isset($filter['filter']) ? $filter['filter'] : array();
/* tar add 160931 首屏加载,加载一次 goods */
$goods = \Product\SearchModel::search(array(
'shop' => $shopId,
'gender' => $data['gender'],
'channel' => $data['channel'],
'brand' => $data['brand']
'gender' => isset($data['gender']) ? $data['gender'] : '',
'brand' => isset($data['brand']) ? $data['brand'] : '',
'coverChannel' => $coverChannel
));
$data['goods'] = $goods['new'];
$data['goods'] = isset($goods['new']) ? $goods['new'] : array();
$this->_view->display('shop', array(
'shopIndex' => $data,
... ... @@ -515,7 +513,7 @@ class IndexController extends AbstractAction
'url' => Helpers::url('/product/index/category', array('shop_id' => $shopId))
),
'gender' => $data['gender'],
'channel' => $data['channel'],
'coverChannel' => $coverChannel,
'appVersion' => !empty($appVersion)
));
... ... @@ -651,7 +649,7 @@ class IndexController extends AbstractAction
$refer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
$toUrl = Helpers::url('/signin.html')."?refer=".$refer;
if (!empty($appVersion)){
$toUrl .= '&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'.$refer.'","param":{}},"requesturl":{"param":{},"url":""},"priority":"N"}}';
$toUrl .= '&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'.$refer.'","param":{}},"requesturl":{"param":{"method":"app.favorite.add","id":"'.$shopId.'","fav_id":"'.$shopId.'","type":"shop"},"url":"'.API_URL.'"},"priority":"Y"}}';
}
$data['url'] = $toUrl;
break;
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "4.9.20"
application.version = "4.9.23"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "4.9.20"
application.version = "4.9.23"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "4.9.20"
application.version = "4.9.23"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "4.9.20"
application.version = "4.9.23"
; 网站SEO信息
application.seo.title = "Yoho!Buy有货 | 潮流购物逛不停"
... ...