From 866d30e76533ab99e446c0bc7e56ecdaaec11b2f Mon Sep 17 00:00:00 2001 From: AIsouler Date: Fri, 14 Jun 2024 12:43:35 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=8D=8E=E4=B8=BA=E5=A4=A9=E6=B0=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/com.huawei.android.totemweather.ts | 67 +++++++++++---------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/src/apps/com.huawei.android.totemweather.ts b/src/apps/com.huawei.android.totemweather.ts index cb183c7c..146bb623 100644 --- a/src/apps/com.huawei.android.totemweather.ts +++ b/src/apps/com.huawei.android.totemweather.ts @@ -25,9 +25,39 @@ export default defineGkdApp({ key: 1, name: '局部广告-卡片广告', quickFind: true, + rules: [ + { + key: 2, + activityIds: [ + 'com.huawei.android.totemweather.WeatherMainActivity', + 'com.huawei.android.totemweather.WeatherHome', + ], + matches: + '[id="com.huawei.android.totemweather:id/ad_cancel"][visibleToUser=true]', + snapshotUrls: [ + 'https://i.gkd.li/i/13521221', + 'https://i.gkd.li/i/13787501', + ], + }, + ], + }, + { + key: 2, + name: '分段广告-卡片广告', + quickFind: true, rules: [ { key: 0, + activityIds: 'com.huawei.android.totemweather.WeatherMainActivity', + matches: '[vid="rl_close_pps"][visibleToUser=true]', + snapshotUrls: [ + 'https://i.gkd.li/i/13800100', + 'https://i.gkd.li/i/14278462', // 使用visibleToUser=true防止在此页面误触 + 'https://i.gkd.li/i/15831584', + ], + }, + { + key: 1, activityIds: 'com.huawei.android.totemweather.composite.MarketCompositeActivity', matches: @@ -35,40 +65,13 @@ export default defineGkdApp({ snapshotUrls: 'https://i.gkd.li/i/13218197', }, { - preKeys: 0, - key: 1, + preKeys: [0, 1], + key: 99, activityIds: 'com.huawei.openalliance.ad.activity.FeedbackActivity', - matches: - '[id="com.huawei.android.totemweather:id/feedback_negative_flv"] > [text="直接关闭"]', - snapshotUrls: 'https://i.gkd.li/i/13259434', - }, - { - key: 2, - activityIds: 'com.huawei.android.totemweather.WeatherMainActivity', - matches: - '[id="com.huawei.android.totemweather:id/ad_cancel"][visibleToUser=true]', - snapshotUrls: 'https://i.gkd.li/i/13521221', - }, - { - key: 3, - activityIds: 'com.huawei.android.totemweather.WeatherHome', - matches: '[id="com.huawei.android.totemweather:id/ad_cancel"]', - snapshotUrls: 'https://i.gkd.li/i/13787501', - }, - ], - }, - { - key: 2, - name: '局部广告-顶部卡片广告', - rules: [ - { - key: 0, - quickFind: true, - activityIds: 'com.huawei.android.totemweather.WeatherMainActivity', - matches: '@ImageView[visibleToUser=true] < [vid="rl_close_pps"]', + matches: '[text="直接关闭"]', snapshotUrls: [ - 'https://i.gkd.li/i/13800100', - 'https://i.gkd.li/i/14278462', // 使用visibleToUser=true防止在此页面误触 + 'https://i.gkd.li/i/13259434', + 'https://i.gkd.li/i/15831539', ], }, ],