Authored by Lynnic
Commit 60322172cb8fa10484dd206d9476cff0d9145553 2 parents cea27d86 2a205c02 master ... develop feature/brandCoupon feature/changeQr feature/encryptionUid feature/filter-age feature/mobile feature/newInvoice feature/order-show feature/payMethod feature/paymentTip feature/rcmnd4U feature/rebuy feature/shopBaseTlp feature/ticket feature/userInfoTip hotfix/cancelOrder hotfix/catlog hotfix/delWap hotfix/deleteOrderStyle hotfix/detail hotfix/editOrder hotfix/guang-goodsgroup hotfix/itemApiurl hotfix/loophole hotfix/making-order hotfix/new-girls hotfix/orders hotfix/productDetail hotfix/receipt hotfix/register hotfix/returnImage hotfix/rtrngdsstyl hotfix/validate patch-1 release/4.7 release/4.8 release/outlets 4.8.2 4.7.2 4.6.2.1 4.6.2 4.6 1.3.22 1.3.21 1.3.20 1.3.19 1.3.18 1.3.17 1.3.16 1.3.15 1.3.14 1.3.13 1.3.12 1.3.11 1.3.10 1.3.9 1.3.8 1.3.7 1.3.7.g 1.3.7.f 1.3.7.e 1.3.7.d 1.3.7.c 1.3.7.b 1.3.7.a 1.3.6 1.3.5 1.3.4 1.3.3 1.3.2 1.3.1 1.3.0 1.2.9 1.2.8 1.2.7 1.2.6 1.2.5 1.2.4 1.2.3 1.2.2 1.2.1 1.2.0 1.2.0.h 1.2.0.g 1.2.0.d 1.2.0.c 1.2.0.beta 1.2.0.b 1.2.0.a wap.3.2.5 wap.1.4.22 wap.1.4.21 wap.1.4.20 wap.1.4.19 wap.1.4.18 wap.1.4.17 wap.1.4.16.3 wap.1.4.16.2 wap.1.4.16.1 wap.1.4.16 wap.1.4.15 wap.1.4.14 wap.1.4.13 wap.1.4.12 wap.1.4.11 wap.1.4.10 wap.1.4.9 wap.1.4.8 wap.1.4.7 wap.1.4.6 wap.1.4.5 wap.1.4.4 wap.1.4.3 wap.1.4.2 wap.1.4.1 wap.1.4.0 pchttps pc4.5 pc.1.4.24 pc.1.4.23 pc.1.4.22 pc.1.4.21 pc.1.4.20 pc.1.4.19 pc.1.4.18 pc.1.4.17 pc.1.4.16 pc.1.4.15 pc.1.4.14 pc.1.4.13 pc.1.4.12 pc.1.4.11 pc.1.4.10 pc.1.4.9 pc.1.4.8 pc.1.4.7 pc.1.4.6 pc.1.0.7 pc.1.0.6 pc.1.0.5 pc.1.0.4 pc.1.0.3 pc.1.0.2 pc.1.0.1 pc.1.0.0 fix-ip-login-limit fix-ip-limit

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into feature/detailFix

Showing 47 changed files with 2550 additions and 373 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::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('rlsEnv')))) ? '<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/index.css">
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('preEnv')))) ? '<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/index.css">
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('testEnv')))) ? '<link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/index.css">
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('devEnv')))) ? '<link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css">
' : '').'<link rel="apple-touch-icon-precomposed" href="http://static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png">
<link rel="apple-touch-startup-image" sizes="640x920" href="http://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="http://static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)">
</head>
<body '.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('isPassportPage')))) ? 'class=passport-body' : '').'>
'.''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('pageHeader')), $in, false, function($cx, $in) {return '<header class="yoho-header'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('boys')))) ? ' boys' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('girls')))) ? ' girls' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('kids')))) ? ' kids' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('lifeStyle')))) ? ' life-style' : '').'">
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('navBack')))) ? ' <a href="javascript:history.go(-1);" class="iconfont nav-back">&#xe610;</a>
' : '').''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('navHome')), $in, false, function($cx, $in) {return ' <a href="'.htmlentities((string)$in, ENT_QUOTES, 'UTF-8').'" class="iconfont nav-home">&#xe611;</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>
';}).'</header>
';}).''.''.'<div class="discount-page yoho-page">
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('headerBanner')), $in, false, function($cx, $in) {return ''.''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('list')))) ? ' <div class="banner-top">
<div class="banner-swiper swiper-container">
<ul class="swiper-wrapper">
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('list')), $in, false, function($cx, $in) {return ' <li class="swiper-slide">
<a href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('url')), ENT_QUOTES, 'UTF-8').'">
<img class="swiper-lazy" data-src="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('img')), ENT_QUOTES, 'UTF-8').'">
</a>
<div class="swiper-lazy-preloader"></div>
</li>
';}).' </ul>
</div>
<div class="swiper-pagination">
<div class="pagination-inner">
</div>
</div>
</div>
' : ' <div class="banner-top-single">
<a href='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('url')), ENT_QUOTES, 'UTF-8').'>
<img class="img" src='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('img')), ENT_QUOTES, 'UTF-8').'>
</a>
</div>
').'
'.'';}).'
<ul id="list-nav" class="list-nav clearfix">
<li class="new active">
<a href="javascript:void(0);">
<span class="spanTest">最新</span>
<span class="iconfont cur">&#xe616;</span>
</a>
</li>
<li class="price">
<a href="javascript:void(0);">
<span class="spanTest">价格</span>
<span class="icon">
<i class="iconfont up">&#xe615;</i>
<i class="iconfont down cur">&#xe616;</i>
</span>
</a>
</li>
<li class="discount">
<a href="javascript:void(0);">
<span class="spanTest">折扣</span>
<span class="icon">
<i class="iconfont up">&#xe615;</i>
<i class="iconfont down cur">&#xe616;</i>
</span>
</a>
</li>
<li class="filter">
<a href="javascript:void(0);">
<span class="spanTest">筛选</span>
<span class="iconfont">&#xe613;</span>
</a>
</li>
</ul>
<div id="goods-container" class="goods-container">
<div class="new-goods container clearfix">
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('goods')), $in, false, function($cx, $in) {return ''.' '.((Plugin\LCRun3::ifvar($cx, $in)) ? '
<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_yohoood')), $in, false, function($cx, $in) {return ' <div class="good-tag yohood-tag"></div>
';}).''.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" 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('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">
<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="price-goods container hide clearfix"></div>
<div class="discount-goods container hide clearfix"></div>
'.''.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('filter')), $in, false, function($cx, $in) {return ' <div class="filter-mask hide">
<div class="filter-body">
<ul class="classify">
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('classify')), $in, true, function($cx, $in) {return ' <li class="classify-item'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $cx['sp_vars'], array('first')))) ? ' active' : '').'">
<p class="shower'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('default')))) ? ' default' : '').'">
<span class="title">'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('title')), ENT_QUOTES, 'UTF-8').':</span>
'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('name')), ENT_QUOTES, 'UTF-8').'
</p>
<ul class="sub-classify" data-type='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('dataType')), ENT_QUOTES, 'UTF-8').'>
'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('subs')), $in, false, function($cx, $in) {return ' <li class="sub-item'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('chosed')))) ? ' chosed' : '').'" data-id='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('dataId')), ENT_QUOTES, 'UTF-8').'>
'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('name')), ENT_QUOTES, 'UTF-8').'
<i class="iconfont chosed-icon">&#xe617;</i>
</li>
';}).' </ul>
</li>
';}).' </ul>
</div>
</div>
';}).''.' </div>
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('brand')))) ? ' <input id="brand" type="hidden" value='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('brand')), ENT_QUOTES, 'UTF-8').'>
' : '').'
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('gender')))) ? ' <input id="gender" type="hidden" value='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('gender')), ENT_QUOTES, 'UTF-8').'>
' : '').'
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('sort')))) ? ' <input id="sort" type="hidden" value='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('sort')), ENT_QUOTES, 'UTF-8').'>
' : '').'
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('msort')))) ? ' <input id="msort" type="hidden" value='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('msort')), ENT_QUOTES, 'UTF-8').'>
' : '').'
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('misort')))) ? ' <input id="misort" type="hidden" value='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('misort')), ENT_QUOTES, 'UTF-8').'>
' : '').'
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('color')))) ? ' <input id="color" type="hidden" value='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('color')), ENT_QUOTES, 'UTF-8').'>
' : '').'
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('size')))) ? ' <input id="size" type="hidden" value='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('size')), ENT_QUOTES, 'UTF-8').'>
' : '').'
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('price')))) ? ' <input id="price" type="hidden" value='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('price')), ENT_QUOTES, 'UTF-8').'>
' : '').'
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('p_d')))) ? ' <input id="p_d" type="hidden" value='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('p_d')), ENT_QUOTES, 'UTF-8').'>
' : '').'
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('channel')))) ? ' <input id="channel" type="hidden" value='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('channel')), ENT_QUOTES, 'UTF-8').'>
' : '').'
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('limit')))) ? ' <input id="limit" type="hidden" value='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('limit')), ENT_QUOTES, 'UTF-8').'>
' : '').'
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('page')))) ? ' <input id="page" type="hidden" value='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('page')), ENT_QUOTES, 'UTF-8').'>
' : '').'
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('discount')))) ? ' <input id="discount" type="hidden" value='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('discount')), ENT_QUOTES, 'UTF-8').'>
' : '').'
'.' <div id="suspend-cart" class="suspend-cart">
<a href='.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('cartUrl')), ENT_QUOTES, 'UTF-8').'>
<span class="iconfont">&#xe62c;</span>
</a>
<span class="cart-count hide">0</span>
</div>'.'</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="http://m.yohobuy.com/download/hyapp" id="float-layer-btn">
立即下载
</a>
</div>
';}).'
'.''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('hasWxShare')))) ? '<script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('rlsEnv')))) ? '<script src="http://cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/lib.js"></script>
<script src="http://cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/index.js"></script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('preEnv')))) ? '<script src="http://cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/lib.js"></script>
<script src="http://cdn.yoho.cn/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/index.js"></script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('testEnv')))) ? '<script src="http://static.buy.test.yoho.cn/dist/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/lib.js"></script>
<script src="http://static.buy.test.yoho.cn/dist/myohobuy/'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('version')), ENT_QUOTES, 'UTF-8').'/index-debug.js"></script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('devEnv')))) ? '<script src="http://localhost:8000/static/js/sea.js?nowrap"></script>
<script>seajs.config({base: \'http://localhost:8000/\'});</script>
' : '').'<script type="text/javascript">
(function(w,d,s,j,f){
w[\'YohoAcquisitionObject\']=f;
w[f]=function(){w[f].p=arguments;};
var a=d.createElement(s);
var m=d.getElementsByTagName(s)[0];
a.async=1;
a.src=j;
m.parentNode.insertBefore(a,m);
})(window,document,\'script\',\'http://cdn.yoho.cn/yas-jssdk/1.0.8/yas.js\',\'_yas\');
</script>
'.'<script>
seajs.use(\'js/common\');
</script>
'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('psList')))) ? '<script>
seajs.use(\'js/guang/plus-star/list\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('psDetail')))) ? '<script>
seajs.use(\'js/guang/plus-star/detail\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('guangHome')))) ? '<script>
seajs.use(\'js/guang/home\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('guangList')))) ? '<script>
seajs.use(\'js/guang/list\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('guangDetail')))) ? '<script>
seajs.use(\'js/guang/detail\', function(d) {
d.i(true);
});
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('guangEzine')))) ? '<script>
seajs.use(\'js/guang/detail\', function(d) {
d.i(false);
});
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('regIndex')))) ? '<script>
seajs.use(\'js/passport/register/register\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('regCode')))) ? '<script>
seajs.use(\'js/passport/register/code\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('regPwd')))) ? '<script>
seajs.use(\'js/passport/register/password\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('loginIndex')))) ? '<script>
seajs.use(\'js/passport/login/login\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('loginInternational')))) ? '<script>
seajs.use(\'js/passport/login/international\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('backEmail')))) ? '<script>
seajs.use(\'js/passport/back/email\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('backEmailSuccess')))) ? '<script>
seajs.use(\'js/passport/back/email-success\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('backMobile')))) ? '<script>
seajs.use(\'js/passport/back/mobile\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('backCode')))) ? '<script>
seajs.use(\'js/passport/back/code\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('backNewPwd')))) ? '<script>
seajs.use(\'js/passport/back/new-password\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('channelPage')))) ? '<script>
seajs.use(\'js/index/channel\');
seajs.use(\'js/index/footer\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('grilsHomePage')))) ? '<script>
seajs.use(\'js/home/home\', function(h) {
h.set(\'girls\');
});
seajs.use(\'js/index/footer\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('boysHomePage')))) ? '<script>
seajs.use(\'js/home/home\', function(h) {
h.set(\'boys\');
});
seajs.use(\'js/index/footer\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('kidsHomePage')))) ? '<script>
seajs.use(\'js/home/home\', function(h) {
h.set(\'kids\');
});
seajs.use(\'js/index/footer\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('lifestyleHomePage')))) ? '<script>
seajs.use(\'js/home/home\', function(h) {
h.set(\'lifestyle\');
});
seajs.use(\'js/index/footer\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('newArrivalPage')))) ? '<script>
seajs.use(\'js/product/newsale/newarrival\');
seajs.use(\'js/index/footer\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('discountPage')))) ? '<script>
seajs.use(\'js/product/newsale/discount\');
seajs.use(\'js/index/footer\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('goodListPage')))) ? '<script>
seajs.use(\'js/product/list\');
seajs.use(\'js/index/footer\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('goodsDetailPage')))) ? '<script>
seajs.use(\'js/product/detail/detail\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('categoryPage')))) ? '<script>
seajs.use(\'js/category/index\');
seajs.use(\'js/index/footer\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('brandPage')))) ? '<script>
seajs.use(\'js/category/brand\');
seajs.use(\'js/index/footer\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('searchPage')))) ? '<script>
seajs.use(\'js/index/search\');
seajs.use(\'js/index/footer\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('shoppingCartPage')))) ? '<script>
seajs.use(\'js/shopping-cart/cart\');
</script>
' : '').''.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('giftAdvancePage')))) ? '<script>
seajs.use(\'js/shopping-cart/gift-advance\');
</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>
(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\');
</script>
<!-- End Google Tag Manager -->
<script type="text/javascript">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?c6ee7218b8321cb65fb2e98f284d8311";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?65dd99e0435a55177ffda862198ce841";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<script src="http://static.yohobuy.com/js/analytics/analysis.js"></script>
<script src="http://static.yohobuy.com/m/v1/js/om_code.js"></script>
'.'</body>
</html>'.'';
}
?>
\ No newline at end of file
... ...
... ... @@ -1261,9 +1261,9 @@
},{
'appIcon' : 'http://static.yohobuy.com/images/icon.png',
'payLink' : '/weixin/pay/',
'appId': 'baidu',
'app' : '百度支付',
'hint' : '需下载微信客户端',
'appId': 'alipay',
'app' : '支付宝支付',
'hint' : '需下载支付宝客户端',
'subHint' : '推荐使用'
}
]
... ...
... ... @@ -370,7 +370,7 @@ class AbstractAction extends Controller_Abstract
* 设置网站导航头部信息
*
* @param string $title 头部标题
* @param string $backUrl 返回的链接
* @param mixed $backUrl 返回的链接
* @param string $homeUrl 返回首页的链接
* @return void
*/
... ... @@ -385,6 +385,9 @@ class AbstractAction extends Controller_Abstract
if ($backUrl) {
$header['navBack'] = true;
if (is_string($backUrl) && $backUrl != '') {
$header['backUrl'] = $backUrl;
}
}
if (!empty($title)) {
$header['navTitle'] = $title;
... ...
... ... @@ -18,24 +18,26 @@ class Yohobuy
{
/* 正式环境 */
// const API_URL = 'http://api2.open.yohobuy.com/';
// const API_URL2 = 'http://api.open.yohobuy.com/';
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_URL_LOGINSESSION = 'http://m1.yohobuy.com/';
/* 测试环境 */
const API_URL = 'http://testapi.yoho.cn:28078/';
const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
// const API_URL = 'http://api2.open.yohobuy.com/';
// const API_URL2 = 'http://api.open.yohobuy.com/';
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_URL = 'http://apih5.yoho.cn/';
const API_URL2 = 'http://apih5.yoho.cn/';
const SERVICE_URL = 'http://serviceh5.yoho.cn/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_URL_LOGINSESSION = 'http://m1.yohobuy.com/';
// /* 测试环境 */
// const API_URL = 'http://testapi.yoho.cn:28078/';
// const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
/**
* 私钥列表
*
* @var array
*/
private static $privateKeyList = array(
'android' => 'fd4ad5fcfa0de589ef238c0e7331b585',
'iphone' => 'a85bb0674e08986c6b115d5e3a4884fa',
... ... @@ -186,7 +188,7 @@ class Yohobuy
* @param array $cookie
* @return mixed
*/
public static function post($url, $data = array(), $returnJson = false, $timeout = 30, $header = array(), $cookie = array())
public static function post($url, $data = array(), $returnJson = false, $timeout = 10, $header = array(), $cookie = array())
{
$ch = curl_init($url);
... ... @@ -212,18 +214,12 @@ class Yohobuy
unset($data['private_key']);
}
if (!empty($data)) {
// 新加支持application/x-www-form-urlencoded调用方式
$str = '';
foreach ($data as $key => $val) {
$str .= $key . '=' . $val . '&';
}
$str = rtrim($str, '&');
// curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_POSTFIELDS, $str);
$str = http_build_query($data, null, '&');
// 新加支持application/x-www-form-urlencoded调用方式
//curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_POSTFIELDS, $str);
}
$result = curl_exec($ch);
$result = curl_exec($ch);
if (!$returnJson && !empty($result)) {
$result = json_decode($result, true);
}
... ...
... ... @@ -4,6 +4,7 @@ namespace LibModels\Wap\Passport;
use Api\Sign;
use Api\Yohobuy;
use Plugin\Helpers;
/**
* 登录的数据模型
... ... @@ -78,15 +79,12 @@ class LoginData
/**
* 登出SESSION会话
*
* @param int $uid 用户ID
* @param string $token 会话
* @return array
*/
public static function signoutSession($token)
{
$param = array();
$param['token'] = $token;
return Yohobuy::get(Yohobuy::API_URL_LOGINSESSION . 'Passport/session/logout', $param);
return Yohobuy::get( Helpers::logoutSession($token) );
}
}
... ...
... ... @@ -99,14 +99,13 @@ class NewsaleData
$param['method'] = 'app.search.newProduct';
} else {
$param['method'] = 'app.search.sales';
$param['p_d'] = '0.1,0.9';
$param['p_d'] = '0.1,0.9';
}
$param['page'] = $page;
$param['limit'] = $limit;
$param['order'] = $order;
$param['yh_channel'] = $channel;
$param = array_merge($param, $queriedParams);
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 600); // 缓存10分钟
... ...
... ... @@ -85,6 +85,7 @@ class NewSaleProcess
foreach ($products['product_list'] as $key => $single) {
$one = Helpers::formatProduct($single, true, false, false, 75, 114);
$one['rank'] = $limit * ($page -1) + $key + 1;
!empty($single['sales_phrase']) && $one['sales_phrase'] = $single['sales_phrase'];
$result['goods'][] = $one;
}
... ...
... ... @@ -508,6 +508,7 @@ class Helpers
} elseif ($vo['goods_type'] == 'price_gift') {
$arr[$key]['advanceBuy'] = true;
}
// 上市期
if (!empty($vo['expect_arrival_time'])) {
$arr[$key]['appearDate'] = $vo['expect_arrival_time'];
}
... ... @@ -516,6 +517,52 @@ class Helpers
}
/**
* 订单状态,按订单支付类型和订单状态
* @var array
*/
public static function getOrderStatus()
{
return array(
'1' => array(//在线支付
0 => '待付款',
1 => '已付款',
2 => '已付款',
3 => '已付款',
4 => '已发货',
5 => '已发货',
6 => '交易成功'
),
'2' => array(//货到付款
0 => '备货中',
1 => '已付款',
2 => '已付款',
3 => '已付款',
4 => '已发货',
5 => '已发货',
6 => '交易成功'
),
'3' => array(//现金支付
0 => '待付款',
1 => '已付款',
2 => '已付款',
3 => '已付款',
4 => '已发货',
5 => '已发货',
6 => '交易成功'
),
'4' => array(//抵消支付
0 => '待付款',
1 => '已付款',
2 => '已付款',
3 => '已付款',
4 => '已发货',
5 => '已发货',
6 => '交易成功'
)
);
}
/**
* 获取会员的级别
*
* @param string $vipInfo
... ... @@ -524,7 +571,7 @@ class Helpers
public static function getVipLevel($vipInfo)
{
$vipLevel = 0;
switch ($vipInfo) {
case '普通会员':
$vipLevel = 0;
... ... @@ -539,10 +586,10 @@ class Helpers
$vipLevel = 3;
break;
}
return $vipLevel;
}
/**
* 同步用户的会话
*
... ... @@ -553,10 +600,26 @@ class Helpers
* @param string $callback 回调方法名
* @return string
*/
public static function syncUserSession($uid, $refer = '', $callback='call')
public static function syncUserSession($uid, $refer = '', $callback = 'call')
{
return 'http://m1.yohobuy.com/Passport/session/index?callback=' . $callback
return 'http://m1.yohobuy.com/Passport/session/index?callback=' . $callback
. '&sign=' . md5($uid . 'Js8Yn0!EwPM45-ws') . '&uid=' . $uid . '&go=' . $refer;
}
/**
* 退出清除用户的会话
*
* 转向老的PHP服务器上处理, 因购物车相关的操作会依赖SESSION
*
* @param int $uid 用户ID
* @param string $refer 访问来源
* @param string $callback 回调方法名
* @return string
*/
public static function logoutSession($token, $callback = 'call')
{
return 'http://m1.yohobuy.com/Passport/session/logout?callback=' . $callback
. '&sign=' . md5('Js8Yn0!EwPM45-ws') . '&token=' . $token;
}
}
... ...
... ... @@ -123,6 +123,20 @@ function rePosFooter() {
}
}
/**
*
* add extra margin-bottom for footer to show yoho copyright when there is fixed bottom element on page
* @param {String} The jquery selecor of the fixed bottom element
* @return undefined
*/
function reMarginFooter(fixedElement) {
var fixedElH = $(fixedElement).outerHeight();
if (fixedElement) {
$footer.css('margin-bottom', fixedElH + 'px');
}
}
//页面通用底部位置及status设置
(function() {
var $op = $footer.children('.op-row');
... ... @@ -143,7 +157,7 @@ function rePosFooter() {
//已登录
$op.prepend(
'Hi,' +
'<span>Hi,</span>' +
'<a class="user-name" href="http://m.yohobuy.com/home?tmp=' + Math.random() + '">' + user[0] + '</a>' +
'<a href="http://m.yohobuy.com/passport/signout/index?token=' + user[3] + '">退出</a>'
);
... ... @@ -231,6 +245,8 @@ window.getShoppingKey = getShoppingKey;
window.rePosFooter = rePosFooter;
window.reMarginFooter = reMarginFooter;
});
define("js/category/entry", ["jquery","hammer","swiper","lazyload","index"], function(require, exports, module){
/**
... ... @@ -354,8 +370,9 @@ var $ = require("jquery"),
var swiper,
$fixTitleBar,
$brandList = $('.brand-list');
var $icon = $('.search-icon');
$brandList = $('.brand-list'),
$icon = $('.search-icon'),
hotBrandsSwiper;
var searchH = $('.newbrand-search').outerHeight(),
headerH = $('.yoho-header').outerHeight(),
... ... @@ -366,6 +383,14 @@ var brandsData,
$keyword,
clearTextHammer;
//热门品牌滑动
hotBrandsSwiper = new Swiper('.brands-swiper', {
grabCursor: true,
slidesPerView: 'auto',
wrapperClass: 'brands-list',
slideElement: 'li'
});
swiper = new Swiper('.swiper-container', {
lazyLoading: true,
loop: true,
... ... @@ -380,12 +405,16 @@ $('.yoho-header').css({
top: 0
});
if ($('.banner-top').length > 0) {
$('.hot-brands').css('padding-top', '0');
}
$fixTitleBar = $('<div class="title-bar fixed-title-bar"><h2></h2></div>');
$fixTitleBar.css({
position: 'fixed',
top: brandSwipe
}).hide();
minBrandListTop = brandSwipe + $('.hot-brand').outerHeight() + $('.banner-top').outerHeight();
minBrandListTop = brandSwipe + $('.hot-brands').outerHeight() + $('.banner-top').outerHeight();
$brandList.last().append($fixTitleBar);
function scrollHandler() {
... ... @@ -1592,7 +1621,7 @@ $('.overlay').on('touchstart', function(e) {
});
//点击一级导航,弹出二级导航
$sideNav.on('touchstart', 'li', function (e) {
$sideNav.on('touchstart', 'li', function(e) {
if ($(this).find('.sub-nav').size() > 0) {
$('.sub-nav').removeClass('show');
$(this).find('.sub-nav').addClass('show');
... ... @@ -1605,8 +1634,8 @@ $sideNav.on('touchstart', 'li', function (e) {
});
//返回一级导航,收起二级导航
$subNav.each(function () {
$(this).find('li').eq(0).on('touchstart', function (e) {
$subNav.each(function() {
$(this).find('li').eq(0).on('touchstart', function(e) {
$('.sub-nav').removeClass('show');
e.stopPropagation();
return false;
... ... @@ -1668,7 +1697,7 @@ if ($('.trend-topic-swiper').find('li').size() > 1) {
}
//潮流上装/经典裤装等轮播
$('.category-swiper').each(function (i, index) {
$('.category-swiper').each(function(i, index) {
swiperClass = 'category-swiper' + i;
$(this).addClass(swiperClass);
if ($('.' + swiperClass).find('.swiper-slide').size() > 1) {
... ... @@ -1684,7 +1713,7 @@ $('.category-swiper').each(function (i, index) {
});
//logo动画
requestFrame = (function () {
requestFrame = (function() {
var tempFunc = null,
prefixList = ['webkit', 'moz', 'ms'];
... ... @@ -1697,11 +1726,11 @@ requestFrame = (function () {
}
if (supportCss3) {
return function (callback) {
return function(callback) {
window[tempFunc](callback);
};
}
return function (callback) {
return function(callback) {
window.setTimeout(callback, 67);
};
})();
... ... @@ -1728,7 +1757,7 @@ function tsAnimate() {
if (start % 360 === 0) {
window.setTimeout(tsAnimate, 60 * 1000);
} else {
requestFrame(function () {
requestFrame(function() {
tsAnimate();
});
}
... ... @@ -1744,9 +1773,7 @@ $('.home-header .iconfont').on('touchstart', function() {
});
// 底部留出tab 的高度
$('#yoho-footer').css({
'margin-bottom': '2.5rem'
});
window.reMarginFooter('.footer-tab');
//set cookie
exports.set = function(c) {
... ... @@ -1755,6 +1782,7 @@ exports.set = function(c) {
domain: '.m.yohobuy.com'
});
};
});
define("js/home/maybe-like", ["jquery","hammer","lazyload"], function(require, exports, module){
/**
... ... @@ -1897,7 +1925,7 @@ $('.maybe-like p').on('touchstart', function(e) {
});
function scrollHandler() {
if ($(window).scrollTop() + winH >= $(document).height() - 50) {
if ($(window).scrollTop() + winH >= $(document).height() - 200) {
search();
}
}
... ... @@ -2664,12 +2692,20 @@ $btnSure.on('touchstart', function() {
token: $('#token').val()
},
success: function(data) {
var res;
if (data.code === 200) {
res = data.data;
showErrTip('注册成功');
$.ajax({
url: res.session,
dataType: 'jsonp'
});
//1000ms后跳转页面
setTimeout(function() {
location.href = data.data;
location.href = res.href;
}, 1000);
} else {
showErrTip(data.message);
... ... @@ -2768,13 +2804,22 @@ $loginBtn.on('touchstart', function() {
password: pwd
},
success: function(data) {
var res;
if (data.code === 200) {
res = data.data;
showErrTip('登录成功');
//1s后跳转页面
$.ajax({
url: res.session,
dataType: 'jsonp'
});
//2s后跳转页面
setTimeout(function() {
location.href = data.data;
}, 1000);
location.href = res.href;
}, 2000);
} else {
showErrTip(data.message);
}
... ... @@ -2892,13 +2937,21 @@ $loginBtn.on('touchstart', function() {
password: pwd
},
success: function(data) {
var res;
if (data.code === 200) {
res = data.data;
showErrTip('登录成功');
//1000ms后跳转页面
$.ajax({
url: res.session,
dataType: 'jsonp'
});
//2000ms后跳转页面
setTimeout(function() {
location.href = data.data;
}, 1000);
location.href = res.href;
}, 2000);
} else {
showErrTip(data.message);
}
... ... @@ -3173,9 +3226,12 @@ require("js/product/newsale/newarrival");
require("js/product/newsale/discount");
require("js/product/list");
require("js/product/detail/detail");
require("js/product/detail/desc");
require("js/product/detail/consultform");
require("js/product/newsale/hot-rank");
});
define("js/product/newsale/newarrival", ["jquery","swiper","lazyload","index"], function(require, exports, module){
define("js/product/newsale/newarrival", ["jquery","swiper","lazyload","hammer","index"], function(require, exports, module){
/**
* 新品到着
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
... ... @@ -3563,7 +3619,7 @@ $listNav.on('touchstart', 'li', function(e) {
});
});
define("js/plugin/filter", ["jquery"], function(require, exports, module){
define("js/plugin/filter", ["jquery","hammer"], function(require, exports, module){
/**
* 筛选JS
* 暴露三个接口:注册回调、显示filter、隐藏filter
... ... @@ -3571,9 +3627,8 @@ define("js/plugin/filter", ["jquery"], function(require, exports, module){
* @date: 2015/10/19
*/
var $ = require("jquery");
// Hammer = require('yoho.hammer');
var $ = require("jquery"),
Hammer = require("hammer");
var $filter;
... ... @@ -3679,8 +3734,7 @@ function subClassifyTapEvt($this) {
//初始化筛选
function initFilter(opt) {
// var filterHammer;
var filterHammer;
//注册回调
fCbFn = opt.fCbFn;
... ... @@ -3693,8 +3747,8 @@ function initFilter(opt) {
$filter = $('.filter-mask');
// filterHammer = new Hammer($filter[0]);
$filter.on('touchend', function(e) {
filterHammer = new Hammer($filter[0]);
filterHammer.on('tap', function(e) {
var $this = $(e.target),
$cur;
... ... @@ -3713,7 +3767,7 @@ function initFilter(opt) {
//tap classify
$cur = $this.closest('.classify-item');
e.stopPropagation();
e.srcEvent.stopPropagation();
classifyTapEvt($cur);
}
... ... @@ -3750,6 +3804,7 @@ exports.showFilter = showFilter;
exports.hideFilter = hideFilter;
exports.resetFilter = resetFilter;
});
define("js/product/extract-url", [], function(require, exports, module){
/**
... ... @@ -3762,7 +3817,7 @@ var opt = {};
var paramStr = window.location.search.split('?')[1];
var keyVal = paramStr.split('&');
var keyVal = paramStr ? paramStr.split('&') : [];
var i, key, val;
... ... @@ -3773,52 +3828,25 @@ for (i = keyVal.length; i > 0; i--) {
key = key[0];
//初始化默认参数
switch (key) {
case 'gender':
opt.gender = val;
break;
case 'brand':
opt.brand = val;
break;
case 'sort':
opt.sort = val;
break;
case 'msort':
opt.msort = val;
break;
case 'misort':
opt.misort = val;
break;
case 'color':
opt.color = val;
break;
case 'size':
opt.size = val;
break;
case 'price':
opt.price = val;
break;
case 'discount':
opt.discount = val;
break;
case 'query':
opt.query = val;
break;
case 'style':
opt.style = val;
break;
case 'limit':
opt.limit = val;
break;
case 'channel':
opt.channel = val;
break;
case 'p_d':
opt.p_d = val;
opt[key] = val;
//discount = p_d,同时需要两个参数
if (key === 'discount' || key === 'p_d') {
opt.discount = val;
opt.p_d = val;
}
}
if (typeof opt.gender === 'undefined') {
switch (window.cookie('_Channel')) {
case 'boys':
opt.gender = '1,3';
break;
case 'dayLimit':
opt.dayLimit = val;
case 'girls':
opt.gender = '2,3';
break;
default:
opt.gender = '1,2,3';
}
}
... ... @@ -3845,7 +3873,7 @@ $.ajax({
}
});
});
define("js/product/newsale/discount", ["jquery","swiper","lazyload","index"], function(require, exports, module){
define("js/product/newsale/discount", ["jquery","swiper","lazyload","hammer","index"], function(require, exports, module){
/**
* 商品列表页
* @author: xuqi<qi.xu@yoho.cn>
... ... @@ -4652,6 +4680,13 @@ if ($brandHeader.length > 0) {
success: function(data) {
if (data.code === 200) {
$this.toggleClass('coled');
//提示
if (opt === 'ok') {
tip.show('添加收藏成功');
} else {
tip.show('取消收藏成功');
}
} else if (data.code === 400) {
location.href = data.data;//未登录跳转登录页
} else {
... ... @@ -4680,25 +4715,45 @@ if (window._yas) {
window._yas(1 * new Date(), '1.0.13.2', 'yohobuy_m', window._ozuid, '#goods-container >div >div .good-thumb >img');
}
});
define("js/product/detail/detail", ["jquery","swiper","lazyload","hammer","index"], function(require, exports, module){
define("js/product/detail/detail", ["jquery","swiper","hammer","lazyload","index"], function(require, exports, module){
/**
* 商品详情
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
* @date: 2015/10/20
*/
var $ = require("jquery"),
var $ = require("jquery"),
Swiper = require("swiper"),
Hammer = require("hammer"),
lazyLoad = require("lazyload");
var goodsSwiper,
$discountFolder = $('.goodsDiscount .discount-folder'),
$discountArrow = $('.goodsDiscount .first-item span');
var goodsDiscountEl = document.getElementById('goodsDiscount'),
goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl);
var $cart = $('.cart-bar');
require("js/product/detail/desc");
require("js/product/detail/comments-consults");
require("js/product/recommend-for-you-product-desc");
//add extra marign-bottom for footer to show the yoho copyright
function showFooter() {
var $cartBar = $('.cart-bar');
var timer = setInterval(function() {
if ($cartBar) {
window.reMarginFooter('.cart-bar');
clearInterval(timer);
} else {
$cartBar = $('.cart-bar');
}
}, 200);
}
showFooter();
lazyLoad($('img.lazy'));
... ... @@ -4709,7 +4764,8 @@ goodsSwiper = new Swiper('.banner-swiper', {
paginationClickable: true,
pagination: '.banner-top .pagination-inner',
nextButton: '.my-swiper-button-next',
prevButton: '.my-swiper-button-prev'
prevButton: '.my-swiper-button-prev',
spaceBetween: 3
});
... ... @@ -4720,16 +4776,32 @@ if (0 === $('.goodsDiscount .discount-folder').children().length) {
}
//goods-discount下拉按钮点击事件
$('.goodsDiscount .dropdown').on('click', function() {
if ($discountFolder.is(':hidden')) {
$discountArrow.removeClass('icon-down').addClass('icon-up').html('&#xe608;');
$discountFolder.slideDown();
} else {
$discountArrow.removeClass('icon-up').addClass('icon-down').html('&#xe609;');
$discountFolder.slideUp();
if (goodsDiscountHammer) {
goodsDiscountHammer.on('tap', function(e) {
if ($discountFolder.is(':hidden')) {
$discountArrow.removeClass('icon-down').addClass('icon-up').html('&#xe608;');
$discountFolder.slideDown();
} else {
$discountArrow.removeClass('icon-up').addClass('icon-down').html('&#xe609;');
$discountFolder.slideUp();
}
return false;
});
}
//购物车商品数量
$.ajax({
type: 'GET',
url: '/cart/index/count',
success: function(data) {
if (data.code === 200) {
$cart.find('.num-tag').html(data.data.cart_goods_count).removeClass('hide');
}
}
});
require("js/product/detail/like");
});
define("js/product/detail/desc", ["jquery","lazyload","swiper","index"], function(require, exports, module){
/**
... ... @@ -4752,13 +4824,14 @@ var introUrl = $('#introUrl').val(),
var sizeSwiper,
refSwiper;
require("js/product/recommend-for-you");
//判断是否要显示向左滑动提示
function hiddenTips($ele) {
var offsetContainer,
offsetLastColumn;
if ($ele.length > 0) {
var offsetContainer = $ele[0].getBoundingClientRect().right;
var offsetLastColumn = $ele.find('.swiper-slide:last-child')[0].getBoundingClientRect().right;
offsetContainer = $ele[0].getBoundingClientRect().right;
offsetLastColumn = $ele.find('.swiper-slide:last-child')[0].getBoundingClientRect().right;
if (offsetLastColumn - offsetContainer < 0) {
... ... @@ -4826,48 +4899,24 @@ $(window).scroll(function() {
});
define("js/product/recommend-for-you", ["swiper","jquery","index"], function(require, exports, module){
/**
* 为您优选
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/11/16
*/
var Swiper = require("swiper"),
$ = require("jquery");
var recommendSwiper,
$recommendForYou = $('.recommend-for-you');
$.get('/home/preference').then(function(html) {
$recommendForYou.html(html).show();
if ($('#swiper-recommend').length) {
recommendSwiper = new Swiper('#swiper-recommend', {
slidesPerView: 'auto',
grabCursor: true,
slideElement: 'a',
lazyLoading: true,
watchSlidesVisibility: true
});
}
}).fail(function() {
$recommendForYou.hide();
});
});
define("js/product/detail/comments-consults", ["jquery"], function(require, exports, module){
define("js/product/detail/comments-consults", ["jquery","hammer"], function(require, exports, module){
/**
* 商品详情 --评论和咨询tab
* @author: Lynnic
* @date: 2015/11/18
*/
var $ = require("jquery"),
tip = require("js/plugin/tip");
var commentsNum;
tip = require("js/plugin/tip"),
Hammer = require("hammer");
var commentsNum,consultsNum;
var consultFooterEle = document.getElementById('consult-content-footer'),
consultFooterHammer = consultFooterEle && new Hammer(consultFooterEle);
(function() {
var consultsNum = $('#nav-tab .consults-num').html() - 0;
consultsNum = $('#nav-tab .consults-num').html() - 0;
commentsNum = $('#nav-tab .comments-num').html() - 0;
... ... @@ -4909,6 +4958,45 @@ $('#nav-tab li').on('touchend', function() {
}
}
});
if (consultFooterHammer) {
consultFooterHammer.on('tap', function() {
location.href = $(consultFooterEle).find('a').attr('href');
});
}
});
define("js/product/recommend-for-you-product-desc", ["swiper","jquery","index"], function(require, exports, module){
/**
* 为您优选
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
* @date: 2015/11/16
*/
var Swiper = require("swiper"),
$ = require("jquery");
var recommendSwiper,
$recommendForYou = $('.recommend-for-you'),
preferenceUrl = $('#preferenceUrl').val();
if (preferenceUrl) {
$.get(preferenceUrl).then(function(html) {
$recommendForYou.html(html).show();
if ($('#swiper-recommend').length) {
recommendSwiper = new Swiper('#swiper-recommend', {
slidesPerView: 'auto',
grabCursor: true,
slideElement: 'a',
lazyLoading: true,
watchSlidesVisibility: true
});
}
}).fail(function() {
$recommendForYou.hide();
});
}
});
define("js/product/detail/like", ["jquery","hammer"], function(require, exports, module){
/**
... ... @@ -4922,72 +5010,268 @@ var $ = require("jquery"),
Hammer = require("hammer"),
tip = require("js/plugin/tip");
var likeHammer = new Hammer(document.getElementById('likeBtn'));
var addToCartHammer = new Hammer(document.getElementById('addtoCart'));
var likeEle = document.getElementById('likeBtn'),
likeHammer = likeEle && new Hammer(likeEle);
var productId = $('#productId').val();
var addToCartEle = document.getElementById('addtoCart'),
addToCartHammer = addToCartEle && new Hammer(addToCartEle),
productId = $('#productId').val();
likeHammer.on('tap', function(e) {
var opt,
favorite;
if (likeHammer) {
likeHammer.on('tap', function(e) {
var opt,
favorite;
var $this = $(e.target);
var $this = $(e.target);
if ($this.hasClass('liked')) {
opt = 'cancel';
favorite = 0;
} else {
opt = 'ok';
favorite = 1;
if ($this.hasClass('liked')) {
opt = 'cancel';
favorite = 0;
} else {
opt = 'ok';
favorite = 1;
}
$.ajax({
type: 'POST',
url: '/product/opt/favoriteProduct',
data: {
id: productId,
opt: opt
},
success: function(data) {
if (data.code === 200) {
$this.toggleClass('liked');
if ('cancel' === opt) {
tip.show('取消收藏成功');
} else if ('ok' === opt) {
tip.show('收藏成功');
}
} else if (data.code === 400) {
location.href = data.data;//未登录跳转登录页
} else {
tip.show(data.message);
}
// 统计代码:用于统计用户加入或取消商品收藏的动作
if (window._yas) {
window._yas.sendCustomInfo({
pd: productId,
fa: favorite
});
}
},
error: function() {
tip.show('网络断开连接了~');
}
});
});
}
if (addToCartHammer) {
addToCartHammer.on('tap', function(e) {
// 统计代码:用于统计用户加入购物车的动作
if (window._yas) {
window._yas.sendCustomInfo({
pd: productId,
by: 1
});
}
});
}
});
define("js/product/detail/consultform", ["jquery"], function(require, exports, module){
/**
* 我要咨询提交页面
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
* @date: 2015/12/01
*/
var $ = require("jquery"),
tip = require("js/plugin/tip"),
loading = require("js/plugin/loading");
var $consultForm = $('.consult-form'),
$submit = $('#submit'),
$content = $('#content'),
productId = $('#product_id').val(),
isSubmiting;
$submit.on('touchend', function() {
$content.blur();
$consultForm.submit();
return false;
}).on('touchstart', function() {
$(this).addClass('highlight');
}).on('touchend touchcancel', function() {
$(this).removeClass('highlight');
});
$content.on('focus', function() {
if ($content.val() === '请输入咨询内容') {
$content.val('');
}
}).on('blur', function() {
if ($content.val() === '') {
$content.val('请输入咨询内容');
}
});
// 提交表单请求
$consultForm.on('submit', function() {
var content;
if (isSubmiting) {
return false;
}
// 简单的表单校验
content = $content.val();
if (!content || content === '请输入咨询内容') {
tip.show('咨询内容不能为空');
return false;
}
isSubmiting = true;
loading.showLoadingMask();
$.ajax({
type: 'POST',
url: '/product/opt/favoriteProduct',
method: 'POST',
url: '/product/detail/consultsubmit',
data: {
id: productId,
opt: opt
product_id: productId,
content: content
}
}).then(function(res) {
if ($.type(res) !== 'object') {
res = {};
}
if (res.code !== 200) {
tip.show(res.message || '网络出了点问题~');
isSubmiting = false;
loading.hideLoadingMask();
} else {
tip.show('提交成功~');
setTimeout(window.history.go(-1), 3000);
}
}).fail(function() {
tip.show('网络出了点问题~');
isSubmiting = false;
});
return false;
});
});
define("js/product/newsale/hot-rank", ["jquery","swiper","lazyload","index"], function(require, exports, module){
var $ = require("jquery"),
Swiper = require("swiper"),
lazyLoad = require("lazyload"),
loading = require("js/plugin/loading");
var page = 1,
winH,
listTop,
navSwiper,
notab = 0,
sort = '',
id = '',
hotrankNav,
noResult = '<p class="no-result">未找到相关搜索结果</p>';
function hotrank(page, sort, tabId, notab) {
loading.showLoadingMask();
$.ajax({
type: 'GET',
url: '/product/newsale/selectHotrank?' + sort,
dataType: 'html',
data: {
page: page,
tab_id: tabId,
notab: notab
},
success: function(data) {
if (data.code === 200) {
$this.toggleClass('liked');
if (data === ' ') {
if ($('.rank-main').length < 1 && $('.goods-nav').length < 1) {
$('#hotRank').html(noResult);
} else {
if (page === 1) {
hotrankNav = $('.goods-nav').prop('outerHTML');
if ('cancel' === opt) {
tip.show('取消收藏成功');
} else if ('ok' === opt) {
tip.show('收藏成功');
$('#hotRank').html(hotrankNav + noResult);
}
}
} else if (data.code === 400) {
location.href = data.data;//未登录跳转登录页
} else {
tip.show(data.message);
$('.no-result').remove();
$('.rank-main').remove();
$('#hotRank').append(data);
}
// 统计代码:用于统计用户加入或取消商品收藏的动作
if (window._yas) {
window._yas.sendCustomInfo({
pd: productId,
fa: favorite
});
lazyLoad($('img.lazy'));
$('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top');
winH = $(window).height();
if ($('.rank-main').length !== 0) {
$('#yoho-footer').css('position', 'static');
listTop = $('.rank-main').find('ul').offset().top;
} else {
$('#yoho-footer').css('position', 'fixed');
}
},
error: function() {
tip.show('网络断开连接了~');
navSwiper = new Swiper('.s-goods-nav', {
grabCursor: true,
slidesPerView: 'auto',
slideElement: 'li'
});
loading.hideLoadingMask();
}
});
}
function scrollHandler() {
if (page === 2) {
return;
}
if ($(window).scrollTop() + winH < listTop + $('#hotRank').height() - 100) {
return;
}
page = 2;
notab = 1;
hotrank(page, sort, id, notab);
}
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
addToCartHammer.on('tap', function(e) {
hotrank(page, sort, id, notab);
$('#hotRank').on('touchend touchcancel', function(e) {
var ev = ev || window.event;
var target = ev.target || ev.srcElement;
// 统计代码:用于统计用户加入购物车的动作
if (window._yas) {
window._yas.sendCustomInfo({
pd: productId,
by: 1
});
if (target.nodeName.toLowerCase() === 'span') {
$('.s-goods-nav .nav-item').removeClass('active');
target.parentNode.className = 'active ' + target.parentNode.className;
id = target.getAttribute('data-id') ? target.getAttribute('data-id') : '';
sort = target.getAttribute('data-sort') ? target.getAttribute('data-sort') : '';
page = 1;
notab = 1;
hotrank(page, sort, id, notab);
}
});
$('#hotRank').bind('contextmenu', function(e) {
return false;
});
$('#hotRank').on('touchstart', function(e) {
var ev = ev || window.event;
var target = ev.target || ev.srcElement;
if (target.nodeName.toLowerCase() === 'span') {
target.parentNode.className = 'bgActive ' + target.parentNode.className;
}
}).on('touchend touchcancel', function() {
$('.s-goods-nav .nav-item').removeClass('bgActive');
});
});
... ... @@ -5009,6 +5293,9 @@ require("js/me/address");
require("js/me/suggest");
require("js/me/browse-record");
require("js/me/address-act");
require("js/me/logistic");
require("js/me/pay");
require("js/me/personal-details");
});
define("js/me/order", ["jquery","hammer","lazyload","handlebars","source-map"], function(require, exports, module){
... ... @@ -5141,10 +5428,22 @@ orderHammer.on('tap', function(e) {
},
success: function(data) {
if (data.code === 200) {
dialog.showDialog({
dialogText: '删除订单成功',
autoHide: true,
fast: true
});
//删除订单页面刷新
history.go(0);
}
},
error: function() {
dialog.showDialog({
dialogText: '删除订单失败',
autoHide: true,
fast: true
});
}
});
});
... ... @@ -5166,10 +5465,22 @@ orderHammer.on('tap', function(e) {
},
success: function(data) {
if (data.code === 200) {
dialog.showDialog({
dialogText: '取消订单成功',
autoHide: true,
fast: true
});
//取消订单页面刷新
history.go(0);
}
},
error: function() {
dialog.showDialog({
dialogText: '取消订单失败',
autoHide: true,
fast: true
});
}
});
});
... ... @@ -5199,6 +5510,7 @@ $(window).scroll(function() {
//初始化请求第一页数据
getOrders();
});
define("js/me/dialog", ["jquery","handlebars","source-map","hammer"], function(require, exports, module){
/*
... ... @@ -5285,6 +5597,7 @@ exports.showDialog = function(data, callback) {
exports.hideDialog = function() {
$dialogWrapper.fadeOut();
};
});
define("js/me/order-detail", ["jquery","lazyload","hammer"], function(require, exports, module){
/**
... ... @@ -5359,7 +5672,7 @@ var $navLi = $('#fav-tab > li'),
$brandLoadMore = $('.fav-brand-load-more'),
winH = $(window).height(),
$favProductList = $('.fav-product-list'),
$favBrandList = $('.fav-brand-swiper'),
$favBrandList = $('.fav-brand-swiper-wrapper'),
pageId = 1,
brandPageId = 1, //收藏品牌的当前页数
lockId = true,
... ... @@ -5664,6 +5977,9 @@ headerNavHammer.on('tap', function(e) {
autoHide: true,
dialogText: '提交成功'
});
setTimeout(function() {
location.pathname = 'home/suggest';
}, 2000);
}
}).fail(function() {
... ... @@ -5698,12 +6014,13 @@ $likeBtn.bind('click', function() {
method: 'post',
url: '/home/upAndDown',
data: {
suggest_id: id
suggest_id: id,
reliable: 1
}
}).then(function(data) {
if (data.code === 200) {
$that.closest('.suggest-type').removeClass('show');
$('.suggest-good').addClass('show');
$that.closest('.suggest-item').find('.suggest-good').addClass('show');
}
}).fail(function(data) {
... ... @@ -5725,12 +6042,13 @@ $disLikeBtn.bind('click', function() {
method: 'post',
url: '/home/upAndDown',
data: {
suggest_id: id
suggest_id: id,
reliable: 2
}
}).then(function(data) {
if (data.code === 200) {
$that.closest('.suggest-type').removeClass('show');
$('.suggest-bad').addClass('show');
$that.closest('.suggest-item').find('.suggest-bad').addClass('show');
}
}).fail(function(data) {
... ... @@ -6649,6 +6967,35 @@ $('.yoho-page').on('touchstart', '.list-item, .type-item', function() {
});
});
define("js/product/recommend-for-you", ["swiper","jquery","index"], function(require, exports, module){
/**
* 为您优选
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/11/16
*/
var Swiper = require("swiper"),
$ = require("jquery");
var recommendSwiper,
$recommendForYou = $('.recommend-for-you');
$.get('/home/preference').then(function(html) {
$recommendForYou.html(html).show();
if ($('#swiper-recommend').length) {
recommendSwiper = new Swiper('#swiper-recommend', {
slidesPerView: 'auto',
grabCursor: true,
slideElement: 'a',
lazyLoading: true,
watchSlidesVisibility: true
});
}
}).fail(function() {
$recommendForYou.hide();
});
});
define("js/me/coupons", ["jquery","hammer","mlellipsis"], function(require, exports, module){
var $ = require("jquery"),
Hammer = require("hammer"),
... ... @@ -6668,7 +7015,7 @@ function couponAJAX(statu, page) {
url: '/home/couponData',
dataType: 'html',
data: {
statu: statu,
status: statu,
page: page
},
success: function(data) {
... ... @@ -6765,6 +7112,7 @@ $confim.on('touchend', '.cancel', function() {
$confim.hide();
}).on('touchend', '.confim', function() {
loading.showLoadingMask();
$confim.hide();
$.ajax({
method: 'POST',
url: '/home/delAddress',
... ... @@ -6777,15 +7125,15 @@ $confim.on('touchend', '.cancel', function() {
}
if (res.code !== 200) {
tip.show(res.message || '网络出了点问题~');
loading.hideLoadingMask();
} else {
window.location.reload();
}
}).fail(function() {
tip.show('网络出了点问题~');
loading.hideLoadingMask();
}).always(function() {
deleteId = null;
$confim.hide();
loading.hideLoadingMask();
});
});
... ... @@ -6809,7 +7157,7 @@ $action.on('touchend', '.del', function() {
$submit.on('touchend', function() {
if (security.hasDangerInput(false)) {
return false;
return false;
}
$addressForm.submit();
return false;
... ... @@ -6819,7 +7167,6 @@ $submit.on('touchend', function() {
$(this).removeClass('highlight');
});
});
define("js/me/browse-record", ["jquery","lazyload","handlebars","source-map","hammer"], function(require, exports, module){
/**
... ... @@ -6849,7 +7196,6 @@ var end = false,
var winH = $(window).height();
load.init();
function moreRecord(cb) {
var count = $page.children('.browse-record-good').length;
... ... @@ -6885,7 +7231,7 @@ function moreRecord(cb) {
lazyLoad($page.find('.browse-record-good:gt(' + (count - 1) + ') .lazy'));
}
window.rePosFooter();
page++;
if (cb) {
... ... @@ -6923,6 +7269,7 @@ $page.on('touchstart', '.del-icon', function() {
rightBtnText: '确定'
}
}, function() {
$.ajax({
type: 'GET',
url: '/home/delRecord',
... ... @@ -6931,7 +7278,14 @@ $page.on('touchstart', '.del-icon', function() {
},
success: function(data) {
if (data.code === 200) {
window.history.go(0);
dialog.showDialog({
dialogText: '删除浏览记录成功',
autoHide: true,
fast: true
});
setTimeout(function() {
window.history.go(0);
}, 2500);
}
},
complete: function() {
... ... @@ -6957,11 +7311,11 @@ var $addressForm = $('.edit-address'),
$submit = $('.submit'),
$editAddressPage = $('.my-edit-address-page'),
$addressListPage = $('.my-address-list-page'),
$area = $('.area'),
$footer = $('#yoho-footer'),
$backBtn = $('.nav-back'),
$navTitle = $('.nav-title'),
$input = $('input, textarea'),
navTitle = $navTitle.html(),
$area = $('.area'),
isSubmiting,
currentPage = 'edit',
newArea = [];
... ... @@ -6984,7 +7338,7 @@ $backBtn.on('touchend', function(e) {
// 恢复默认的三级选择
$addressListPage.hide();
$addressListPage.find('ul').hide();
$addressListPage.find('ul').hide().find('li').removeClass('highlight');
$addressListPage.children('ul').show().children('li').show();
newArea = [];
} else {
... ... @@ -7045,6 +7399,7 @@ $addressForm.on('submit', function() {
});
$submit.on('touchend', function() {
$input.blur();
$addressForm.submit();
return false;
}).on('touchstart', function() {
... ... @@ -7053,71 +7408,212 @@ $submit.on('touchend', function() {
$(this).removeClass('highlight');
});
// 省市区
$area.on('touchend', function() {
$editAddressPage.hide();
$addressListPage.show(1, function() {
$footer.hide();
// 省市区列表异步加载
$.get('/home/locationList').then(function(html) {
$addressListPage.html(html);
// 省市区
$area.on('touchend', function() {
$editAddressPage.hide();
$addressListPage.show();
currentPage = 'list';
$navTitle.html('地区选择');
});
currentPage = 'list';
$navTitle.html('地区选择');
});
// touchend 在下滑的时候会触发
// 省市区联动
$addressListPage.find('.address').each(function(i, elem) {
var addressHammer = new Hammer(elem);
// touchend 在下滑的时候会触发
// 省市区联动
$addressListPage.find('.address').each(function(i, elem) {
var addressHammer = new Hammer(elem);
addressHammer.on('tap', function(e) {
var $this = $(e.target);
addressHammer.on('tap', function(e) {
var $this = $(e.target);
newArea.push($this.children('.caption').text());
$this.siblings().hide();
$this.children('ul').show().children('li').show();
if (e.target.tagName.toLowerCase() !== 'li') {
$this = $this.parent('li');
}
newArea.push($this.children('.caption').text());
$this.siblings().hide();
$this.children('ul').show().children('li').show();
$(this).removeClass('highlight');
e.srcEvent.preventDefault();
e.srcEvent.stopPropagation();
e.srcEvent.preventDefault();
e.srcEvent.stopPropagation();
});
});
});
$addressListPage.find('.address-last').each(function(i, elem) {
var addressLastHammer = new Hammer(elem);
$addressListPage.find('.address-last').each(function(i, elem) {
var addressLastHammer = new Hammer(elem);
addressLastHammer.on('tap', function(e) {
var $this = $(e.target);
addressLastHammer.on('tap', function(e) {
var $this = $(e.target);
// 填结果到 html
newArea.push($this.children('.caption').text());
$('[name="area"]').val(newArea.join(' '));
$('[name="area_code"]').val($this.data('id'));
// 填结果到 html
newArea.push($this.children('.caption').text());
$('[name="area"]').val(newArea.join(' '));
$('[name="area_code"]').val($this.data('id'));
$editAddressPage.show();
currentPage = 'edit';
$navTitle.html(navTitle);
$footer.show();
$editAddressPage.show();
currentPage = 'edit';
$navTitle.html(navTitle);
// 恢复默认的三级选择
$addressListPage.hide();
$addressListPage.find('ul').hide();
$addressListPage.children('ul').show().children('li').show();
newArea = [];
// 恢复默认的三级选择
$addressListPage.hide();
$addressListPage.find('ul').hide().find('li').removeClass('highlight');
$addressListPage.children('ul').show().children('li').show();
newArea = [];
e.srcEvent.preventDefault();
e.srcEvent.stopPropagation();
e.srcEvent.preventDefault();
e.srcEvent.stopPropagation();
});
});
$addressListPage.on('touchstart', 'li', function() {
$(this).addClass('highlight');
}).on('touchend touchcancel', 'li', function() {
$(this).removeClass('highlight');
});
}).fail(function() {
tip.show('获取省市区列表失败');
});
$addressListPage.on('touchstart', 'li', function() {
$(this).addClass('highlight');
}).on('touchend touchcancel', 'li', function() {
$(this).removeClass('highlight');
});
define("js/me/logistic", ["jquery"], function(require, exports, module){
/**
* 物流信息页面
* @author: 赵彪<bill.zhao@yoho.cn>
* @date: 2015/12/02
*/
var $ = require("jquery"),
$footer = $('#yoho-footer');
var winH = window.outerHeight,
bodyH = document.body.offsetHeight,
footH = $footer.height();
function addFooterTopBorder() {
if (footH + bodyH > winH) {
window.rePosFooter();
} else {
$footer.css('border-top', '1px solid #f1f1f1');
}
}
$(document).ready(addFooterTopBorder);
$('input, textarea').on('focus', function() {
$footer.hide();
}).on('blur', function() {
$footer.show();
});
define("js/me/pay", ["jquery"], function(require, exports, module){
/**
* 支付页面
* @author: 赵彪<bill.zhao@yoho.cn>
* @date: 2015/12/03
*/
var loading = require("js/plugin/loading");
function isWXOpen() {
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) === 'micromessenger') {
return true;
} else {
return false;
}
}
function hideWeChatPay() {
var payApps = document.getElementsByClassName('app');
[].forEach.call(payApps, function(app, index) {
if (app.innerHTML.indexOf('微信') !== -1) {
app.parentNode.style.display = 'none';
return false;
}
});
}
function handleForWX() {
if (!isWXOpen()) {
hideWeChatPay();
}
}
function setIcon(div, appName) {
if (appName.indexOf('百度') !== -1) {
div.style.backgroundPositionY = '-2.7rem';
return false;
}
if (appName.indexOf('微信') !== -1) {
div.style.backgroundPositionY = '-1.2rem';
return false;
}
if (appName.indexOf('银联') !== -1) {
div.style.backgroundPositionY = '-4rem';
return false;
}
if (appName.indexOf('QQ') !== -1) {
div.style.backgroundPositionY = '-5.4rem';
return false;
}
}
function loadIcon() {
var boxs = document.getElementsByClassName('box');
var div = null;
var appName = null;
[].forEach.call(boxs, function(box, index) {
div = box.getElementsByClassName('icon')[0].getElementsByTagName('div')[0];
if (div) {
appName = box.getElementsByClassName('app')[0].innerHTML;
setIcon(div, appName);
}
});
}
function showPage() {
var pageList = document.getElementsByClassName('payapp-list')[0];
pageList.style.visibility = 'visible';
}
function main() {
handleForWX();
loading.hideLoadingMask();
showPage();
loadIcon();
}
loading.showLoadingMask();
window.onload = main;
});
define("js/me/personal-details", ["jquery"], function(require, exports, module){
/**
* 个人信息
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/11/19
*/
var $ = require("jquery");
var $userAvatar = $('.user-avatar');
var myImage = new Image(),
avatar;
// 部分老用户没有头像,显示默认头像
avatar = $userAvatar.data('avatar');
myImage.src = avatar;
myImage.onload = function() {
$userAvatar.css('background-image', 'url(' + avatar + ')');
};
});
... ...
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.
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Mon Nov 23 16:04:11 2015
Created by FontForge 20120731 at Sat Dec 5 16:26:44 2015
By Ads
</metadata>
<defs>
... ... @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Mon Nov 23 16:04:11 2015
bbox="-0.75 -224 3943 833"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E63E"
unicode-range="U+0078-E63F"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
... ... @@ -252,5 +252,10 @@ t-3.5 -16.5t-5.5 -16.5t-7.5 -15.5t-10 -15t-11.5 -14t-13 -12.5t-14.5 -11.5t-15.5
l-47 -98q-3 -6 -7 -11t-10 -8t-12.5 -4t-13 0.5t-12.5 5.5q-8 3 -13.5 9t-8 13.5t-1.5 16.5t5 16l47 99q23 42 62 64.5t83 16.5q45 -7 77 -39l141 -141q29 -28 38 -65t-4 -75q-17 -43 -34 -60l-72 -73q-5 -4 -9.5 -7t-9.5 -4t-11 -1zM602 87q-4 0 -9 1.5t-8 2.5t-9 4
q-77 58 -154 128q-76 77 -128 154q-9 12 -6 29.5t19 30.5q6 3 13 5t13.5 2t13 -2t11.5 -5.5t9 -8.5q15 -21 27 -36.5t27.5 -35t32 -37t32.5 -32.5q14 -12 21 -18.5t19.5 -17.5t20.5 -18t19.5 -17t20.5 -17.5t19.5 -15.5t20.5 -15q11 -7 16 -17t3 -21.5t-10 -21.5
q-6 -21 -34 -21z" />
<glyph glyph-name="uniE63F" unicode="&#xe63f;" horiz-adv-x="1025"
d="M512 -66q-10 0 -24.5 -0.5t-25 -1t-24 0t-24.5 1.5l-222 -146q0 227 5 243q-164 117 -192 282q-5 30 -5 60q0 122 68.5 223t186 158.5t257.5 57.5q104 0 199 -34t163.5 -92.5t109 -140t40.5 -172.5q0 -167 -126 -290q-124 -121 -312 -144q-37 -5 -74 -5zM512 763
q-91 0 -176.5 -31.5t-148.5 -83.5t-100.5 -124.5t-37.5 -150.5q0 -95 53 -179t142 -138v-170l146 97q16 -3 35.5 -4t49 0t37.5 1q41 0 81 6.5t77 18.5t72 29.5t65 39.5t56.5 47.5t47 55t35 61t22 66t7.5 69.5q0 104 -63.5 194.5t-170.5 143t-229 52.5zM768 300
q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5zM512 300q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5zM256 300q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5
t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5z" />
</font>
</defs></svg>
... ...
... ... @@ -73,6 +73,8 @@ $loginBtn.on('touchstart', function() {
return;
}
$loginBtn.text('正在登录...').addClass('disable');
if (api.phoneRegx[areaCode].test(pn) && api.pwdValidate(pwd)) {
$.ajax({
type: 'POST',
... ... @@ -83,7 +85,8 @@ $loginBtn.on('touchstart', function() {
password: pwd
},
success: function(data) {
var res;
var res,
time;
if (data.code === 200) {
res = data.data;
... ... @@ -91,19 +94,32 @@ $loginBtn.on('touchstart', function() {
$.ajax({
url: res.session,
dataType: 'jsonp'
dataType: 'jsonp',
success: function() {
clearTimeout(time);
//Cookie写入成功后,1s后跳转页面
setTimeout(function() {
location.href = res.href;
}, 1000);
}
});
//1000ms后跳转页面
setTimeout(function() {
//3秒后强制跳转
time = setTimeout(function() {
location.href = res.href;
}, 1000);
}, 3000);
showErrTip('登录成功');
} else {
showErrTip(data.message);
}
},
error: function() {
showErrTip('网络断开连接啦~');
},
complete: function() {
$loginBtn.text('登录').removeClass('disable');
}
});
} else {
... ...
... ... @@ -76,6 +76,8 @@ $loginBtn.on('touchstart', function() {
return;
}
$loginBtn.text('正在登录...').addClass('disable');
//验证账号(数字或者邮箱)和密码合理性
if ((/^[0-9]+$/.test(acc) || api.emailRegx.test(acc)) && api.pwdValidate(pwd)) {
$.ajax({
... ... @@ -86,28 +88,40 @@ $loginBtn.on('touchstart', function() {
password: pwd
},
success: function(data) {
var res;
var res,
time;
if (data.code === 200) {
res = data.data;
showErrTip('登录成功');
$.ajax({
url: res.session,
dataType: 'jsonp'
dataType: 'jsonp',
success: function() {
clearTimeout(time);
//Cookie写入成功后,1s后跳转页面
setTimeout(function() {
location.href = res.href;
}, 1000);
}
});
//1s后跳转页面
setTimeout(function() {
//3秒后强制跳转
time = setTimeout(function() {
location.href = res.href;
}, 1000);
}, 3000);
showErrTip('登录成功');
} else {
showErrTip(data.message);
}
},
error: function() {
showErrTip('网络断开连接啦~');
},
complete: function() {
$loginBtn.text('登录').removeClass('disable');
}
});
} else {
... ...
... ... @@ -66,7 +66,10 @@ $consultForm.on('submit', function() {
isSubmiting = false;
loading.hideLoadingMask();
} else {
window.history.go(-1);
tip.show('提交成功~');
setTimeout(function() {
window.history.go(-1);
}, 3000);
}
}).fail(function() {
tip.show('网络出了点问题~');
... ...
... ... @@ -9,23 +9,30 @@
border: 1px solid #eee;
border-radius: 10rem / $pxConvertRem;
padding: (12rem / $pxConvertRem) (20rem / $pxConvertRem);
display: flex;
align-items: center;
margin-bottom: 20rem / $pxConvertRem;
@include flexbox((display: box, box-align: center), $version: 1);
@include flexbox((display: flex, align-items: center));
> div {
min-height: 40rem / $pxConvertRem;
display: flex;
align-items: center;
@include flexbox((box-flex: 1, display: box, bax-align: center), $version: 1);
@include flexbox((display: flex, align-items: center));
}
.icon {
width: 15%;
@include flexbox((flex-basis: 15%));
img {
width: 60rem / $pxConvertRem;
margin: 0;
}
> div {
width: 60rem / $pxConvertRem;
height: 60rem / $pxConvertRem;
... ... @@ -39,19 +46,29 @@
.app {
width: 40%;
@include flexbox((flex-basis: 40%));
font-size: 32rem / $pxConvertRem;
color: #414141;
}
.hint {
width: 40%;
@include flexbox((flex-basis: 40%));
font-size: 24rem / $pxConvertRem;
color: #4b4b4b;
}
.iconfont {
width: 5%;
justify-content: flex-end;
@include flexbox((box-pack: end), $version: 1);
@include flexbox((flex-basis: 5%, justify-content: flex-end));
color: #e0e0e0;
font-size: 28rem / $pxConvertRem;
}
... ...
... ... @@ -33,6 +33,11 @@ $basicBtnC:#eb0313;
line-height: pxToRem(36px);
&.table {
@include flexbox((
display: box,
box-lines: multiple,
box-pack: start
), $version: 1);
@include flexbox((
display: flex,
flex-wrap: wrap,
justify-content: flex-start
... ... @@ -42,11 +47,17 @@ $basicBtnC:#eb0313;
box-sizing: border-box;
//padding: pxToRem(20px) pxToRem(12px);
padding: 4% 3%;
//width: 50%;
width: 49.9%;
border-bottom: pxToRem(4px) solid #fff;
border-right: pxToRem(4px) solid #fff;
font-size: pxToRem(24px);
background-color: $tableCellC;
word-wrap: break-word;
@include flexbox((
box-flex: 1.0,
display: box,
box-align: center
), $version: 1);
@include flexbox((
display: flex,
align-items: center,
... ...
... ... @@ -38,12 +38,12 @@
text-align: center;
font-size: 22rem / $pxConvertRem;
color: #fff;
background: url("../img/me/employ/rank.png") no-repeat;
background: image-url("../img/me/employ/rank.png") no-repeat;
background-position: center top;
background-size: auto 100%;
&.top {
background: url("../img/me/employ/rank-t.png") no-repeat;
background: image-url("../img/me/employ/rank-t.png") no-repeat;
background-position: center top;
background-size: 100%;
line-height: 54rem / $pxConvertRem;
... ...
... ... @@ -2,12 +2,7 @@
.goods-desc {
padding-bottom: pxToRem(20px);
padding-top: pxToRem(20px);
&.page-block{
.table{
display: flex;
flex-wrap: wrap;
}
}
.service {
width: pxToRem(494px);
height: pxToRem(28px);
... ... @@ -48,6 +43,10 @@
.material-item{
margin: pxToRem(10px) 0;
@include flexbox((
display: box,
box-align: center
), $version: 1);
@include flexbox((
display: flex,
align-items: center
));
... ... @@ -56,6 +55,12 @@
margin: 0;
}
.material-image {
width: 23%;
@include flexbox((
box-flex: 1.0,
display: box,
box-pack: center
), $version: 1);
@include flexbox((
display: flex,
flex-basis: 23%,
... ... @@ -70,6 +75,12 @@
height: auto;
line-height: pxToRem(38px);
color: #4b4b4b;
word-wrap: break-word;
width: 76.9;
@include flexbox((
box-flex: 1.0,
display: box
), $version: 1);
@include flexbox((
display: flex,
flex-basis: 76.9%
... ...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="telephone=no" name="format-detection">
<meta content="yes" name="apple-touch-fullscreen">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<title>{{staticTitle}}</title>
<link rel="stylesheet" href="http://static.buy.test.yoho.cn/css/cuxiao/151201/coupon.mobile.css">
<link rel="dns-prefetch" href="//cdn.yoho.cn">
<link rel="dns-prefetch" href="//static.yohobuy.com">
<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>
</head>
<body>
<div class="coupon-container" id="coupon-container" param="{{activityId}}">
<div class="coupon-hd"></div>
<div class="coupon-bd">
<div class="bd-top"></div>
<div class="bd-bottom"></div>
<div class="coupon-rule">
<h2></h2>
<ul>
<li class="clearfix">
<span>如何领取</span>
<em>12.1-12.6期间,点击页面各品牌领券按钮,即可获得对应品牌的专属券。</em>
</li>
<li class="clearfix">
<span>使用方法</span>
<em>12.1-12.6期间,在结算页面选择使用相应的优惠券。</em>
</li>
<li class="clearfix">
<span>使用细则</span>
<em>在个人中心查看我的优惠券,每个订单限制用一张。</em>
</li>
</ul>
</div>
<div class="floor-header best-choice"></div>
<div class="img-coupon clearfix">
<ul class="img-coupon01">
<li>
<a class="enter-store" href="{{url_350}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15659"></a>
</li>
<li>
<a class="enter-store" href="{{url_160}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15663"></a>
</li>
</ul>
<ul class="img-coupon02">
<li>
<a class="enter-store" href="{{url_341}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15667"></a>
</li>
<li>
<a class="enter-store" href="{{url_710}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15669"></a>
</li>
</ul>
<ul class="img-coupon03">
<li>
<a class="enter-store" href="{{url_471}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15671"></a>
</li>
<li>
<a class="enter-store" href="{{url_495}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15675"></a>
</li>
</ul>
<ul class="img-coupon04">
<li>
<a class="enter-store" href="{{url_235}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15681"></a>
</li>
<li>
<a class="enter-store" href="{{url_583}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15683"></a>
</li>
</ul>
</div>
<div class="logo-coupon">
<ul>
<li class="logo-coupon01">
<a class="enter-store" href="{{url_417}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15665"></a>
</li>
<li class="logo-coupon02">
<a class="enter-store" href="{{url_672}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15673"></a>
</li>
<li class="logo-coupon03">
<a class="enter-store" href="{{url_589}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15679"></a>
</li>
<li class="logo-coupon04">
<a class="enter-store" href="{{url_707}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15699"></a>
</li>
<li class="logo-coupon05">
<a class="enter-store" href="{{url_550}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15687"></a>
</li>
<li class="logo-coupon06">
<a class="enter-store" href="{{url_600}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15693"></a>
</li>
</ul>
</div>
<div class="floor-header top-recommend"></div>
<div class="img-coupon clearfix">
<ul class="img-coupon05">
<li>
<a class="enter-store" href="{{url_402}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15685"></a>
</li>
<li>
<a class="enter-store" href="{{url_720}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15689"></a>
</li>
</ul>
<ul class="img-coupon06">
<li>
<a class="enter-store" href="{{url_138}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15691"></a>
</li>
<li>
<a class="enter-store" href="{{url_506}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15695"></a>
</li>
</ul>
<ul class="img-coupon07">
<li>
<a class="enter-store" href="{{url_419}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15697"></a>
</li>
<li>
<a class="enter-store" href="{{url_581}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15705"></a>
</li>
</ul>
<ul class="img-coupon08">
<li>
<a class="enter-store" href="{{url_722}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15707"></a>
</li>
<li>
<a class="enter-store" href="{{url_191}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15751"></a>
</li>
</ul>
</div>
<div class="logo-coupon">
<ul>
<li class="logo-coupon07">
<a class="enter-store" href="{{url_152}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15701"></a>
</li>
<li class="logo-coupon08">
<a class="enter-store" href="{{url_464}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15703"></a>
</li>
<li class="logo-coupon09">
<a class="enter-store" href="{{url_102}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15709"></a>
</li>
<li class="logo-coupon10">
<a class="enter-store" href="{{url_851}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15711"></a>
</li>
<li class="logo-coupon11">
<a class="enter-store" href="{{url_699}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15713"></a>
</li>
<li class="logo-coupon12">
<a class="enter-store" href="{{url_103}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15733"></a>
</li>
</ul>
</div>
</div>
<div class="coupon-ft">
<div class="other-coupon">
<a href="{{url_girls}}">女生</a>
<a href="{{url_kids}}">童装</a>
<a href="{{url_lifestyle}}">创意生活</a>
</div>
</div>
</div>
<input id="shareLink" type="hidden" value="{{shareLink}}">
<input id="shareImg" type="hidden" value="{{shareImg}}">
<input id="shareTitle" type="hidden" value="{{shareTitle}}">
<input id="shareDesc" type="hidden" value="{{shareDesc}}">
{{#if weixinShare}}
<script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
{{/if}}
<script type="text/javascript" src="http://static.buy.test.yoho.cn/js/cuxiao/jquery.min.js"></script>
<script type="text/javascript" src="http://static.buy.test.yoho.cn/js/cuxiao/151201/coupon.mobile.js"></script>
<script type="text/javascript">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?c6ee7218b8321cb65fb2e98f284d8311";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?65dd99e0435a55177ffda862198ce841";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="telephone=no" name="format-detection">
<meta content="yes" name="apple-touch-fullscreen">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<title>{{title}}</title>
<link rel="stylesheet" href="http://static.buy.test.yoho.cn/css/cuxiao/151201/coupon.mobile.css">
<link rel="dns-prefetch" href="//cdn.yoho.cn">
<link rel="dns-prefetch" href="//static.yohobuy.com">
<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>
</head>
<body>
<div class="coupon-container" id="coupon-container" param="{{activityId}}">
<div class="coupon-hd"></div>
<div class="coupon-bd">
<div class="bd-top"></div>
<div class="bd-bottom"></div>
<div class="coupon-rule">
<h2></h2>
<ul>
<li class="clearfix">
<span>如何领取</span>
<em>12.1-12.6期间,点击页面各品牌领券按钮,即可获得对应品牌的专属券。</em>
</li>
<li class="clearfix">
<span>使用方法</span>
<em>12.1-12.6期间,在结算页面选择使用相应的优惠券。</em>
</li>
<li class="clearfix">
<span>使用细则</span>
<em>在个人中心查看我的优惠券,每个订单限制用一张。</em>
</li>
</ul>
</div>
<div class="floor-header best-choice"></div>
<div class="img-coupon clearfix">
<ul class="img-coupon01 girl">
<li>
<a class="get-coupon" href="{{url_570}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15755"></a>
</li>
<li>
<a class="get-coupon" href="{{url_864}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15761"></a>
</li>
</ul>
<ul class="img-coupon02 girl">
<li>
<a class="get-coupon" href="{{url_824}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15765"></a>
</li>
<li>
<a class="get-coupon" href="{{url_536}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15767"></a>
</li>
</ul>
<ul class="img-coupon03 girl">
<li>
<a class="get-coupon" href="{{url_257}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15773"></a>
</li>
<li>
<a class="get-coupon" href="{{url_342}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15775"></a>
</li>
</ul>
<ul class="img-coupon04 girl">
<li>
<a class="get-coupon" href="{{url_354}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15777"></a>
</li>
<li>
<a class="get-coupon" href="{{url_60}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15663"></a>
</li>
</ul>
</div>
<div class="logo-coupon">
<ul>
<li class="logo-coupon01 girl">
<a class="enter-store" href="{{url_481}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15757"></a>
</li>
<li class="logo-coupon02 girl">
<a class="enter-store" href="{{url_450}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15759"></a>
</li>
<li class="logo-coupon03 girl">
<a class="enter-store" href="{{url_256}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15763"></a>
</li>
<li class="logo-coupon04 girl">
<a class="enter-store" href="{{url_701}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15769"></a>
</li>
<li class="logo-coupon05 girl">
<a class="enter-store" href="{{url_506}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15695"></a>
</li>
<li class="logo-coupon06 girl">
<a class="enter-store" href="{{url_569}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15779"></a>
</li>
</ul>
</div>
<div class="floor-header top-recommend"></div>
<div class="img-coupon clearfix">
<ul class="img-coupon05 girl">
<li>
<a class="get-coupon" href="{{url_324}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15783"></a>
</li>
<li>
<a class="get-coupon" href="{{url_589}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15679"></a>
</li>
</ul>
<ul class="img-coupon06 girl">
<li>
<a class="get-coupon" href="{{url_191}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15751"></a>
</li>
<li>
<a class="get-coupon" href="{{url_4}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15715"></a>
</li>
</ul>
<ul class="img-coupon07 girl">
<li>
<a class="get-coupon" href="{{url_768}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15795"></a>
</li>
<li>
<a class="get-coupon" href="{{url_649}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15799"></a>
</li>
</ul>
<ul class="img-coupon08 girl">
<li>
<a class="get-coupon" href="{{url_1026}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15811"></a>
</li>
<li>
<a class="get-coupon" href="{{url_1027}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15813"></a>
</li>
</ul>
</div>
<div class="logo-coupon">
<ul>
<li class="logo-coupon07 girl">
<a class="enter-store" href="{{url_981}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15787"></a>
</li>
<li class="logo-coupon08 girl">
<a class="enter-store" href="{{url_402}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15793"></a>
</li>
<li class="logo-coupon09 girl">
<a class="enter-store" href="{{url_1021}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15709"></a>
</li>
<li class="logo-coupon10 girl">
<a class="enter-store" href="{{url_860}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15801"></a>
</li>
<li class="logo-coupon11 girl">
<a class="enter-store" href="{{url_435}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15803"></a>
</li>
<li class="logo-coupon12 girl">
<a class="enter-store" href="{{url_327}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15805"></a>
</li>
<li class="logo-coupon13 girl">
<a class="enter-store" href="{{url_505}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15807"></a>
</li>
<li class="logo-coupon14 girl">
<a class="enter-store" href="{{url_987}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15809"></a>
</li>
</ul>
</div>
</div>
<div class="coupon-ft">
<div class="other-coupon">
<a href="{{url_boys}}">男生</a>
<a href="{{url_kids}}">童装</a>
<a href="{{url_lifestyle}}">创意生活</a>
</div>
</div>
</div>
<input id="shareLink" type="hidden" value="{{shareLink}}">
<input id="shareImg" type="hidden" value="{{shareImg}}">
<input id="shareTitle" type="hidden" value="{{shareTitle}}">
<input id="shareDesc" type="hidden" value="{{shareDesc}}">
<script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="http://static.buy.test.yoho.cn/js/cuxiao/jquery.min.js"></script>
<script type="text/javascript" src="http://static.buy.test.yoho.cn/js/cuxiao/151201/coupon.mobile.js"></script>
<script type="text/javascript">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?c6ee7218b8321cb65fb2e98f284d8311";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?65dd99e0435a55177ffda862198ce841";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="telephone=no" name="format-detection">
<meta content="yes" name="apple-touch-fullscreen">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<title>{{title}}</title>
<link rel="stylesheet" href="http://static.buy.test.yoho.cn/css/cuxiao/151201/coupon.mobile.css">
<link rel="dns-prefetch" href="//cdn.yoho.cn">
<link rel="dns-prefetch" href="//static.yohobuy.com">
<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>
</head>
<body>
<div class="coupon-container" id="coupon-container" param="{{activityId}}">
<div class="coupon-hd hd2"></div>
<div class="coupon-bd">
<div class="bd-top"></div>
<div class="bd-bottom"></div>
<div class="coupon-rule">
<h2></h2>
<ul>
<li class="clearfix">
<span>如何领取</span>
<em>12.1-12.10期间,点击页面各品牌领券按钮,即可获得对应品牌的专属券。</em>
</li>
<li class="clearfix">
<span>使用方法</span>
<em>12.1-12.10期间,在结算页面选择使用相应的优惠券。</em>
</li>
<li class="clearfix">
<span>使用细则</span>
<em>在个人中心查看我的优惠券,每个订单限制用一张。</em>
</li>
</ul>
</div>
<div class="logo-coupon">
<ul>
<li class="logo-coupon01 kid">
<a class="enter-store" href="{{url_907}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15859"></a>
</li>
<li class="logo-coupon02 kid">
<a class="enter-store" href="{{url_600}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15693"></a>
</li>
<li class="logo-coupon03 kid">
<a class="enter-store" href="{{url_888}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15863"></a>
</li>
<li class="logo-coupon04 kid">
<a class="enter-store" href="{{url_855}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15865"></a>
</li>
<li class="logo-coupon05 kid">
<a class="enter-store" href="{{url_203}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15867"></a>
</li>
<li class="logo-coupon06 kid">
<a class="enter-store" href="{{url_800}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15869"></a>
</li>
<li class="logo-coupon07 kid">
<a class="enter-store" href="{{url_784}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15871"></a>
</li>
<li class="logo-coupon08 kid">
<a class="enter-store" href="{{url_876}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="16145"></a>
</li>
</ul>
</div>
</div>
<div class="coupon-ft">
<div class="other-coupon">
<a href="{{url_boys}}">男生</a>
<a href="{{url_girls}}">女生</a>
<a href="{{url_lifestyle}}">创意生活</a>
</div>
</div>
</div>
<input id="shareLink" type="hidden" value="{{shareLink}}">
<input id="shareImg" type="hidden" value="{{shareImg}}">
<input id="shareTitle" type="hidden" value="{{shareTitle}}">
<input id="shareDesc" type="hidden" value="{{shareDesc}}">
<script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="http://static.buy.test.yoho.cn/js/cuxiao/jquery.min.js"></script>
<script type="text/javascript" src="http://static.buy.test.yoho.cn/js/cuxiao/151201/coupon.mobile.js"></script>
<script type="text/javascript">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?c6ee7218b8321cb65fb2e98f284d8311";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?65dd99e0435a55177ffda862198ce841";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="telephone=no" name="format-detection">
<meta content="yes" name="apple-touch-fullscreen">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<title>{{title}}</title>
<link rel="stylesheet" href="http://static.buy.test.yoho.cn/css/cuxiao/151201/coupon.mobile.css">
<link rel="dns-prefetch" href="//cdn.yoho.cn">
<link rel="dns-prefetch" href="//static.yohobuy.com">
<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>
</head>
<body>
<div class="coupon-container" id="coupon-container" param="{{activityId}}">
<div class="coupon-hd hd2"></div>
<div class="coupon-bd">
<div class="bd-top"></div>
<div class="bd-bottom"></div>
<div class="coupon-rule">
<h2></h2>
<ul>
<li class="clearfix">
<span>如何领取</span>
<em>12.1-12.10期间,点击页面各品牌领券按钮,即可获得对应品牌的专属券。</em>
</li>
<li class="clearfix">
<span>使用方法</span>
<em>12.1-12.10期间,在结算页面选择使用相应的优惠券。</em>
</li>
<li class="clearfix">
<span>使用细则</span>
<em>在个人中心查看我的优惠券,每个订单限制用一张。</em>
</li>
</ul>
</div>
<div class="logo-coupon">
<ul>
<li class="logo-coupon01 life">
<a class="enter-store" href="{{url_166}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15875"></a>
</li>
<li class="logo-coupon02 life">
<a class="enter-store" href="{{url_201}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15877"></a>
</li>
<li class="logo-coupon03 life">
<a class="enter-store" href="{{url_626}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15879"></a>
</li>
<li class="logo-coupon04 life">
<a class="enter-store" href="{{url_1024}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15881"></a>
</li>
<li class="logo-coupon05 life">
<a class="enter-store" href="{{url_675}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15717"></a>
</li>
<li class="logo-coupon06 life">
<a class="enter-store" href="{{url_801}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15885"></a>
</li>
<li class="logo-coupon07 life">
<a class="enter-store" href="{{url_686}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15887"></a>
</li>
<li class="logo-coupon08 life">
<a class="enter-store" href="{{url_501}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15889"></a>
</li>
<li class="logo-coupon09 life">
<a class="enter-store" href="{{url_925}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15891"></a>
</li>
<li class="logo-coupon10 life">
<a class="enter-store" href="{{url_932}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15893"></a>
</li>
<li class="logo-coupon11 life">
<a class="enter-store" href="{{url_892}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15895"></a>
</li>
<li class="logo-coupon12 life">
<a class="enter-store" href="{{url_849}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15899"></a>
</li>
<li class="logo-coupon13 life">
<a class="enter-store" href="{{url_615}}"></a>
<a class="get-coupon" href="{{jumpUrl}}" param="15901"></a>
</li>
</ul>
</div>
</div>
<div class="coupon-ft">
<div class="other-coupon">
<a href="{{url_boys}}">男生</a>
<a href="{{url_girls}}">女生</a>
<a href="{{url_kids}}">童装</a>
</div>
</div>
</div>
<input id="shareLink" type="hidden" value="{{shareLink}}">
<input id="shareImg" type="hidden" value="{{shareImg}}">
<input id="shareTitle" type="hidden" value="{{shareTitle}}">
<input id="shareDesc" type="hidden" value="{{shareDesc}}">
<script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="http://static.buy.test.yoho.cn/js/cuxiao/jquery.min.js"></script>
<script type="text/javascript" src="http://static.buy.test.yoho.cn/js/cuxiao/151201/coupon.mobile.js"></script>
<script type="text/javascript">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?c6ee7218b8321cb65fb2e98f284d8311";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?65dd99e0435a55177ffda862198ce841";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="telephone=no" name="format-detection">
<meta content="yes" name="apple-touch-fullscreen">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<title>{{staticTitle}}</title>
<link rel="dns-prefetch" href="//cdn.yoho.cn">
<link rel="dns-prefetch" href="//static.yohobuy.com">
<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>
<style>
*{margin: 0; padding: 0;}
#wrapper {width: 100%;}
#wrapper img {width: 100%; height: auto; display: block;overflow: hidden;}
.introduce {font-size: 0.5rem; line-height: 1rem;color: #444;padding: 0 0.75rem;margin-top: 1rem;text-indent: 1.125rem;font-family: "SimHei", "Helvetica", "Arial";}
.brand-item {height: auto;overflow: hidden;background: #f4f4f4;margin-bottom: 1rem;}
.brand-item li {display: block;width: 4rem;height: 4rem;float: left;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;-o-box-sizing: border-box;box-sizing: border-box;border-right: 1px solid #e0e0e0;border-bottom: 1px solid #e0e0e0;border: 1px solid #e0e0e0;}
/* .brand-item li:nth-child(4n+4) {border-right: none;} */
.brand-item li a,.brand-item li img {width: 100%;height: 100%;display: block;overflow: hidden;}
</style>
</head>
<body>
<div id="wrapper">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/banner.jpg">
<div class="introduce">
YOHOPE计划是中国潮流产业的领导者YOHO!集团联合潮流教父Nigo、五月天主唱阿信等全球潮流ICON共同推出的新锐设计师孵化平台,主意是“Help Dream”。该计划为具有设计天赋和潮流设计梦想的国内外原创设计师提供全方位的支持,共同打造更加多元化、更具代表性的设计师品牌和潮流文化,推动中国潮流生态圈的发展。
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/two.jpg">
<ul class="brand-item">
<li>
<a href="{{url_208}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-01.jpg">
</a>
</li>
<li>
<a href="{{url_256}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-02.jpg">
</a>
</li>
<li>
<a href="{{url_257}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-03.jpg">
</a>
</li>
<li>
<a href="{{url_450}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-04.jpg">
</a>
</li>
<li>
<a href="{{url_444}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-05.jpg">
</a>
</li>
<li>
<a href="{{url_443}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-06.jpg">
</a>
</li>
<li>
<a href="{{url_261}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-07.jpg">
</a>
</li>
<li>
<a href="{{url_350}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-08.jpg">
</a>
</li>
<li>
<a href="{{url_302}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-09.jpg">
</a>
</li>
<li>
<a href="{{url_852}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-10.jpg">
</a>
</li>
<li>
<a href="{{url_570}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-11.jpg">
</a>
</li>
<li><a href="{{url_560}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-12.jpg">
</a>
</li>
<li>
<a href="{{url_520}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-13.jpg">
</a>
</li>
<li>
<a href="{{url_562}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-14.jpg">
</a>
</li>
<li>
<a href="{{url_672}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-15.jpg">
</a>
</li>
<li>
<a href="{{url_678}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-16.jpg">
</a>
</li>
<li>
<a href="{{url_396}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-17.jpg">
</a>
</li>
<li>
<a href="{{url_397}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-18.jpg">
</a>
</li>
<li>
<a href="{{url_550}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-19.jpg">
</a>
</li>
<li>
<a href="{{url_591}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-20.jpg">
</a>
</li>
<li>
<a href="{{url_583}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-21.jpg">
</a>
</li>
<li>
<a href="{{url_598}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-22.jpg">
</a>
</li>
<li>
<a href="{{url_824}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-23.jpg">
</a>
</li>
<li>
<a href="{{url_481}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-24.jpg">
</a>
</li>
<li>
<a href="{{url_701}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-25.jpg">
</a>
</li>
<li>
<a href="{{url_464}}">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/brand-26.jpg">
</a>
</li>
</ul>
</div>
<script src="http://static.buy.test.yoho.cn/js/cuxiao/jquery.min.js"></script>
<script src="http://static.buy.test.yoho.cn/js/cuxiao/jquery.lazyload.js"></script>
<script>
$(function() {
$("img.lazy").lazyload({
threshold: 200
});
});
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{{staticTitle}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="telephone=no" name="format-detection">
<meta content="yes" name="apple-touch-fullscreen">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<style>
*{margin: 0;padding: 0;}
#wrapper {width: 100%;}
#wrapper img {width: 100%; height: auto; display: block;overflow: hidden;}
.img-box {width: 100%;position: relative;}
.img-box .href {width: 50%; height: 100%;position: absolute;top: 0;}
.img-box .href-left {left: 0}
.img-box .href-right {right: 0}
.img-box .href-click {width: 90%;height: 100%;position: absolute;top: 0;left: 5%;}
.show-more {height: 100%;width: 25%;position: absolute;top: 0;right: 10%;}
.yoho-tip {position: fixed;display: none;text-align: center;width: 70%;padding: 34px 0;top: 50%;left: 50%;margin-left: -35%;margin-top: -45px;background-color: #000;opacity: 0.7;color: #fff;font-size: 18px;border: none;border-radius: 10px;}
</style>
</head>
<body>
<div id="wrapper">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/01.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/02.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/03.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/04.jpg">
<a class="href href-right" href="{{url_yohope}}"></a>
</div>
<a href="{{url_mycoupon}}"><img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/05.jpg"></a>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/06.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/07.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/08.jpg">
<a class="href href-left" href="{{url_60}}"></a>
<a class="href href-right" href="{{url_710}}"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/09.jpg">
<a class="href href-left" href="{{url_138}}"></a>
<a class="href href-right" href="{{url_495}}"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/10.jpg">
<a class="href href-left" href="{{url_419}}"></a>
<a class="href href-right" href="{{url_868}}"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/11.jpg">
<a class="href href-left" href="{{url_1026}}"></a>
<a class="href href-right" href="{{url_1027}}"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/12.jpg">
<a class="href href-left" href="{{url_324}}"></a>
<a class="href href-right" href="{{url_649}}"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/13.jpg">
<a class="href href-left" href="{{url_more}}"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/14.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/15.jpg">
<a class="href-click" id="get-all-coupon" href="{{jumpUrl}}"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/16.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/17.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/18.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/19.jpg">
<a href="{{url_help}}" class="show-more"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
</div>
<div id="coupon-container" param="{{activityId}}"></div>
<script src="http://static.buy.test.yoho.cn/js/cuxiao/jquery.min.js"></script>
<script src="http://static.buy.test.yoho.cn/js/cuxiao/jquery.lazyload.js"></script>
<script src="http://static.buy.test.yoho.cn/js/cuxiao/151201/coupon.mobile.js"></script>
<script>
$(function() {
$("img.lazy").lazyload({
threshold: 200
});
});
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -13,7 +13,7 @@
{{/isLogin}}
{{^isLogin}}
<div class="user-info">
<a class="login-btn" href="/signin.html">
<a class="login-btn" href="/signin.html?refer=/home">
登录/注册
</a>
</div>
... ... @@ -36,26 +36,26 @@
<div class="my-order">
<div class="order-title">
我的订单
<a class="iconfont" href="/home/order">
<a class="iconfont" href="/home/orders">
查看全部订单 &#xe604;
</a>
</div>
<div class="order-type clearfix">
<a class="type-item" href="/home/order?type=2">
<a class="type-item" href="/home/orders?type=2">
<span class="iconfont">&#xe634;</span>
<br>待付款
{{#if wait_pay_num}}
<span class="num">{{wait_pay_num}}</span>
{{/if}}
</a>
<a class="type-item" href="/home/order?type=3">
<a class="type-item" href="/home/orders?type=3">
<span class="iconfont">&#xe63b;</span>
<br>待发货
{{#if wait_cargo_num}}
<span class="num">{{wait_cargo_num}}</span>
{{/if}}
</a>
<a class="type-item" href="/home/order?type=4">
<a class="type-item" href="/home/orders?type=4">
<span class="iconfont">&#xe633;</span>
<br>待收货
{{#if send_cargo_num}}
... ...
{{> layout/header}}
<div class="consult-form-page">
<div class="consult-form-page yoho-page">
<form class="consult-form" url="{{formUrl}}">
<textarea id="content" name="content">请输入咨询内容</textarea>
<input type="hidden" id="product_id" value="{{productId}}">
... ...
... ... @@ -25,7 +25,13 @@
{{# active}}
<p>{{.}}</p>
{{/ active}}
<p>{{salePrice}}<b>{{price}}</b></p>
{{#sales_phrase}}
<p>{{.}}</p>
{{/sales_phrase}}
<p>
{{#salePrice}{{.}}{{/salePrice}}{{#price}}
<b>¥{{.}}</b>{{/price}}
</p>
</div>
</a>
</li>
... ...
... ... @@ -26,9 +26,11 @@
{{#if unpaid}}
<div class="order-opt">
<span class="btn cancel">取消订单</span>
{{#if payUrl}}
<a class="locHref" href="{{payUrl}}">
<span class="btn pay">立即付款</span>
</a>
{{/if}}
</div>
{{/if}}
... ...
... ... @@ -6,7 +6,7 @@
<span class="en-title">{{enTitle}}</span>
</h1>
{{#detail}}
<div class="detail table clearfix">
<div class="detail table">
{{#list}}
<div class="column">{{param}}</div>
{{/list}}
... ...
... ... @@ -24,9 +24,6 @@ class ErrorController extends AbstractAction
header('HTTP/1.1 404 Not Found');
header('Status: 404 Not Found');
// @todo debug
//echo $exception->getMessage();
// 设置网站标题
$this->setTitle('页面不存在');
$this->setNavHeader('抱歉,页面不存在!', true, SITE_MAIN);
... ...
... ... @@ -52,7 +52,7 @@ class HomeController extends AbstractAction
$uid = $this->getUid(true);
if ($uid) {
$data['isLogin'] = true;
$udid = $this->getUdid();
$udid = $this->getUdid();
$data += UserModel::getUserProfileData($uid);
$data += UserModel::getInfoNumData($uid, $udid);
}
... ... @@ -137,7 +137,8 @@ class HomeController extends AbstractAction
if ($this->isAjax()) {
$uid = $this->getUid(true);
$page = $this->post('page', 1);
$result = UserModel::getFavBrandData($uid, 10, $page, 10);
$gender = Helpers::getGenderByCookie();
$result = UserModel::getFavBrandData($uid, $gender, $page, 10);
}
if (empty($result)) {
... ... @@ -463,18 +464,17 @@ class HomeController extends AbstractAction
*/
public function onlineServiceDetailAction()
{
$service = array();
$cateId = $this->get('cateId', 0);
$cateName = $this->get('cateName', '');
if ($cateId > 0) {
$service = Home\OnlineModel::getOnlineServiceDetail($cateId);
}
$service = array(
'header' => array('title' => '在线客服'),
$service = array(
'header' => array('title' => '在线客服'),
'pageFooter' => true,
'service' => $service
);
'service' => $service
);
$this->setTitle('在线客服');
$this->setNavHeader($cateName, true, '');
... ... @@ -636,14 +636,15 @@ class HomeController extends AbstractAction
* 我的订单页面,获得nav导航条焦点。并且异步请求订单详情列表页(getOrders)
*
*/
public function orderAction()
public function ordersAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
$backUrl = Helpers::url('/home');
$this->setTitle('我的订单');
$this->setNavHeader('我的订单');
$this->setNavHeader('我的订单', $backUrl);
$order = array();
//获得type值,type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论
... ... @@ -762,6 +763,7 @@ class HomeController extends AbstractAction
$orderCode = $this->get('order_code');
$data = OrderModel::Logistics($orderCode, $this->_uid);
$data['logisticInfoPage'] = true;
$data['pageFooter'] = true;
... ... @@ -773,17 +775,37 @@ class HomeController extends AbstractAction
*/
public function payAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
$this->setTitle('支付中心');
$this->setNavHeader('支付中心');
$orderCode = $this->get('order_code');
if (empty($orderCode)) {
$this->error();
}
$this->_view->display('pay', array(
'payAppInfo' => array(
0 => array(
'appIcon' => '',
'weixin' => true,
'app' => '微信支付',
'hint' => '需下载微信客户端',
'subHint' => '推荐使用',
),
'appIcon' => '',
'payLink' => Helpers::url('/shopping/pay/index', array('order_code' => $orderCode, 'payment_type' => 18)),
'appId' => 'alipay',
'app' => '支付宝支付',
'hint' => '支付宝钱包支付',
'subHint' => '推荐支付宝用户使用',
),
1 => array(
'appIcon' => '',
'payLink' => '',
'appId' => 'weixin',
'app' => '微信支付',
'hint' => '需安装微信客户端',
'subHint' => '',
),
),
'orderCode' => $orderCode,
));
}
... ...
... ... @@ -17,23 +17,67 @@ class OrderModel
/**
* 订单相关数据处理
*
* payment_type:
'1' => array(//在线支付
0 => '待付款',
1 => '已付款',
2 => '已付款',
3 => '已付款',
4 => '已发货',
5 => '已发货',
6 => '交易成功'
),
'2' => array(//货到付款
0 => '备货中',
1 => '已付款',
2 => '已付款',
3 => '已付款',
4 => '已发货',
5 => '已发货',
6 => '交易成功'
),
'3' => array(//现金支付
0 => '待付款',
1 => '已付款',
2 => '已付款',
3 => '已付款',
4 => '已发货',
5 => '已发货',
6 => '交易成功'
),
'4' => array(//抵消支付
0 => '待付款',
1 => '已付款',
2 => '已付款',
3 => '已付款',
4 => '已发货',
5 => '已发货',
6 => '交易成功'
)
*/
public static function getOrder($type, $page, $limit, $gender, $yh_channel, $uid)
{
$result = array();
//调用接口获得数据
$data = OrderData::getOrderData($type, $page, $limit, $gender, $yh_channel, $uid);
$data = OrderData::getOrderData($type, $page, $limit, $gender, $yh_channel, $uid);
// 判断是否还有数据, 没有数据则返回空
if (isset($data['data']['page_total']) && $page > $data['data']['page_total']) {
return $result;
}
//检查数据返回是否正常,正常则处理数据
if (!empty($data['data']['order_list'])) {
// 订单的状态列表
$orderStatus = Helpers::getOrderStatus();
foreach ($data['data']['order_list'] as $key => $vo) {
if ($vo['payment_status'] == 'Y' && $vo['status'] == 0) {
$vo['status'] = 1;
}
//订单号,支付状态,订单商品数量,订单总价格
$result[$key]['orderNum'] = $vo['order_code'];
$result[$key]['orderStatus'] = ($vo['is_cancel'] === 'Y') ? '已取消' : $vo['status_str'];
$result[$key]['orderStatus'] = ($vo['is_cancel'] === 'Y') ? '已取消' : $orderStatus[ $vo['payment_type'] ][ $vo['status'] ];
$result[$key]['count'] = count($vo['order_goods']);
$result[$key]['sumCost'] = $vo['amount'];
//类内调用格式化订单商品数据方法
... ... @@ -47,13 +91,14 @@ class OrderModel
break;
}
/* 先判断订单付款方式,根据不同的付款方式计算订单状态。(注:货到付款没有待付款状态)
* 付款方式:1 => 在线支付,2 => 货到付款,3 => 现金支付,4 => 抵消支付;
*/
* 付款方式:1 => 在线支付,2 => 货到付款,3 => 现金支付,4 => 抵消支付;
*/
//支付方式为非货到付款时,计算订单状态。
if ($vo['payment_type'] != 2) {
switch ($vo['status']) {
case 0: // 备货中
case 0: // 待付款
$result[$key]['unpaid'] = true;
$result[$key]['payUrl'] = Helpers::url('/home/pay', array('order_code' => $vo['order_code']));
break;
//未发货&未收货 状态,统一合并到待收货状态。
case 1:
... ... @@ -79,7 +124,8 @@ class OrderModel
//订单为货到付款订单时,计算订单状态。(货到付款没有待付款状态)
switch ($vo['status']) {
case 0:
case 0: // 备货中
$result[$key]['unpaid'] = true;
break;
case 1:
case 2:
... ... @@ -126,7 +172,7 @@ class OrderModel
public static function Logistics($orderCode, $uid)
{
$result = array();
if (isset($orderCode) && is_numeric($uid)) {
$logistics = OrderData::LogisticsData($orderCode, $uid);
if (!empty($logistics['data'])) {
... ... @@ -134,7 +180,7 @@ class OrderModel
$result['logisticImg'] = $logistics['data']['logo'];
$result['logisticCompany'] = $logistics['data']['caption'];
$result['logisticNumber'] = $logistics['data']['express_number'];
$build = array();
foreach ($logistics['data']['express_detail'] as $value) {
$build['status'] = $value['accept_address'];
... ... @@ -143,10 +189,10 @@ class OrderModel
}
}
}
return $result;
}
/**
* 根据type值设置nav属性
*/
... ... @@ -163,7 +209,7 @@ class OrderModel
'name' => $value,
'typeId' => $key,
'active' => $act,
'url' => Helpers::url('/home/order', array('type' => $key))
'url' => Helpers::url('/home/orders', array('type' => $key))
);
}
... ...
... ... @@ -27,7 +27,7 @@ class HomeModel
/* 女生楼层资源的位置码 */
const CODE_FLOOR_GIRLS = '189b6686065dbd6755dd6906cf03c002';
/* 潮童楼层资源的位置码 */
const CODE_FLOOR_KIDS = '66cad79d93e055ad6fc5c8744086066d'; // '66cad79d93e055ad6fc5c8744086066d';
const CODE_FLOOR_KIDS = 'b8c1bff53d4ea60f978926d538620636'; // '66cad79d93e055ad6fc5c8744086066d';
/* 创意生活楼层资源的位置码 */
const CODE_FLOOR_LIFESTYLE = '61cd852c6afcf60660196154f66a3a62';
... ...
... ... @@ -51,7 +51,19 @@ class UserModel
*/
public static function getInfoNumData($uid, $udid)
{
$result = array();
$result = array(
'wait_pay_num' => 0,
'wait_cargo_num' => 0,
'send_cargo_num' => 0,
'brand_favorite_total' => 0,
'product_favorite_total' => 0,
'inbox_total' => 0,
'comment_total' => 0,
'refund_exchange_num' => 0,
'yoho_coin_num' => 0,
'coupon_num' => 0,
'product_browse' => 0
);
// 调用接口获取个人中心页面优惠券,收藏的商品等的数目数据
$infoNumData = UserData::infoNum($uid, $udid);
... ... @@ -236,7 +248,7 @@ class UserModel
$product = array();
foreach ($val['new_product'] as $one) {
$product = array();
$product['link'] = isset($val['goodsList'][0]) ? Helpers::url('/product/pro_' . $val['product_id'] . '_' . $val['goodsList'][0]['id'] . '/' . $val['cnAlphabet'] . '.html') : '';
$product['link'] = isset($one['goods'][0]) ? Helpers::url('/product/pro_' . $one['product_id'] . '_' . $one['goods'][0]['id'] . '/' . $one['cnAlphabet'] . '.html') : '';
$product['imgUrl'] = (isset($one['default_images']) && !empty($one['default_images'])) ? Images::getImageUrl($one['default_images'], 235, 314) : '';
$product['price'] = !empty($one['market_price']) ? '¥' . $one['market_price'] : 0;
$product['discount'] = !empty($one['sales_price']) ? '¥' . $one['sales_price'] : 0;
... ... @@ -302,7 +314,7 @@ class UserModel
foreach ($data as &$val) {
$val['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : '';
$val['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : '';
$val['sales_price'] = !empty($val['sales_price']) ? $val['sales_price'] . '.00' : 0;
$val['sales_price'] = (!empty($val['sales_price']) && !is_float($val['sales_price'])) ? $val['sales_price'] . '.00' : $val['sales_price'];
$val['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? $val['market_price'] . '.00' : false;
}
!empty($data) && $result['browseRecord'] = $data;
... ...
... ... @@ -31,7 +31,7 @@ class DetailModel
if (is_numeric($productId) && is_numeric($goodsId)) {
// 调用服务
$baseInfo = DetailData::baseInfo($productId, $uid);
$baseInfo = DetailData::baseInfo($productId, $uid);
// 判断商品是否在架
if (empty($baseInfo['status'])) {
... ... @@ -42,7 +42,7 @@ class DetailModel
if (isset($baseInfo['productName'])) {
$result['goodsName'] = $baseInfo['productName'];
}
// 商品促销短语
if (!empty($baseInfo['salesPhrase'])) {
$result['goodsSubtitle'] = $baseInfo['salesPhrase'];
... ... @@ -95,7 +95,7 @@ class DetailModel
// 上市期
if (isset($baseInfo['expectArrivalTime']) && !empty($baseInfo['expectArrivalTime'])) {
$result['periodOfMarket'] = date('n', $baseInfo['expectArrivalTime']) . '月';
$result['periodOfMarket'] = $baseInfo['expectArrivalTime'] . '月';
}
// 促销信息
... ... @@ -103,7 +103,6 @@ class DetailModel
$build = array();
foreach ($baseInfo['promotionBoList'] as $value) {
$build['text'] = $value['promotionTitle'];
//$build['type'] = $value['promotionType'];
$result['goodsDiscount']['list'][] = $build;
}
}
... ... @@ -138,11 +137,11 @@ class DetailModel
foreach ($baseInfo['commentBoWrapper']['commentBoList'] as $value) {
$build['userName'] = $value['nickName'];
$build['desc'] = $value['colorName'] . '/' . $value['sizeName'];
$build['content'] = $value['content'];
$build['content'] = isset($value['content']) ? $value['content'] : '';
$build['time'] = $value['createTime'];
$result['feedbacks']['comments'][] = $build;
}
$result['feedbacks']['link'] = Helpers::url('/product/detail/comments', array('product_id' => $productId, 'total' => $result['feedbacks']['commentsNum']));
//$result['feedbacks']['link'] = Helpers::url('/product/detail/comments', array('product_id' => $productId, 'total' => $result['feedbacks']['commentsNum']));
}
// 品牌信息
... ... @@ -212,12 +211,14 @@ class DetailModel
// 悬浮的购物车信息
$result['cartInfo'] = array(
'cartUrl' => Helpers::url('/cart/index/index', null), // 购物车链接
'addToCartUrl' => Helpers::url('/product/buy_' . $productId . '_' . $goodsId . '.html'), // 加入购物车链接
'numInCart' => 0,
'goodsInstore' => $baseInfo['storage'], // 库存量
'soldOut' => $baseInfo['storage'] == 0, // 已售磬
'notForSale' => $baseInfo['attribute'] == 2, // 非卖品
);
if (!$result['cartInfo']['soldOut'] && !$result['cartInfo']['notForSale']) {
$result['cartInfo']['addToCartUrl'] = Helpers::url('/product/buy_' . $productId . '_' . $goodsId . '.html'); // 加入购物车链接
}
// 是否收藏
$result['isCollect'] = false;
... ... @@ -286,6 +287,26 @@ class DetailModel
'enTitle' => 'SIZE INFO',
'detail' => array('list' => array()),
);
/* 参考尺码 */
$boyReference = !empty($sizeInfo['productExtra']['boyReference']);
$girlReference = !empty($sizeInfo['productExtra']['girlReference']);
$gender = isset($sizeInfo['gender']) ? $sizeInfo['gender'] : 3;
$referenceName = '参考尺码';
if (($gender == 1 && $boyReference) || ($gender == 2 && $girlReference)) {
$referenceName = '参考尺码';
} elseif ($gender == 3 && $boyReference) {
$referenceName = '参考尺码(男)';
} elseif ($gender == 3 && $girlReference) {
$referenceName = '参考尺码(女)';
}
$referenceList = array();
// 判断是否显示参考尺码
$showReference = !empty($sizeInfo['sizeInfoBo']['sizeBoList'][0]['referenceSize']) && ($sizeInfo['sizeInfoBo']['sizeBoList'][0]['referenceSize']['gender'] == $gender || $sizeInfo['sizeInfoBo']['sizeBoList'][0]['referenceSize']['gender'] == 3);
if ($showReference) {
$referenceList[0] = array('param' => $referenceName);
}
$sizeNameList = array(0 => array('param' => '吊牌尺码')); // 尺码名称
$sizeBoGroup = array(); // 尺码按ID分组
foreach ($sizeInfo['sizeInfoBo']['sizeAttributeBos'] as $attr) {
... ... @@ -293,6 +314,9 @@ class DetailModel
}
foreach ($sizeInfo['sizeInfoBo']['sizeBoList'] as $value) {
$sizeNameList[] = array('param' => $value['sizeName']);
if (!empty($value['referenceSize']['gender']) && ($value['referenceSize']['gender'] == $gender || $value['referenceSize']['gender'] == 3)) {
$referenceList[] = array('param' => $value['referenceSize']['referenceName']);
}
foreach ($value['sortAttributes'] as $attr) {
$sizeBoGroup[$attr['id']][] = array('param' => $attr['sizeValue']);
}
... ... @@ -300,6 +324,9 @@ class DetailModel
// 根据模板页面的显示,按表格一列一列来显示
$result['sizeInfo']['detail']['list'][0]['params'] = $sizeNameList;
if ($showReference) {
$result['sizeInfo']['detail']['list'][1]['params'] = $referenceList;
}
foreach ($sizeBoGroup as $value) {
$result['sizeInfo']['detail']['list'][]['params'] = $value;
}
... ... @@ -390,6 +417,7 @@ class DetailModel
'\r\n\t' => '',
'</p>' => '',
'<img src=' => "<img class=\"lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw==\" data-original=",
'<img border="0" src=' => "<img border=\"0\" class=\"lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw==\" data-original=",
)),
);
}
... ... @@ -464,8 +492,8 @@ class DetailModel
if (is_numeric($productSkn)) {
$preference = DetailData::preference($productSkn, $channel, $brandId);
if (!empty($preference['data'])) {
foreach ($preference['data'] as $value) {
if (!empty($preference)) {
foreach ($preference as $value) {
$result['recommendList'][] = Helpers::formatProduct($value, false, true, true, 299, 388, false, false);
}
}
... ...
... ... @@ -16,14 +16,20 @@ class LoginController extends AbstractAction
* 登录页
*/
public function indexAction()
{
$this->setTitle('登录');
{
$refer = $this->get('refer');
// 已登录则直接跳回
$uid = $this->getUid();
if ($uid) {
$refer = empty($refer) ? SITE_MAIN . '/?go=1' : rawurldecode($refer);
$this->go($refer);
}
if (!empty($refer)) {
$this->setCookie('refer', $refer);
}
$this->setTitle('登录');
$data = array(
'loginIndex' => true, // 模板中使用JS的标识
'backUrl' => '/', // 返回的URL链接
... ... @@ -47,13 +53,19 @@ class LoginController extends AbstractAction
*/
public function internationalAction()
{
$this->setTitle('国际账号登录');
$refer = $this->get('refer');
// 已登录则直接跳回
$uid = $this->getUid();
if ($uid) {
$refer = empty($refer) ? SITE_MAIN . '/?go=1' : rawurldecode($refer);
$this->go($refer);
}
if (!empty($refer)) {
$this->setCookie('refer', $refer);
}
$this->setTitle('国际账号登录');
$data = array();
$data['loginInternational'] = true; // 模板中使用JS的标识
$data['backUrl'] = '/'; // 返回的URL链接
... ... @@ -61,6 +73,7 @@ class LoginController extends AbstractAction
$data['isPassportPage'] = true; // 模板中模块标识
$data['areaCode'] = '+86'; // 默认区号
$data['countrys'] = RegData::getAreasData(); // 地区信息列表
// 渲染模板
$this->_view->display('international', $data);
}
... ... @@ -73,9 +86,11 @@ class LoginController extends AbstractAction
$this->setCookie('_UID', '');
$refer = $this->server('HTTP_REFERER', SITE_MAIN);
$token = $this->get('token');
LoginData::signoutSession($token);
$token = $this->get('token');
if (!empty($token)) {
LoginData::signoutSession($token);
}
$this->go($refer);
}
... ... @@ -127,7 +142,6 @@ class LoginController extends AbstractAction
}
$data['data']['session'] = Helpers::syncUserSession($data['data']['uid']);
$data['data']['href'] = $refer;
} while (false);
$this->echoJson($data);
... ... @@ -174,14 +188,14 @@ class LoginController extends AbstractAction
if (isset($realName, $email, $userId)) {
$result = LoginData::signinByOpenID($realName, $userId, 'alipay');
}
$refer = $this->getCookie('refer');
if (empty($refer)) {
$refer = SITE_MAIN . '/?go=1';
} else {
$refer = rawurldecode($refer);
}
if ($result['code'] == 200 && !empty($result['data']['uid'])) {
$this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
} else {
... ... @@ -201,7 +215,7 @@ class LoginController extends AbstractAction
$result = array();
if ($partnerInfo && is_array($partnerInfo)) {
$result = LoginData::signinByOpenID($partnerInfo['nickname'], $access['openid'], 'qq');
$result = LoginData::signinByOpenID($partnerInfo['nickname'], $access['openid'], 'qq');
}
$refer = $this->getCookie('refer');
... ... @@ -210,7 +224,7 @@ class LoginController extends AbstractAction
} else {
$refer = rawurldecode($refer);
}
if ($result['code'] == 200 && !empty($result['data']['uid'])) {
$this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
} else {
... ... @@ -225,11 +239,10 @@ class LoginController extends AbstractAction
{
$sina = Factory::create('sinaweibo');
$access = $sina->getAccessToken();
/* 获取QQ腾讯用户的详细信息 */
/* 获取用户的详细信息 */
$partnerInfo = $sina->getUserInfo($access);
$result = array();
if ($partnerInfo && is_array($partnerInfo)) {
$result = LoginData::signinByOpenID($partnerInfo['screen_name'], $access['uid'], 'sina');
}
... ... @@ -240,7 +253,7 @@ class LoginController extends AbstractAction
} else {
$refer = rawurldecode($refer);
}
if ($result['code'] == 200 && !empty($result['data']['uid'])) {
$this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
} else {
... ...
... ... @@ -125,7 +125,7 @@ class RegController extends AbstractAction
}
/* 向手机发送注册验证码 */
$data = RegData::sendCodeToMobile($area, $mobile);
$data = RegData::sendCodeToMobile($area, $mobile);
if (!isset($data['code'])) {
break;
}
... ...
... ... @@ -124,7 +124,7 @@ class DetailController extends AbstractAction
'consults' => array(
'list' => \Product\DetailModel::getConsults($productId),
),
'consultUrl' => Helpers::url('/product/detail/consultform'),
'link' => Helpers::url('/product/detail/consultform', array('product_id' => $productId)),
);
// 渲染模板
... ... @@ -186,7 +186,7 @@ class DetailController extends AbstractAction
$result = array();
if ($this->isAjax()) {
$productSkn = $this->get('productSkn'); // 50000058
$productSkn = $this->get('productSkn');
$brandId = $this->get('brandId');
$channel = Helpers::getChannelByCookie();
$result = \Product\DetailModel::getPreference($productSkn, $channel, $brandId);
... ...
... ... @@ -187,7 +187,6 @@ class NewsaleController extends AbstractAction
$order = Helpers::transOrder($orderVal, $type);
$channel = Helpers::getChannelByCookie();
$data = NewsaleData::selectNewSaleProducts(
$gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order
);
... ...