Authored by htoooth

add fake data

... ... @@ -20,7 +20,7 @@ const detailHelper = require('../models/detail-helper');
module.exports.showMain = (req, res, next) => {
// TODO: vipLevel = 0; // 用户等级
let pid = 217011;
let pid = 204503;
let uid = req.user.uid || '';
... ...
... ... @@ -6,18 +6,24 @@ const sign = require(`${library}/sign`);
const api = new API();
const fake = require('./fake');
module.exports.getBannerInfoAsync = (bid) => {
return api.get('', sign.apiSign({
method: 'web.brand.banner',
brand_id: bid
}));
//return api.get('', sign.apiSign({
// method: 'web.brand.banner',
// brand_id: bid
//}));
return Promise.resolve(fake.fakeBrandBanner);
};
module.exports.getBrandLogoByDomainAsync = (domain) => {
return api.get('', sign.apiSign({
domain: domain,
method: 'web.brand.byDomain'
}));
//return api.get('', sign.apiSign({
// domain: domain,
// method: 'web.brand.byDomain'
//}));
return Promise.resolve(fake.fakeBrandDomain);
};
... ...
... ... @@ -12,21 +12,23 @@ module.exports.getBrandByDomainAsync = (domain) => {
return co(function*() {
let brandInfo = yield api.getBrandLogoByDomainAsync(domain);
if (!brandInfo.data || brandInfo.code !== 200) {
return {};
}
let result = {};
if (brandInfo.data && brandInfo.code === 200) {
result.brandId = brandInfo.data.id || '';
result.node = brandInfo.data.static_content_code || false;
result.brandBanner = brandInfo.data.brand_banner || '';
result.brandNameEn = brandInfo.data.brand_name_en || '';
result.brandNameCn = brandInfo.data.brand_name_cn || '';
result.brandAbout = brandInfo.data.brand_intro || '';
result.shopTemplateType = brandInfo.data.shop_template_type ?
parseInt(brandInfo.data.shop_template_type) : '';
result.type = brandInfo.data.type ? +brandInfo.data.type : 0;
result.shopId = brandInfo.data.shop_id || '';
result.brandId = brandInfo.data.id || '';
result.node = brandInfo.data.static_content_code || false;
result.brandBanner = brandInfo.data.brand_banner || '';
result.brandNameEn = brandInfo.data.brand_name_en || '';
result.brandNameCn = brandInfo.data.brand_name_cn || '';
result.brandAbout = brandInfo.data.brand_intro || '';
result.shopTemplateType = brandInfo.data.shop_template_type ?
parseInt(brandInfo.data.shop_template_type) : '';
result.type = brandInfo.data.type ? +brandInfo.data.type : 0;
result.shopId = brandInfo.data.shop_id || '';
}
return result;
})();
};
... ...
... ... @@ -11,6 +11,7 @@ const log = require(`${library}/logger`);
const api = new API();
/**
* 获取评论
*/
... ...
... ... @@ -15,33 +15,38 @@ const api = require('./detail-comment-api');
const detailHelper = require('./detail-helper');
const fake = require('./fake');
module.exports.indexAsync = (pid, page, size) => {
return co(function *() {
let commentList = yield api.indexAsync(pid, page, size);
if (commentList.code && commentList.code === 200) {
return commentList.data.map(value => {
let item = {};
let avatar = detailHelper.DEFAULT_AVATAR_ICO;
if (value.head_ico) {
avatar = `${detailHelper.IMAGE_SERVICE_URL}${_.last(value.head_ico.split('headimg'))}`;
avatar = helpers.image(avatar, 30, 30);
}
item.avatar = avatar;
item.userName = value.nickname;
item.color = value.color_name;
item.size = value.size_name;
item.comment = value.content || '';
item.date = value.create_time;
item.total = value.total;
return item;
});
}
return fake.fakeComments;
//let commentList = yield api.indexAsync(pid, page, size);
//
//if (!commentList.code || !commentList.code !== 200) {
// return [];
//}
//return commentList.data.map(value => {
// let item = {};
//
// let avatar = detailHelper.DEFAULT_AVATAR_ICO;
//
// if (value.head_ico) {
// avatar = `${detailHelper.IMAGE_SERVICE_URL}${_.last(value.head_ico.split('headimg'))}`;
// avatar = helpers.image(avatar, 30, 30);
// }
//
// item.avatar = avatar;
// item.userName = value.nickname;
// item.color = value.color_name;
// item.size = value.size_name;
// item.comment = value.content || '';
// item.date = value.create_time;
// item.total = value.total;
//
// return item;
//});
return [];
})();
};
... ...
... ... @@ -15,7 +15,7 @@ const api = new API();
/**
* 咨询内容列表
*/
module.exports.indexAsync = function(uid, pid, page, size) {
module.exports.indexAsync = function (uid, pid, page, size) {
let param = {};
param.method = 'app.consult.li';
... ... @@ -34,7 +34,7 @@ module.exports.indexAsync = function(uid, pid, page, size) {
/**
* 添加咨询操作
*/
module.exports.createAsync = function(uid, pid, content) {
module.exports.createAsync = function (uid, pid, content) {
return api.post('', sign.apiSign({
method: 'h5.consult.add',
product_id: pid,
... ...
... ... @@ -10,28 +10,34 @@ const co = Promise.coroutine;
const api = require('./detail-consult-api');
const detailHelper = require('./detail-helper');
const fake = require('./fake');
module.exports.indexAsync = (uid, pid, page, size) => {
return co(function *() {
let consultList = yield api.indexAsync(uid, pid, page, size);
if (consultList.code && consultList.code === 200) {
return consultList.data.list.map(value => {
return {
avatar: detailHelper.DEFAULT_AVATAR_ICO,
question: value.ask,
date: value.ask_time,
answer: value.answer,
id: value.id,
isLike: value.is_like === 'Y',
like: parseInt(value.like, 10),
isUseful: value.is_useful === 'Y',
useful: parseInt(value.useful, 10),
total: value.total
};
});
}
return [];
return fake.fakeConsule;
//let consultList = yield api.indexAsync(uid, pid, page, size);
//
//if (!consultList.code || consultList.code !== 200) {
// return [];
//}
//
//return consultList.data.list.map(value => {
// return {
// avatar: detailHelper.DEFAULT_AVATAR_ICO,
// question: value.ask,
// date: value.ask_time,
// answer: value.answer,
// id: value.id,
// isLike: value.is_like === 'Y',
// like: parseInt(value.like, 10),
// isUseful: value.is_useful === 'Y',
// useful: parseInt(value.useful, 10),
// total: value.total
// };
//});
})();
};
... ...
... ... @@ -9,12 +9,15 @@ const log = require(`${library}/logger`);
const api = new API();
const fake = require('./fake');
/**
* 获取商品的热区
*/
module.exports.indexAsync = (pid) => {
return api.get('', sign.apiSign({
method: 'web.productCollocation.list',
product_id: pid
})).catch(log.error);
//return api.get('', sign.apiSign({
// method: 'web.productCollocation.list',
// product_id: pid
//})).catch(log.error);
return Promise.resolve(fake.fakeProductCollent);
};
... ...
... ... @@ -20,21 +20,21 @@ module.exports.indexAsync = (pid) => {
return co(function *() {
let data = yield api.indexAsync(pid);
if (!data.code && !(data.code === 200) && !data.data) {
if (!data.code || data.code !== 200) {
return [];
}
return data.data.reduce((result, area) => {
if (!area.infos) {
return result;
}
let item = {};
if (area.imageUrl) {
item.img = helpers.getForceSourceUrl(area.imageUrl);
}
if (!area.infos) {
return result;
}
item.list = area.infos.reduce((acc, cur, index) => {
if (!cur.product || !cur.product.goodsList) {
return acc;
... ...
... ... @@ -8,41 +8,53 @@ const log = require(`${library}/logger`);
const api = new API();
const fake = require('./fake');
module.exports.getProductBannerAsync = function(pid, clientType) {
clientType = clientType || 'web';
return api.get('', sign.apiSign({
method: 'web.productBanner.data',
product_id: pid,
client_type: clientType
})).catch(log.error);
//clientType = clientType || 'web';
//return api.get('', sign.apiSign({
// method: 'web.productBanner.data',
// product_id: pid,
// client_type: clientType
//})).catch(log.error);
return Promise.resolve(fake.fakeProductBanner);
};
module.exports.sizeInfoAsync = function(skn) {
return api.get('', sign.apiSign({
method: 'h5.product.intro',
productskn: skn
})).catch(log.error);
//return api.get('', sign.apiSign({
// method: 'h5.product.intro',
// productskn: skn
//})).catch(log.error);
return Promise.resolve(fake.fakeProductIntro);
};
module.exports.getProductComfortAsync = function(pid) {
return api.get('', sign.apiSign({
method: 'web.productComfort.data',
product_id: pid
})).catch(log.error);
//return api.get('', sign.apiSign({
// method: 'web.productComfort.data',
// product_id: pid
//})).catch(log.error);
return Promise.resolve(fake.fakeComfort);
};
module.exports.getProductModelCardAsync = function(pid) {
return api.get('', sign.apiSign({
method: 'web.productModelcard.list',
product_id: pid
})).catch(log.error);
//return api.get('', sign.apiSign({
// method: 'web.productModelcard.list',
// product_id: pid
//})).catch(log.error);
return Promise.resolve(fake.fakeModelCard);
};
module.exports.getProductModelTryAsync = function(skn) {
return api.get('', sign.apiSign({
method: 'web.productModelTry.data',
product_skn: skn
})).catch(log.error);
//return api.get('', sign.apiSign({
// method: 'web.productModelTry.data',
// product_skn: skn
//})).catch(log.error);
return Promise.resolve(fake.fakeModelTry);
};
/**
... ... @@ -51,10 +63,12 @@ module.exports.getProductModelTryAsync = function(skn) {
* @returns {Promise.<type>}
*/
module.exports.getProductInfo = function(pid) {
return api.get('', sign.apiSign({
method: 'h5.product.data',
productId: pid
})).catch(console.log);
//return api.get('', sign.apiSign({
// method: 'h5.product.data',
// productId: pid
//})).catch(console.log);
return Promise.resolve(fake.fakeProduct);
};
... ...
... ... @@ -27,6 +27,7 @@ const shopAPI = require('./shop-api');
const searchAPI = require('./search-api');
const homeService = require('./home-service');
const HeaderModel = require('../../../doraemon/models/header');
const fake = require('./fake');
const BLANK_STR = ' ';
... ... @@ -857,7 +858,7 @@ function getDescriptionDataBySizeInfo(sizeInfo) {
});
}
description.confort = getProductComfort();
description.comfort = getProductComfort();
}
return description;
... ... @@ -1279,7 +1280,10 @@ const getSizeInfo = (productSkn, maxSortId)=> {
result.size = getSizeData(sizeInfo);
// 模特数据
result.reference = getReferenceDataBySizeInfo(sizeInfo);
let reference = getReferenceDataBySizeInfo(sizeInfo);
if(_.isEmpty(reference)){
result.reference = reference;
}
// 洗涤材质
result.material = getMaterialDataBySizeInfo(sizeInfo);
... ...
This diff could not be displayed because it is too large.
... ... @@ -6,7 +6,11 @@ const log = require(`${library}/logger`);
const api = new API();
const fake = require('./fake');
module.exports.getSortByConditionAsync = function(condition) {
return api.get('sortgroup.json', condition).catch(log.error);
//return api.get('sortgroup.json', condition).catch(log.error);
return Promise.resolve(fake.fakeNav);
};
... ...
... ... @@ -15,6 +15,9 @@ const serviceApi = new ServiceAPI();
const log = require(`${global.library}/logger`);
const Promise = require('bluebird');
const fake = require('../../apps/product/models/fake');
/**
* 获取菜单
* @param undefined
... ... @@ -131,7 +134,6 @@ const getThirdNav = (data) => {
});
return thirdNav;
};
... ... @@ -168,8 +170,6 @@ const getSubNav = (data, type) => {
};
/**
* 处理接口返回的数据
* @param {object} 接口返回的对象
... ... @@ -191,7 +191,6 @@ const setHeaderData = (resData, type) => {
};
/**
* 请求头部数据
* @param {String} 频道类型
... ... @@ -205,7 +204,17 @@ exports.requestHeaderData = (type, parentId) => {
type = type || 'boys';
return serviceApi.get('operations/api/v6/category/getCategory', data, true).then(res => {
//return serviceApi.get('operations/api/v6/category/getCategory', data, true).then(res => {
// if (res && res.code === 200) {
// return setHeaderData(res.data, type);
// } else {
// log.error('获取头部信息的接口返回状态码 不是 200');
// return {};
// }
//});
return Promise.resolve(fake.fakeHeader).then(res => {
console.log(res);
if (res && res.code === 200) {
return setHeaderData(res.data, type);
} else {
... ...
{{# headerData}}
<div class="yoho-header {{headType}}">
<div class="tool-wrapper clearfix">
<div class="center-content">
<div class="yoho-group-map left">
<span class="icon-hamburger"></span>
<a href="http://www.yohobuy.com">YOHO!有货</a>
{{#if yohoGroup}}
<ul class="yoho-group-list">
{{# yohoGroup}}
<li>
<a href="{{link}}" class="yoho-group" data-en="{{en}}" data-cn="{{cn}}">{{en}}</a>
</li>
{{/ yohoGroup}}
</ul>
{{/if}}
</div>
<div class="yoho-buy-tools right">
<ul>
<li id="loginBox">
<span class="hi">Hi~</span>
[ <a href="http://www.yohobuy.com/signin.html" class="loginbar">请登录</a> ]
[ <a href="http://www.yohobuy.com/reg.html" class="registbar">免费注册</a> ]
</li>
<li class="myyoho" id="myYohoBox">
<span class="tag-seprate"></span>
<a href="http://www.yohobuy.com/home?t=1453340799.4986">MY有货</a>
<span class="icon-bottomarrow"></span>
<div class="simple-user-center"></div>
</li>
<li class="myorder">
<span class="tag-seprate"></span>
<span class="icon-papers"></span>
<a href="http://www.yohobuy.com/home/orders?t=1453168898.0176">我的订单</a>
</li>
<li class="mycollect">
<span class="tag-seprate"></span>
<span class="icon-heart"></span>
<a href="http://www.yohobuy.com/home/favorite?t=1453168898.0176">我的收藏</a>
</li>
<li class="message">
<span class="tag-seprate"></span>
<span class="icon-mail"></span>
<a href="http://www.yohobuy.com/home/message?t=1453168898.0176">消息</a>
</li>
<li class="phoneapp">
<span class="tag-seprate"></span>
<span class="icon-phone"></span>
<a href="http://www.yohobuy.com/download/app">手机版</a>
<div class="download-app-box">
<div class="qr-img"></div>
<h3 class="qr-words">扫描二维码</h3>
<h3 class="qr-words">下载有货手机客户端</h3>
<h3 class="qr-more">
<a href="http://www.yohobuy.com/download/app">更多客户端下载</a>
</h3>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="head-wrapper clearfix">
<div class="center-content">
<div class="outlets-logo"></div>
<div class="main-logo"><a href="http://www.yohobuy.com/" class="main-link"></a></div>
<ul class="main-nav-list">
{{# navbars}}
<li {{#if active}} class="cure"{{/if}}{{#if ico}} style="background: url({{image ico 54 32}}) no-repeat center center"{{/if}}>
{{#if ico}}
<a href="{{link}}" class="menu-ico"></a>
{{^}}
<h3 class="name-cn">
<a href="{{link}}">{{cn}}</a>
</h3>
<h3 class="name-en">
<a href="{{link}}">{{en}}</a>
</h3>
{{/if}}
</li>
{{/ navbars}}
</ul>
<div class="func-area">
<ul class="search-suggest"></ul>
<div class="search-2016">
<form action="http://search.yohobuy.com" method="get" id="search-form">
<input type="text" name="query" class="search-key" autocomplete="off">
<a class="search-btn"></a>
</form>
</div>
<div class="go-cart">
<a href="http://www.yohobuy.com/shopping/cart">
<span class="iconfont ">&#xe600;</span>
<span class="goods-num-tip">0</span>
</a>
<div class="mini-cart-wrapper">
<div class="loading-cart">
<h3>加载中,请稍后</h3>
</div>
<div class="empty-cart">
<h3>您的购物车暂无商品</h3>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="nav-wrapper clearfix">
<div class="center-content">
<ul class="sub-nav-list">
{{# subNav}}
<li{{#if thirdNav}} class="contain-third"{{/if}}>
<a href="{{link}}">{{name}}
{{#if isNew}}
<span class="newlogo"></span>
{{/if}}
</a>
{{#if thirdNav}}
<div class="third-nav-wrapper">
<div class="center-content">
<dl class="hide-list hide">
{{# thirdNav}}
<dt>
<h1 class=""><a href="{{link}}">{{title}}</a> </h1>
</dt>
{{#brandItems}}
<dd>
<a href="{{link}}"{{#if hot}} class="hot"{{/if}}>{{brandName}}</a>
</dd>
{{/brandItems}}
{{/thirdNav}}
</dl>
<div class="show-detail" data-code="{{imgCode}}">
<a><img src="data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw=="></a>
<a class="title">热门小物优选</a>
</div>
</div>
</div>
{{/if}}
</li>
{{/ subNav}}
</ul>
</div>
</div>
</div>
<div id="hide-template">
<script type="text/html" id="header-login-info-tpl">
<span>Hi~ <a href="\{{usercenter}}" class="nick-name">\{{nickname}}</a></span>
&nbsp;[ <a href="\{{signout}}">退出</a> ]
</script>
<script type="text/html" id="simple-account-info-tpl">
<div class="account-info-header">
<div class="user-img" >
<img src="\{{head_ico}}">
</div>
<div class="user-name">
<a href="http://www.yohobuy.com/home?t=\{{random}}">\{{profile_name}}</a>
</div>
<h3 class="user-level">
VIP: <span>\{{vip.curVipInfo.title}}</span>
</h3>
\{{#unless vip3}}
<div class="level-detail">
<div class="level-view-bar">
<div class="text-span">
\{{vip.curYearCost}}/\{{vip.nextVipInfo.needCost}}
</div>
<p class="\{{#if vip.curYearCostPer}}integrate\{{/if}}" style="width: \{{vip.curYearCostPer}}%;"></p>
</div>
<span>\{{vip.nextVipInfo.title}}</span>
</div>
\{{/unless}}
</div>
<ul class="account-info-content">
<li>
<a href="http://www.yohobuy.com/home/orders?t=\{{timestamp}}">待处理的订单</a>
<span class="right">\{{orderCount}}</span>
</li>
<li>
<a href="http://www.yohobuy.com/home/favorite?t=\{{timestamp}}">我的收藏</a>
<span class="right"></span>
</li>
<li>
<a href="http://www.yohobuy.com/home/coupons?t=\{{timestamp}}">我的优惠券</a>
<span class="right">\{{couponCount}}</span>
</li>
<li>
<a href="http://www.yohobuy.com/home/currency?t=\{{timestamp}}">我的YOHO币</a>
<span class="right">\{{YohocoinCount}}</span>
</li>
<li>
<a href="http://www.yohobuy.com/home/returns?t=\{{timestamp}}">我的退货换货</a>
<span class="right">\{{refundCount}}</span>
</li>
</ul>
<div class="account-info-footer">
<a href="http://www.yohobuy.com/home/user?t=\{{timestamp}}">完善资料</a>
</div>
</script>
<script type="text/html" id="mini-cart-tpl">
\{{#carData}}
<div class="rich-cart">
<div class="goods-list">
\{{# totalGoods}}
\{{#notzero buy_number}}
<div class="goods-item">
<div class="goods-img">
<a href="\{{product_url}}">
<img src="\{{default_img}}"/>
</a>
</div>
<div class="goods-info">
<p class="title">
<a href="\{{product_url}}">\{{product_name}}</a>
</p>
<p>
颜色:\{{color_name}}
尺码:\{{size_name}}
</p>
</div>
<div class="goods-price">
<p>\{{show_price}} x \{{buy_number}}</p>
<p>
<a href="javascript:void(0)" class="cart-goods-del" data-id=\{{goods_incart_id}} data-cheapest=\{{is_cheapest_free}}>删除</a>
</p>
</div>
</div>
\{{/notzero}}
\{{/ totalGoods}}
\{{#if has_promotion}}
<div class="activity-item">
<label class="activity-name">活动</label>
<h3 class="activity-content">
\{{#if fit_outlet_promotion }}
购outlet商品,满¥1999再享9折
\{{/if}}
\{{#if has_other_promotion}}
<span class="mycart_i_down" title="更多" ></span>
\{{/if}}
\{{#if has_first_promotion}}
\{{first_promotions.promotion_title}}
\{{/if}}
</h3>
</div>
\{{/if}}
\{{#if fit_free_shipping }}
<div class="activity-item">
<label class="activity-name">免运费</label>
<h3 class="activity-content">全场满 ¥\{{fit_free_shipping}}免运费</h3>
</div>
\{{/if}}
</div>
<div class="go-full-cart">
<div>
<a href="/shopping/cart">去购物车结算</a>
</div>
</div>
</div>
\{{/carData}}
</script>
</div>
<input id="api-domain" type="hidden" value="{{apiDomain}}">
{{/ headerData}}
{{# headerData}}
{{log this}}
<div class="yoho-header {{headType}}">
<div class="tool-wrapper clearfix">
<div class="center-content">
<div class="yoho-group-map left">
<span class="icon-hamburger"></span>
<a href="http://www.yohobuy.com">YOHO!有货</a>
{{#if yohoGroup}}
<ul class="yoho-group-list">
{{# yohoGroup}}
<li>
<a href="{{link}}" class="yoho-group" data-en="{{en}}" data-cn="{{cn}}">{{en}}</a>
</li>
{{/ yohoGroup}}
</ul>
{{/if}}
</div>
<div class="yoho-buy-tools right">
<ul>
<li id="loginBox">
<span class="hi">Hi~</span>
[ <a href="http://www.yohobuy.com/signin.html" class="loginbar">请登录</a> ]
[ <a href="http://www.yohobuy.com/reg.html" class="registbar">免费注册</a> ]
</li>
<li class="myyoho" id="myYohoBox">
<span class="tag-seprate"></span>
<a href="http://www.yohobuy.com/home?t=1453340799.4986">MY有货</a>
<span class="icon-bottomarrow"></span>
<div class="simple-user-center"></div>
</li>
<li class="myorder">
<span class="tag-seprate"></span>
<span class="icon-papers"></span>
<a href="http://www.yohobuy.com/home/orders?t=1453168898.0176">我的订单</a>
</li>
<li class="mycollect">
<span class="tag-seprate"></span>
<span class="icon-heart"></span>
<a href="http://www.yohobuy.com/home/favorite?t=1453168898.0176">我的收藏</a>
</li>
<li class="message">
<span class="tag-seprate"></span>
<span class="icon-mail"></span>
<a href="http://www.yohobuy.com/home/message?t=1453168898.0176">消息</a>
</li>
<li class="phoneapp">
<span class="tag-seprate"></span>
<span class="icon-phone"></span>
<a href="http://www.yohobuy.com/download/app">手机版</a>
<div class="download-app-box">
<div class="qr-img"></div>
<h3 class="qr-words">扫描二维码</h3>
<h3 class="qr-words">下载有货手机客户端</h3>
<h3 class="qr-more">
<a href="http://www.yohobuy.com/download/app">更多客户端下载</a>
</h3>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="head-wrapper clearfix">
<div class="center-content">
<div class="outlets-logo"></div>
<div class="main-logo"><a href="http://www.yohobuy.com/" class="main-link"></a></div>
<ul class="main-nav-list">
{{# navbars}}
<li {{#if active}} class="cure"{{/if}}{{#if ico}} style="background: url({{image ico 54 32}}) no-repeat center center"{{/if}}>
{{#if ico}}
<a href="{{link}}" class="menu-ico"></a>
{{^}}
<h3 class="name-cn">
<a href="{{link}}">{{cn}}</a>
</h3>
<h3 class="name-en">
<a href="{{link}}">{{en}}</a>
</h3>
{{/if}}
</li>
{{/ navbars}}
</ul>
<div class="func-area">
<ul class="search-suggest"></ul>
<div class="search-2016">
<form action="http://search.yohobuy.com" method="get" id="search-form">
<input type="text" name="query" class="search-key" autocomplete="off">
<a class="search-btn"></a>
</form>
</div>
<div class="go-cart">
<a href="http://www.yohobuy.com/shopping/cart">
<span class="iconfont ">&#xe600;</span>
<span class="goods-num-tip">0</span>
</a>
<div class="mini-cart-wrapper">
<div class="loading-cart">
<h3>加载中,请稍后</h3>
</div>
<div class="empty-cart">
<h3>您的购物车暂无商品</h3>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="nav-wrapper clearfix">
<div class="center-content">
<ul class="sub-nav-list">
{{# subNav}}
<li{{#if thirdNav}} class="contain-third"{{/if}}>
<a href="{{link}}">{{name}}
{{#if isNew}}
<span class="newlogo"></span>
{{/if}}
</a>
{{#if thirdNav}}
<div class="third-nav-wrapper">
<div class="center-content">
<dl class="hide-list hide">
{{# thirdNav}}
<dt>
<h1 class=""><a href="{{link}}">{{title}}</a> </h1>
</dt>
{{#brandItems}}
<dd>
<a href="{{link}}"{{#if hot}} class="hot"{{/if}}>{{brandName}}</a>
</dd>
{{/brandItems}}
{{/thirdNav}}
</dl>
<div class="show-detail" data-code="{{imgCode}}">
<a><img src="data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw=="></a>
<a class="title">热门小物优选</a>
</div>
</div>
</div>
{{/if}}
</li>
{{/ subNav}}
</ul>
</div>
</div>
</div>
<div id="hide-template">
<script type="text/html" id="header-login-info-tpl">
<span>Hi~ <a href="\{{usercenter}}" class="nick-name">\{{nickname}}</a></span>
&nbsp;[ <a href="\{{signout}}">退出</a> ]
</script>
<script type="text/html" id="simple-account-info-tpl">
<div class="account-info-header">
<div class="user-img" >
<img src="\{{head_ico}}">
</div>
<div class="user-name">
<a href="http://www.yohobuy.com/home?t=\{{random}}">\{{profile_name}}</a>
</div>
<h3 class="user-level">
VIP: <span>\{{vip.curVipInfo.title}}</span>
</h3>
\{{#unless vip3}}
<div class="level-detail">
<div class="level-view-bar">
<div class="text-span">
\{{vip.curYearCost}}/\{{vip.nextVipInfo.needCost}}
</div>
<p class="\{{#if vip.curYearCostPer}}integrate\{{/if}}" style="width: \{{vip.curYearCostPer}}%;"></p>
</div>
<span>\{{vip.nextVipInfo.title}}</span>
</div>
\{{/unless}}
</div>
<ul class="account-info-content">
<li>
<a href="http://www.yohobuy.com/home/orders?t=\{{timestamp}}">待处理的订单</a>
<span class="right">\{{orderCount}}</span>
</li>
<li>
<a href="http://www.yohobuy.com/home/favorite?t=\{{timestamp}}">我的收藏</a>
<span class="right"></span>
</li>
<li>
<a href="http://www.yohobuy.com/home/coupons?t=\{{timestamp}}">我的优惠券</a>
<span class="right">\{{couponCount}}</span>
</li>
<li>
<a href="http://www.yohobuy.com/home/currency?t=\{{timestamp}}">我的YOHO币</a>
<span class="right">\{{YohocoinCount}}</span>
</li>
<li>
<a href="http://www.yohobuy.com/home/returns?t=\{{timestamp}}">我的退货换货</a>
<span class="right">\{{refundCount}}</span>
</li>
</ul>
<div class="account-info-footer">
<a href="http://www.yohobuy.com/home/user?t=\{{timestamp}}">完善资料</a>
</div>
</script>
<script type="text/html" id="mini-cart-tpl">
\{{#carData}}
<div class="rich-cart">
<div class="goods-list">
\{{# totalGoods}}
\{{#notzero buy_number}}
<div class="goods-item">
<div class="goods-img">
<a href="\{{product_url}}">
<img src="\{{default_img}}"/>
</a>
</div>
<div class="goods-info">
<p class="title">
<a href="\{{product_url}}">\{{product_name}}</a>
</p>
<p>
颜色:\{{color_name}}
尺码:\{{size_name}}
</p>
</div>
<div class="goods-price">
<p>\{{show_price}} x \{{buy_number}}</p>
<p>
<a href="javascript:void(0)" class="cart-goods-del" data-id=\{{goods_incart_id}} data-cheapest=\{{is_cheapest_free}}>删除</a>
</p>
</div>
</div>
\{{/notzero}}
\{{/ totalGoods}}
\{{#if has_promotion}}
<div class="activity-item">
<label class="activity-name">活动</label>
<h3 class="activity-content">
\{{#if fit_outlet_promotion }}
购outlet商品,满¥1999再享9折
\{{/if}}
\{{#if has_other_promotion}}
<span class="mycart_i_down" title="更多" ></span>
\{{/if}}
\{{#if has_first_promotion}}
\{{first_promotions.promotion_title}}
\{{/if}}
</h3>
</div>
\{{/if}}
\{{#if fit_free_shipping }}
<div class="activity-item">
<label class="activity-name">免运费</label>
<h3 class="activity-content">全场满 ¥\{{fit_free_shipping}}免运费</h3>
</div>
\{{/if}}
</div>
<div class="go-full-cart">
<div>
<a href="/shopping/cart">去购物车结算</a>
</div>
</div>
</div>
\{{/carData}}
</script>
</div>
<input id="api-domain" type="hidden" value="{{apiDomain}}">
{{/ headerData}}
... ...