Authored by 姜枫

fix bugs

... ... @@ -70,13 +70,16 @@ const index = (req, res) => {
}
];
data.qid = id;
if (!(typeof (getNav(id)) === 'undefined')) {
nav = nav.concat(getNav(id));
}
res.display('detail', {
module: 'help',
page: 'help',
content: Object.assign({nav}, data)
content: Object.assign({nav}, data),
qid: id
});
};
... ...
<ul class="nav">
{{#each menuData}}
{{#if subsets}}
<li class="big-category cateId-{{id}} subsets">
<li class="big-category cateId-{{id}} subsets {{#isEqual id @root.qid}}selected{{/isEqual}}">
<div class="plus inline-block"></div>{{text}}</li>
{{#each subsets}}
<li class="smll-category cateId-{{id}} parentId-{{parendId}}">
<li class="smll-category cateId-{{id}} parentId-{{parendId}} {{#isEqual id @root.qid}}selected{{/isEqual}}">
<span class="mult"></span>
<a href="/help?id={{id}}">{{text}}</a>
</li>
{{/each}}
{{else}}
<li class="big-category cateId-{{id}}">
<li class="big-category cateId-{{id}} {{#isEqual id @root.qid}}selected{{/isEqual}}">
<span class="mult"></span>
<a href="/help?id={{id}}">{{text}}</a>
</li>
... ...
... ... @@ -63,6 +63,7 @@ const shop = {
_.forEach(editorial, (e) => {
e.title = e.title.length > 40 ? (e.title.substring(0, 40) + '...') : e.title;
e.url = `/editorial/${e.id}.html`;
});
if (productData && productData.code === 200 && productData.data) {
... ...
... ... @@ -181,10 +181,11 @@ const helpers = {
});
}
if (s.sub && misort) {
s.sub.forEach(m => {
s.sub.forEach((m) => {
if (m.categoryId === misort) {
sortQuery += '&misort=' + misort;
m.checked = true;
nav.push({
link: sortQuery,
pathTitle: '',
... ... @@ -195,6 +196,11 @@ const helpers = {
}
});
}
// 最后一个不可点击
if (nav.length > 0) {
nav[nav.length - 1].link = '';
}
return nav;
},
... ...
... ... @@ -22,8 +22,8 @@ module.exports = {
},
cookieDomain: 'yohoblk.com',
domains: {
api: 'http://testapi.yoho.cn:28078/', // devapi.yoho.cn:58078 testapi.yoho.cn:28078 devapi.yoho.cn:58078
service: 'http://testservice.yoho.cn:28077/', // testservice.yoho.cn:28077 devservice.yoho.cn:58077
api: 'http://api-test1.yohops.com:9999/',
service: 'http://service-test1.yohops.com:9999/',
search: 'http://192.168.102.216:8080/yohosearch/'
},
useOneapm: false,
... ...
... ... @@ -20,6 +20,11 @@ var YohoListPage = {
require('../../common/return-top');
require('../../common/header');
lazyload();
if (query.query) {
$('#search-key').val(query.query);
}
$('.nano').nanoScroller({disableResize: true});
$('.yoho-ui-accordion', this.rootDoc).each(function() {
var opts = {
... ...
... ... @@ -37,6 +37,10 @@
}
}
li.selected > a{
color: #379ed6;
}
.smll-category {
display: none;
}
... ...