...
|
...
|
@@ -96,11 +96,10 @@ const defaultTitleMap = { |
|
|
}
|
|
|
};
|
|
|
|
|
|
const matchHeader = (url, titleMap) => {
|
|
|
const matchHeader = (path, qs, titleMap) => {
|
|
|
let header = {
|
|
|
headerid: '-1'
|
|
|
};
|
|
|
let path = url.split('?')[0];
|
|
|
|
|
|
if (/\/cate-all$/.test(path)) {
|
|
|
header = titleMap[1];
|
...
|
...
|
@@ -116,16 +115,14 @@ const matchHeader = (url, titleMap) => { |
|
|
|
|
|
if (/\/me\/order$/.test(path)) {
|
|
|
let des = '';
|
|
|
let u = url.split('?')[1];
|
|
|
|
|
|
u = parse(u);
|
|
|
if (u.type === '1') {
|
|
|
if (qs.type === '1') {
|
|
|
des = '我的订单';
|
|
|
} else if (u.type === '2') {
|
|
|
} else if (qs.type === '2') {
|
|
|
des = '待付款';
|
|
|
} else if (u.type === '3') {
|
|
|
} else if (qs.type === '3') {
|
|
|
des = '待发货';
|
|
|
} else if (u.type === '4') {
|
|
|
} else if (qs.type === '4') {
|
|
|
des = '待收货';
|
|
|
}
|
|
|
header = titleMap[1];
|
...
|
...
|
@@ -183,11 +180,8 @@ const matchHeader = (url, titleMap) => { |
|
|
}
|
|
|
|
|
|
if (/\/me\/help-detail$/.test(path)) {
|
|
|
let u = url.split('?')[1];
|
|
|
|
|
|
u = parse(u);
|
|
|
header = titleMap[1];
|
|
|
header.title.des = u.title; // 帮助中心详细
|
|
|
header.title.des = qs.title; // 帮助中心详细
|
|
|
return header;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -267,7 +261,7 @@ const intercept = (url) => { |
|
|
}
|
|
|
|
|
|
yoho.goNewPage({
|
|
|
header: matchHeader(url, titleMap),
|
|
|
header: matchHeader(path, qs, titleMap),
|
|
|
url: /^(https?:)?\/\//i.test(url) ? url : origin + url
|
|
|
});
|
|
|
} else {
|
...
|
...
|
|