mirror of
https://github.com/fmz200/wool_scripts.git
synced 2025-12-19 13:41:18 +08:00
Initial commit: new history
This commit is contained in:
17
Scripts/tongcheng/tongcheng.js
Normal file
17
Scripts/tongcheng/tongcheng.js
Normal file
@ -0,0 +1,17 @@
|
||||
let body = JSON.parse($response.body);
|
||||
|
||||
// 删除轮播图
|
||||
if (body.hasOwnProperty('data')) {
|
||||
delete body.data.banner;
|
||||
}
|
||||
|
||||
// 定义需要过滤的导航项
|
||||
const iconsToExclude = ["汽车票优惠", "特惠酒店", "顺风车", "特惠机票"];
|
||||
|
||||
// 优化下方导航栏的过滤操作
|
||||
if (Array.isArray(body.data.icon)) {
|
||||
body.data.icon = body.data.icon.filter(item => !iconsToExclude.includes(item.name));
|
||||
}
|
||||
|
||||
let newBody = JSON.stringify(body);
|
||||
$done({ body: newBody });
|
||||
Reference in New Issue
Block a user