Authored by 徐炜

Merge remote-tracking branch 'origin/release/2.0' into release/2.0

... ... @@ -43,7 +43,8 @@ const detail = (req, res, next) => {
id: parseInt(q.id || 1, 10),
contId: +req.query.contId || 0,
keywords: req.query.helpQuery,
url: req.originalUrl
url: req.originalUrl,
page: q.page || 1
};
let nav = [
... ...
... ... @@ -53,10 +53,12 @@ const helpSearch = (params) => {
});
};
const allQA = () => {
const allQA = (page) => {
return api.get('', {
method: 'app.helper.allQA',
showPlatform: 'yohobuy_pc'
showPlatform: 'yohobuy_pc',
page: page,
viewNum: 15
}, {
code: 200
});
... ...
... ... @@ -231,7 +231,17 @@ const _processDetailData = (result, params) => {
id: 1,
commonProblem: true,
faqs: data.faqs,
allQa: _.get(result, '[2].data', [])
allQa: _.get(result, '[2].data.list', []),
paginationData: {
page: _.get(result, '[2].data.page', 1),
limit: _.get(result, '[2].data.page_size', 15),
total: _.get(result, '[2].data.total', 15),
pageTotal: _.get(result, '[2].data.page_total', 15),
queryParams: {
id: params.id,
page: params.page
}
}
};
}
}
... ... @@ -299,7 +309,7 @@ const detailData = (params) => {
];
if (params.id === 1 && !params.keywords) {
promiseData.push(helpApi.allQA());
promiseData.push(helpApi.allQA(params.page));
}
return Promise.all(promiseData).then(result => {
... ...
... ... @@ -14,6 +14,9 @@
</li>
{{/allQa}}
</ul>
{{!-- 分页 --}}
{{{ pagination paginationData }}}
</div>
... ...
... ... @@ -181,7 +181,7 @@ $searchKey.keyup(function(e) {
}
});
function searchSuggest(key) {
function searchSuggest(key) {
$.get('//www.yohoblk.com/product/query/suggest', {
keyword: key
}, function(data) {
... ... @@ -191,9 +191,9 @@ $searchKey.keyup(function(e) {
$searchHint.hide();
}
});
}
}
$searchKey.keyup(function(e) {
$searchKey.keyup(function(e) {
var val = $.trim($(this).val()),
$child = $searchHint.find('li'),
$act = $searchHint.find('.action'),
... ... @@ -234,7 +234,7 @@ $searchKey.keyup(function(e) {
} else {
$clearInput.hide();
}
});
});
// ie8输入框提示特殊处理
// 应产品要求所有浏览器获得焦点提示文字隐藏
... ...
... ... @@ -18,7 +18,8 @@ $(function() {
$('.help-nav li').each(function(key, item) {
if (key % 3 === 0) {
$(item).css({
marginLeft: 0
marginLeft: 0,
clear: 'both'
});
}
});
... ... @@ -26,7 +27,8 @@ $(function() {
$('.new-guide li').each(function(key, item) {
if (key % 5 === 0) {
$(item).css({
marginLeft: 0
marginLeft: 0,
clear: 'both'
});
}
});
... ... @@ -34,7 +36,8 @@ $(function() {
$('.self-service li').each(function(key, item) {
if (key % 6 === 0) {
$(item).css({
marginLeft: 0
marginLeft: 0,
clear: 'both'
});
}
});
... ...
... ... @@ -224,6 +224,11 @@
}
}
.all-problem {
height: auto;
overflow: hidden;
}
.help-detail {
h2 {
font-size: 18px;
... ...
... ... @@ -142,8 +142,6 @@
li {
float: left;
margin-top: 20px;
height: 120px;
overflow: hidden;
&:first-child {
margin-left: 0;
... ...