#!name=叮咚买菜
#!desc=某些APP要清除缓存或者重新安装拦截广告才会生效！
#!author=奶思
#!category=奶思的模块
#!homepage=https://github.com/fmz200/wool_scripts
#!raw-url=https://github.com/fmz200/wool_scripts/raw/main/Surge/module/split/partD/DingDongMaiCai.sgmodule
#!tg-channel=https://t.me/inaisi
#!arguments=ddmc_enable:true

[Rule]
DOMAIN,trackercollect.ddxq.mobi,REJECT
DOMAIN,ddfs-public.ddimg.mobi,REJECT
DOMAIN,rttrack.ddxq.mobi,REJECT

[URL Rewrite]
# 开屏广告
^https?:\/\/maicai\.api\.ddxq\.mobi\/advert\/ - reject
# 首页弹窗
^https?:\/\/maicai\.api\.ddxq\.mobi\/homeApi\/getHomeAdPop - reject
# 我的页VIP栏净化
^https?:\/\/gw\.api\.ddxq\.mobi\/vip-app-service\/vip\/my\/page\/advertising - reject

[Body Rewrite]
http-response ^https?:\/\/maicai\.api\.ddxq\.mobi\/homeApi\/newDetails suspension fmz200

[Map Local]
# VIP开通弹窗
^https?:\/\/maicai\.api\.ddxq\.mobi\/vip\/getVipAd data-type=text data="{}" status-code=200 header="Content-Type:application/json"

# 我的页弹窗(暂未启用)
^https:\/\/maicai\.api\.ddxq\.mobi\/homeApi\/queryMyPagePopup data-type=text data="{}" status-code=200 header="Content-Type:application/json"

# 我的页-猜你喜欢
^https?:\/\/maicai\.api\.ddxq\.mobi\/homeApi\/userLike data-type=text data="{}" status-code=200 header="Content-Type:application/json"

# 购物车顶部VIP横条
^https?:\/\/maicai\.api\.ddxq\.mobi\/cart\/vipGuide data-type=text data="{}" status-code=200 header="Content-Type:application/json"

# 购物车-猜你喜欢
^https?:\/\/maicai\.api\.ddxq\.mobi\/order\/getRecommend data-type=text data="{}" status-code=200 header="Content-Type:application/json"

[Script]
# 开屏广告及首页推荐流及底部状态栏优化
叮咚买菜 = type=http-response, pattern=^https?:\/\/maicai\.api\.ddxq\.mobi\/homeApi\/(?>bottomNavi|homeFlowDetail), script-path=https://raw.githubusercontent.com/zirawell/R-Store/main/Res/Scripts/AntiAd/ddxq.js, requires-body=true, timeout=60

# 右下角AI
叮咚买菜 = type=http-response, pattern=^https?:\/\/maicai\.api\.ddxq\.mobi\/tool\/getConfig, script-path=https://raw.githubusercontent.com/zirawell/R-Store/main/Res/Scripts/AntiAd/ddxq.js, requires-body=true, timeout=60

# 我的页净化
叮咚买菜 = type=http-response, pattern=^https?:\/\/user\.api\.ddxq\.mobi\/userportal-service\/api\/v\d\/user\/queryMyPage, script-path=https://raw.githubusercontent.com/zirawell/R-Store/main/Res/Scripts/AntiAd/ddxq.js, requires-body=true, timeout=60

[MITM]
hostname = %APPEND% maicai.api.ddxq.mobi, gw.api.ddxq.mobi, user.api.ddxq.mobi

