Authored by yyq

Merge branch 'release/1.0' of git.yoho.cn:fe/yoho-blk into release/1.0

... ... @@ -43,7 +43,7 @@
<form id="back-form" class="back-form" action="/passport/back/email" method="post">
<li class="clearfix">
<select id="area" class="country-list" name="region">
<select id="area" class="country-list" name="area">
{{#each region}}
<option {{#if selected}}selected="selected"{{/if}} value="{{areaCode}}">{{name}}</option>
{{/each}}
... ...
... ... @@ -27,6 +27,7 @@ const list = {
if (data.filter) {
retData.filter = DataHelper.filterHandle(data.filter, q);
retData.filter.showPrice = data.total > 10;
nav = _.concat(nav, retData.filter.nav);
}
... ... @@ -78,6 +79,7 @@ const list = {
if (data.filter) {
retData.filter = DataHelper.filterHandle(data.filter, q);
retData.filter.showPrice = data.total > 10;
}
retData.navPath = {
... ...
... ... @@ -24,7 +24,8 @@ const Query = {
let retData = {
module: 'product',
page: 'list',
title: '列表'
title: '列表',
query: query
};
Search.queryProduct(q).then(result => {
... ...
... ... @@ -120,6 +120,7 @@ const shop = {
if (ret.filter) {
delete q.brand;
data.filter = DataHelper.filterHandle(ret.filter, req.query);
data.filter.showPrice = ret.total > 10;
}
data.paginationData = {
... ...
... ... @@ -4,6 +4,8 @@
{{> path-nav}}
{{/ navPath}}
</div>
{{#if paginationData.total}}
<div class="center-content clearfix">
<div class="left">
{{!-- 筛选区域 --}}
... ... @@ -24,4 +26,8 @@
{{{ pagination paginationData }}}
</div>
</div>
{{^}}
{{> list/empty}}
{{/if}}
</div>
... ...
... ... @@ -5,6 +5,8 @@
{{> path-nav}}
{{/ navPath}}
</div>
{{#if paginationData.total}}
<div class="center-content clearfix">
<div class="left">
{{!-- 筛选区域 --}}
... ... @@ -15,7 +17,8 @@
<div class="right">
{{!-- 新品banner --}}
{{# banner}}
<div class="banner-img" style="height: 200px;margin-bottom:30px; background:url({{image src 850 200 2}}) no-repeat top center;"></div>
<div class="banner-img"
style="height: 200px;margin-bottom:30px; background:url({{image src 850 200 2}}) no-repeat top center;"></div>
{{/banner}}
{{!-- 已选中条件 --}}
{{#filter}}
... ... @@ -29,4 +32,7 @@
{{{ pagination paginationData }}}
</div>
</div>
{{^}}
{{> list/empty}}
{{/if}}
</div>
... ...
... ... @@ -9,6 +9,8 @@
{{> list/shop-menu }}
{{> list/banner-info }}
</div>
{{#if paginationData.total}}
<div class="center-content clearfix">
<div class="left">
{{!-- 筛选区域 --}}
... ... @@ -29,4 +31,7 @@
{{{ pagination paginationData }}}
</div>
</div>
{{^}}
{{> list/empty}}
{{/if}}
</div>
... ...
<div class="yoho-list-empty center-content">
<div class="tip-search">
<span class="iconfont">&#xe647;</span>
</div>
<p class="tip-cn">抱歉! 未找到{{#if query}}与"<span>{{query}}</span>"{{/if}}相关商品</p>
<p class="tip-en">Did not find the relevant goods</p>
<p class="tip-cn-sm">建议您: 看看输入的文字是否有误 / 减少分类条件限制 / 重新搜索</p>
</div>
... ...
... ... @@ -36,12 +36,12 @@ const index = (req, res, next) => {
result.data.printPriceRadio = [
{
value: '1',
name: '是',
checked: true
name: '是'
},
{
value: '0',
name: '否'
name: '否',
checked: true
}
];
... ...
No preview for this file type
... ... @@ -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 Tue Jul 19 15:52:03 2016
Created by FontForge 20120731 at Wed Jul 20 18:17:41 2016
By admin
</metadata>
<defs>
... ... @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Tue Jul 19 15:52:03 2016
bbox="0 -224 1303 896.303"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E645"
unicode-range="U+0078-E647"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
... ... @@ -239,5 +239,10 @@ q22 35 34.5 57t25.5 64t13 84q0 115 -74 196t-179 81zM841 356q-26 -40 -70 -89t-84.
q4 -14 17 -14t17 14q23 57 71.5 92t107.5 35q82 0 139.5 -63t57.5 -152q0 -46 -16 -83.5t-47 -86.5z" />
<glyph glyph-name="uniE645" unicode="&#xe645;"
d="M933 411h-394v394q0 11 -8 19t-19 8t-19 -8t-8 -19v-394h-394q-11 0 -19 -8t-8 -19t8 -19t19 -8h394v-394q0 -11 8 -19t19 -8t19 8t8 19v394h394q11 0 19 8t8 19t-8 19t-19 8z" />
<glyph glyph-name="uniE646" unicode="&#xe646;"
d="M922 812h-922l1024 -1024v922q0 42 -30 72t-72 30zM891 642l-236 -307q-6 -8 -15.5 -9t-16.5 5q-1 1 -1 2l-2 2l-98 106q-10 12 -10 28t10.5 27t25 11t24.5 -11q2 -2 4 -5l63 -99l217 283q6 8 15.5 9t16.5 -6t8 -17.5t-5 -18.5z" />
<glyph glyph-name="uniE647" unicode="&#xe647;"
d="M1024 -106l-230 231q83 88 111.5 203.5t-3 231t-118.5 202.5q-66 65 -150.5 99.5t-172.5 34.5q-89 0 -175 -34.5t-152 -99.5q-66 -66 -100 -152t-34 -173t34 -173t100 -152t151 -100t176 -34q85 0 166 31.5t147 92.5l231 -230zM157 134q-60 60 -92.5 138.5t-32.5 162.5
q0 174 125 304q60 60 138.5 92.5t165.5 32.5q174 0 304 -125q61 -61 93 -141t32 -161t-32 -161t-93 -142q-60 -60 -139 -92t-165.5 -32t-165 32t-138.5 92z" />
</font>
</defs></svg>
... ...
No preview for this file type
No preview for this file type
... ... @@ -83,12 +83,18 @@ function validatePhoneNumLocal() {
if (val !== '') {
if (/^[0-9]+$/.test(val)) {
if (phoneRegx[$regionCodeText.text()].test(val)) {
// 这里只做中国区验证
if ($regionCodeText.text() === '+86') {
if (val.length === 11 && phoneRegx['+86'.test(val)]) {
return true;
} else {
errTip($phone, '手机号码格式不正确,请重新输入');
errTip($phone, '手机号码不正确,请重新输入');
return false;
}
}
return true;
} else {
if (emailRegx.test(val)) {
return true;
... ...
... ... @@ -129,19 +129,25 @@ $phoneNumInput.on('blur', function() {
return;
}
if (length !== 11) {
errTip($phone, '手机号码格式不正确');
if (/^[0-9]+$/.test($phoneNumInput.val())) {
// 这里只做中国区验证
if ($regionCodeText.text() === '+86') {
if ($phoneNumInput.length === 11 && phoneRegx['+86'].test($phoneNumInput.val())) {
ep.emit('phoneNum', true);
return;
} else {
errTip($phone, '手机号码不正确,请重新输入');
ep.emit('phoneNum', false);
return;
}
if (!phoneRegx[$regionCodeText.text()].test($phoneNumInput.val())) {
errTip($phone, '手机号码格式不正确');
}
ep.emit('phoneNum', true);
return;
} else {
ep.emit('phoneNum', false);
return;
}
ep.emit('phoneNum', true);
});
$imgCaptchaInput.on('blur', function() {
... ...
... ... @@ -61,20 +61,18 @@ function validateAccountLocal() {
if (phoneNum !== '') {
if (/^[0-9]+$/.test(phoneNum)) {
// 不是11位
if (phoneNum.length !== 11) {
errTip($phone, '手机号码不正确,请重新输入');
return false;
}
// 如果是纯数字,则作为手机号码处理
if (regionCode !== '+86' ||
mailPhoneRegx.phoneRegx[regionCode].test(phoneNum)) {
// 这里只做中国区验证
if (regionCode === '+86') {
if (phoneNum.length === 11 && mailPhoneRegx.phoneRegx['+86'.test(phoneNum)]) {
return true;
} else {
errTip($phone, '手机号码不正确,请重新输入');
return false;
}
}
return true;
} else {
// 邮箱验证
... ...
... ... @@ -244,17 +244,23 @@ function validatePhoneNumLocal() {
regionCode = $regionCodeText.text();
if (length === 0) {
errTip($phone, '请输入手机号码');
return false;
} else if (length !== 11) {
errTip($phone, '手机号码格式不正确,请重新输入');
return false;
} else if (!/^[0-9]+$/.test(phoneNum) ||
(regionCode === '+86' && !regValidate.phoneRegx[regionCode].test(phoneNum))) {
errTip($phone, '手机号码格式不正确,请重新输入');
return false;
}
if (/^[0-9]+$/.test($phoneNumInput.val())) {
// 这里只做中国区验证
if (regionCode === '+86') {
if (phoneNum.length === 11 && regValidate.phoneRegx['+86'].test(phoneNum.val())) {
return true;
} else {
errTip($phone, '手机号码不正确,请重新输入');
return false;
}
}
return true;
} else {
return false;
}
}
... ...
... ... @@ -34,6 +34,8 @@ var $printPrice = $('#print-price');
var $invoice = $('#invoice-content');
require('yoho-jquery-dotdotdot');
require('../plugins/check'); // before 地址和发票
require('./order/address'); // 地址
... ... @@ -41,6 +43,11 @@ require('./order/invoice'); // 发票
lazyLoad($('img.lazy'));
// dot
$('.brand-and-name .name').dotdotdot({
wrap: 'letter'
});
// JIT拆单
$('.show-package').click(function() {
$('.package-list').toggleClass('hide');
... ...
... ... @@ -346,3 +346,41 @@
}
}
}
.yoho-list-empty {
height: 800px;
.tip-search {
margin-top: 100px;
text-align: center;
.iconfont {
font-size: 100px;
color: #666;
}
}
p {
text-align: center;
}
.tip-cn {
margin-top: 30px;
font-size: 18px;
font-weight: 700;
span {
color: #379ed6;
}
}
.tip-en {
margin-top: 15px;
font-size: 14px;
}
.tip-cn-sm {
margin-top: 20px;
}
}
... ...
... ... @@ -400,8 +400,10 @@
}
.name {
display: inline-block;
font-size: 14px;
line-height: 16px;
max-height: 32px;
}
> * {
... ...