From 07b65a0ca8b6b52fb1cd05bc5829bca06208b441 Mon Sep 17 00:00:00 2001
From: Zhao Zuohong <34163622+ZhaoZuohong@users.noreply.github.com>
Date: Tue, 19 Dec 2023 22:40:59 +0800
Subject: [PATCH] =?UTF-8?q?Revert=20"add:=E5=8F=91=E9=80=81=E5=9F=BA?=
=?UTF-8?q?=E6=8A=A5=E8=87=B3=E9=82=AE=E4=BB=B6"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
arknights_mower/__main__.py | 2 +-
arknights_mower/command.py | 4 +--
arknights_mower/templates/conf.yml | 1 -
.../templates/email/report_template.html | 25 -------------------
arknights_mower/utils/digit_reader.py | 2 ++
arknights_mower/utils/email.py | 1 -
ui/src/components/DailyMission.vue | 7 +-----
ui/src/stores/config.js | 4 ---
8 files changed, 6 insertions(+), 40 deletions(-)
delete mode 100644 arknights_mower/templates/email/report_template.html
diff --git a/arknights_mower/__main__.py b/arknights_mower/__main__.py
index bd2509e01..cfa34f2ff 100644
--- a/arknights_mower/__main__.py
+++ b/arknights_mower/__main__.py
@@ -358,7 +358,7 @@ def simulate():
if sleep_time > 540:
# 刷新时间以鹰历为准
if base_scheduler.daily_report < (datetime.now() - timedelta(hours=4)).date():
- if base_scheduler.report_plan_solver(conf["send_report"]):
+ if base_scheduler.report_plan_solver():
base_scheduler.daily_report = (datetime.now() - timedelta(hours=4)).date()
if base_scheduler.skland_config['skland_enable'] and base_scheduler.daily_skland < (
diff --git a/arknights_mower/command.py b/arknights_mower/command.py
index 324aeb749..d28f41c55 100644
--- a/arknights_mower/command.py
+++ b/arknights_mower/command.py
@@ -101,8 +101,8 @@ def recruit(args: list[str] = [], send_message_config={}, recruit_config={}, dev
return choose, result
-def daily_report(device: Device = None,send_message_config={},send_report:bool=False):
- return ReportSolver(device,None,send_message_config,send_report).run()
+def daily_report(device: Device = None):
+ return ReportSolver(device).run()
def mission(args: list[str] = [], device: Device = None):
diff --git a/arknights_mower/templates/conf.yml b/arknights_mower/templates/conf.yml
index dfb333344..9ea9a6399 100644
--- a/arknights_mower/templates/conf.yml
+++ b/arknights_mower/templates/conf.yml
@@ -13,7 +13,6 @@ free_blacklist: ''
ling_xi: 1
check_mail_enable: true
report_enable: true
-send_report: true
maa_adb_path: D:\Program Files\Nox\bin\adb.exe
maa_enable: 0
maa_rg_enable: 0
diff --git a/arknights_mower/templates/email/report_template.html b/arknights_mower/templates/email/report_template.html
deleted file mode 100644
index e8031285d..000000000
--- a/arknights_mower/templates/email/report_template.html
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
- 基建报告
-
-
-
-
- 赤金 | {{ report_data['赤金'] }} |
- 龙门币订单 | {{ report_data['龙门币订单'] }} |
- 龙门币订单数 | {{ report_data['龙门币订单数'] }} |
- 作战录像 | {{ report_data['作战录像'] }} |
- 合成玉 | {{ report_data['合成玉'] }} |
-
-
-
diff --git a/arknights_mower/utils/digit_reader.py b/arknights_mower/utils/digit_reader.py
index 3fd722622..9ac135adb 100644
--- a/arknights_mower/utils/digit_reader.py
+++ b/arknights_mower/utils/digit_reader.py
@@ -130,6 +130,8 @@ def get_report_number_white(self, digit_part):
)
threshold = 0.93
+ min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(res)
+ print(j, max_val)
loc = np.where(res >= threshold)
for i in range(len(loc[0])):
x = loc[1][i]
diff --git a/arknights_mower/utils/email.py b/arknights_mower/utils/email.py
index 2a88064cc..f87009e27 100644
--- a/arknights_mower/utils/email.py
+++ b/arknights_mower/utils/email.py
@@ -28,4 +28,3 @@
maa_template = env.get_template("maa.html")
recruit_template = env.get_template("recruit_template.html")
recruit_rarity = env.get_template("recruit_rarity.html")
-report_template = env.get_template("report_template.html")
diff --git a/ui/src/components/DailyMission.vue b/ui/src/components/DailyMission.vue
index 4ae6201e1..e79ed5690 100644
--- a/ui/src/components/DailyMission.vue
+++ b/ui/src/components/DailyMission.vue
@@ -3,7 +3,7 @@ import { storeToRefs } from 'pinia'
import { useConfigStore } from '@/stores/config'
const store = useConfigStore()
-const { check_mail_enable, report_enable, send_report } = storeToRefs(store)
+const { check_mail_enable, report_enable } = storeToRefs(store)
@@ -19,10 +19,5 @@ const { check_mail_enable, report_enable, send_report } = storeToRefs(store)
读取基报 {{ report_enable ? '开启' : '关闭' }}
-
-
- 发送至邮件 {{ send_report ? '开启' : '关闭' }}
-
-
diff --git a/ui/src/stores/config.js b/ui/src/stores/config.js
index 85390cfa1..77fd1042e 100644
--- a/ui/src/stores/config.js
+++ b/ui/src/stores/config.js
@@ -62,7 +62,6 @@ export const useConfigStore = defineStore('config', () => {
const sendKey = ref('') // Server酱Key值
const check_mail_enable = ref(true)
const report_enable = ref(true)
- const send_report = ref(true)
const recruit_gap = ref(false)
const recruit_auto_5 = ref('hand')
const webview = ref({})
@@ -146,7 +145,6 @@ export const useConfigStore = defineStore('config', () => {
sendKey.value = response.data.sendKey
check_mail_enable.value = response.data.check_mail_enable
report_enable.value = response.data.report_enable
- send_report.value = response.data.send_report
recruit_gap.value = response.data.recruit_gap
recruit_auto_5.value = response.data.recruit_auto_5
webview.value = response.data.webview
@@ -219,7 +217,6 @@ export const useConfigStore = defineStore('config', () => {
sendKey: sendKey.value,
check_mail_enable: check_mail_enable.value,
report_enable: report_enable.value,
- send_report: send_report.value,
recruit_gap: recruit_gap.value,
recruit_auto_5: recruit_auto_5.value,
webview: webview.value,
@@ -298,7 +295,6 @@ export const useConfigStore = defineStore('config', () => {
sendKey,
check_mail_enable,
report_enable,
- send_report,
recruit_gap,
recruit_auto_5,
webview,