From cef8481995d836e2ee731ddeb41275d5a3ff3ed6 Mon Sep 17 00:00:00 2001 From: Zhao Zuohong Date: Mon, 2 Oct 2023 22:21:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.py | 100 +++++++++++++++++------------------ ui/components.d.ts | 1 + ui/src/components/SKLand.vue | 3 -- ui/src/pages/Settings.vue | 5 -- 4 files changed, 51 insertions(+), 58 deletions(-) diff --git a/server.py b/server.py index 2e91744d3..6d10320b9 100755 --- a/server.py +++ b/server.py @@ -99,27 +99,27 @@ def load_plan_from_json(): def operator_list(): if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"): with open( - os.path.join( - sys._MEIPASS, - "arknights_mower", - "__init__", - "data", - "agent.json", - ), - "r", - encoding="utf8", + os.path.join( + sys._MEIPASS, + "arknights_mower", + "__init__", + "data", + "agent.json", + ), + "r", + encoding="utf8", ) as f: return json.load(f) else: with open( - os.path.join( - os.getcwd(), - "arknights_mower", - "data", - "agent.json", - ), - "r", - encoding="utf8", + os.path.join( + os.getcwd(), + "arknights_mower", + "data", + "agent.json", + ), + "r", + encoding="utf8", ) as f: return json.load(f) @@ -128,27 +128,27 @@ def operator_list(): def shop_list(): if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"): with open( - os.path.join( - sys._MEIPASS, - "arknights_mower", - "__init__", - "data", - "shop.json", - ), - "r", - encoding="utf8", + os.path.join( + sys._MEIPASS, + "arknights_mower", + "__init__", + "data", + "shop.json", + ), + "r", + encoding="utf8", ) as f: return json.load(f) else: with open( - os.path.join( - os.getcwd(), - "arknights_mower", - "data", - "shop.json", - ), - "r", - encoding="utf8", + os.path.join( + os.getcwd(), + "arknights_mower", + "data", + "shop.json", + ), + "r", + encoding="utf8", ) as f: return json.load(f) @@ -293,9 +293,9 @@ def get_maa_adb_version(): def get_maa_conn_presets(): try: with open( - os.path.join(conf["maa_path"], "resource", "config.json"), - "r", - encoding="utf-8", + os.path.join(conf["maa_path"], "resource", "config.json"), + "r", + encoding="utf-8", ) as f: presets = [i["configName"] for i in json.load(f)["connection"]] except: @@ -327,29 +327,29 @@ def test_email(): @app.route("/check-skland") @require_token def test_skland(): - skland_info=[] - skland_info = conf['skland_info'] + skland_info = [] + skland_info = conf["skland_info"] request_header = { "user-agent": "Skland/1.0.1 (com.hypergryph.skland; build:100001014; Android 33; ) Okhttp/4.11.0", - "cred": '', + "cred": "", "vName": "1.0.1", "vCode": "100001014", - 'Accept-Encoding': 'gzip', - 'Connection': 'close', + "Accept-Encoding": "gzip", + "Connection": "close", "dId": "de9759a5afaa634f", - "platform": "1" + "platform": "1", } res = [] for item in skland_info: - data = {"phone": item['account'], "password": item['password']} - response = requests.post(headers=request_header, url="https://as.hypergryph.com/user/auth/v1/token_by_phone_password", - data=data) + data = {"phone": item["account"], "password": item["password"]} + response = requests.post( + headers=request_header, + url="https://as.hypergryph.com/user/auth/v1/token_by_phone_password", + data=data, + ) response_json = json.loads(response.text) - temp_res = { - "account": item['account'], - 'msg': response_json['msg'] - } + temp_res = {"account": item["account"], "msg": response_json["msg"]} res.append(temp_res) return res diff --git a/ui/components.d.ts b/ui/components.d.ts index c38ee1af2..a252115da 100644 --- a/ui/components.d.ts +++ b/ui/components.d.ts @@ -25,6 +25,7 @@ declare module '@vue/runtime-core' { NConfigProvider: typeof import('naive-ui')['NConfigProvider'] NDialogProvider: typeof import('naive-ui')['NDialogProvider'] NDivider: typeof import('naive-ui')['NDivider'] + NDynamicInput: typeof import('naive-ui')['NDynamicInput'] NForm: typeof import('naive-ui')['NForm'] NFormItem: typeof import('naive-ui')['NFormItem'] NFormItemGi: typeof import('naive-ui')['NFormItemGi'] diff --git a/ui/src/components/SKLand.vue b/ui/src/components/SKLand.vue index e531cb6d7..26499245f 100644 --- a/ui/src/components/SKLand.vue +++ b/ui/src/components/SKLand.vue @@ -8,8 +8,6 @@ const store = useConfigStore() import { storeToRefs } from 'pinia' const { skland_enable, skland_info } = storeToRefs(store) - - function add_account() { return { isCheck: true, @@ -25,7 +23,6 @@ async function test_maa() { const response = await axios.get(`${import.meta.env.VITE_HTTP_URL}/check-skland`) maa_msg.value = response.data } -