|
@@ -42,7 +42,7 @@ function parseRoute(url) {
|
|
|
parts.pop();
|
|
|
}
|
|
|
|
|
|
- let all_route, last_route;
|
|
|
+ let all_route, last_route, other_route;
|
|
|
|
|
|
// 如果路径以 xiangcunshangcheng 开头
|
|
|
// if (parts[0] === "xiangcunshangcheng") {
|
|
@@ -70,11 +70,13 @@ function parseRoute(url) {
|
|
|
|
|
|
all_route = parts.join('/');
|
|
|
last_route = parts.length > 0 ? parts[parts.length - 1] : null;
|
|
|
+ other_route = parts[0]
|
|
|
|
|
|
// 返回结果(只有数字.html 时才包含 id)
|
|
|
const result = {
|
|
|
all_route,
|
|
|
- last_route
|
|
|
+ last_route,
|
|
|
+ other_route,
|
|
|
};
|
|
|
if (id !== undefined) {
|
|
|
result.id = id;
|
|
@@ -93,13 +95,13 @@ function getRouteWhiteList(path) {
|
|
|
const parts = path.split('/').filter(Boolean); // 分割并过滤空字符串
|
|
|
console.log(parts[0])
|
|
|
let whiteList = [
|
|
|
- "404",
|
|
|
- "search",//搜索页
|
|
|
- "xiangcunshangcheng",//乡村商城搜索页
|
|
|
- "topic",//商圈
|
|
|
- "advertising",//广告
|
|
|
- "about",//关于我们
|
|
|
- "shukanyinxiang",//书刊音像
|
|
|
+ // "404",
|
|
|
+ // "search",//搜索页
|
|
|
+ // "xiangcunshangcheng",//乡村商城搜索页
|
|
|
+ // "topic",//商圈
|
|
|
+ // "advertising",//广告
|
|
|
+ // "about",//关于我们
|
|
|
+ // "shukanyinxiang",//书刊音像
|
|
|
]
|
|
|
|
|
|
if (whiteList.includes(parts[0])) {
|