Authored by yyq

处理品牌id中的-

... ... @@ -342,7 +342,7 @@ class FilterTools {
_.each(filter.brand, brand => {
brands.push({
name: brand.brand_name,
href: href.replace('${brand}', brand.id),
href: href.replace('${brand}', _.replace(brand.id, '-', '__')), // 替换全球购品牌id中-
checked: _.some(brandids, bid => _.parseInt(bid) === brand.id)
});
if (brands.length >= 10) {
... ...
... ... @@ -98,7 +98,7 @@ function uriLoc(attr, val, uri) {
newHref;
if (staticPage && uri) {
newHref = uri.replace('{seat}', val);
newHref = uri.replace('{seat}', (val + '').replace('-', '__'));
} else {
qs[attr] = val;
delete qs.page;
... ... @@ -115,7 +115,7 @@ function replceStaticUrl(list, uri) {
if (staticPage && uri) {
for (i = 0; i < list.length; i++) {
list[i].href = uri.replace('{seat}', list[i].id);
list[i].href = uri.replace('{seat}', (list[i].id + '').replace('-', '__'));
}
}
... ...
... ... @@ -72,7 +72,7 @@ const minPathToFullParam = (path) => {
let fullKey = minToFullMap[minKey];
if (fullKey) {
obj[fullKey] = _.replace(_.replace(splitValue, minKey, ''), '__', '-');
obj[fullKey] = _.replace(_.replace(splitValue, minKey, ''), '__', '-'); // 替换value中__
}
});
... ... @@ -97,7 +97,7 @@ const fullParamToMinPath = (uri, params, newObj, delObj = {}) => {
_.forEach(transformKey(obj, true), (value, key) => {
if (value) {
pathArr.push(`${key}${ _.replace(value, '-', '__')}`);
pathArr.push(`${key}${_.replace(value, '-', '__')}`); // 替换value中-
}
});
... ...