diff --git a/0.py b/0.py index 441dda8..30c7d00 100644 --- a/0.py +++ b/0.py @@ -114,14 +114,16 @@ class Api: # ... 已有代码 ... +run_path = os.path.dirname(os.path.realpath(sys.argv[0])) + if __name__ == '__main__': # ... 已有代码 ... api = Api() window_html = os.path.join(run_path, 'index', 'live-management.html') # 在 create_window 中设置 api 对象,以便 JS 访问 - window = webview.create_window('直播管理系统', window_html, js_api=api, min_size=(800, 600)) + window = webview.create_window('直播管理系统', window_html, js_api=api, min_size=(1200, 800)) # 启动 webview。启动后,界面将显示。 # live-management.html 中的 JS 代码应在 DOM 准备就绪且 pywebview api 可用后调用 get_initial_accounts() - webview.start(debug=True) \ No newline at end of file + webview.start(debug=False) \ No newline at end of file