From ec060ce444cdd1c48a54686cadbc8950478eedcf Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 22 八月 2025 16:27:34 +0800 Subject: [PATCH] 网页内容修改 --- setting.py | 76 +++++++++++++++++++++++++++++++++++++- 1 files changed, 74 insertions(+), 2 deletions(-) diff --git a/setting.py b/setting.py index 554d06e..95bddb1 100644 --- a/setting.py +++ b/setting.py @@ -239,6 +239,41 @@ return val +def set_delegating_window_info(window): + set_window_info("delegating_window_info", window) + + +def get_delegating_window_info(): + return get_window_info("delegating_window_info") + + +def set_window_info(key, window): + """ + 璁剧疆绐楀彛淇℃伅 + :param key: + :param window: + :return: + """ + cp = __read_setting() + cp.set("config", key, json.dumps(window)) + __write_setting(cp) + + +def get_window_info(key): + """ + 鑾峰彇绐楀彛淇℃伅 + :param key: + :return: + """ + cp = __read_setting() + val = __get_setting(cp, "config", key) + if val is None: + return None + else: + val = json.loads(val) + return val + + # 璁剧疆浠g爜灞炴�ф淇℃伅 def set_code_attribute_window_info(window): cp = __read_setting() @@ -292,6 +327,43 @@ return False +def is_only_convertible_bonds(): + """ + 鏄惁鍙湁鍙浆鍊� + :return: + """ + cp = __read_setting() + val = __get_setting(cp, "config", "only_convertible_bonds") + if val: + if int(val) > 0: + return True + return False + + +# 鑾峰彇灞忓箷鐨勬瘮渚� +def get_screen_scale(): + """ + 鑾峰彇灞忓箷姣斾緥锛岄粯璁�1.5 + :return: + """ + cp = __read_setting() + val = __get_setting(cp, "config", "screen_scale") + if val: + return round(float(val), 2) + return 1.5 + + +def is_can_ths_buy(): + """ + 鏄惁鍚岃姳椤轰拱鍏� + :return: + """ + cp = __read_setting() + val = __get_setting(cp, "config", "ths_buy") + if val and int(val) > 0: + return True + return False + + if __name__ == "__main__": - print(get_ths_auto_click_time_space()) - set_ths_auto_click_time_space(1000) + print(is_can_ths_buy()) -- Gitblit v1.8.0