Authored by xuqi

添加查询无数据后的提示

... ... @@ -156,8 +156,13 @@ exports.init = function() {
$container = $svc;
break;
}
for (i = 0; i < len; i++) {
html += Mustache.render(tpl, goods[i]);
if (len === 0) {
//无返回数据
html = '<p class="search-tip">未找到相关搜索结果</p>';
} else {
for (i = 0; i < len; i++) {
html += Mustache.render(tpl, goods[i]);
}
}
if (nav.reload) {
$container.html(html);
... ...
... ... @@ -214,4 +214,12 @@ body {
.sub-classify li.chosed .chosed-icon {
display: inline-block;
}
.search-tip {
color: #ccc;
text-align: center;
vertical-align: middle;
font-size: 28rem / $pxConvertRem;
margin-top: 5.5rem;
}
\ No newline at end of file
... ...