增加UI选项是否自动打开浏览器
This commit is contained in:
parent
691c5344ad
commit
8d81096460
@ -478,6 +478,7 @@ class MainUi(BaseSubMainClass):
|
||||
parser.add_argument("-p", '--port', metavar="", type=int, help="(可选)端口号", default=5000)
|
||||
parser.add_argument("--online", help="(可选)是否在线查看(局域网查看)", default=False, action='store_true')
|
||||
parser.add_argument("--debug", help="(可选)是否开启debug模式", default=False, action='store_true')
|
||||
parser.add_argument("--openBrowser", help="(可选)是否自动打开浏览器", default=True, action='store_true')
|
||||
return parser
|
||||
|
||||
def run(self, args):
|
||||
@ -486,8 +487,9 @@ class MainUi(BaseSubMainClass):
|
||||
online = args.online
|
||||
port = args.port
|
||||
debug = args.debug
|
||||
isopenBrowser = args.openBrowser
|
||||
|
||||
start_falsk(port=port, online=online, debug=debug)
|
||||
start_falsk(port=port, online=online, debug=debug, isopenBrowser=isopenBrowser)
|
||||
|
||||
|
||||
class MainApi(BaseSubMainClass):
|
||||
|
@ -127,4 +127,4 @@ if __name__ == '__main__':
|
||||
my_wxid = "****"
|
||||
|
||||
start_falsk(msg_path=msg_path, micro_path=micro_path, media_path=media_path, wx_path=wx_path, my_wxid=my_wxid,
|
||||
port=5000, online=False, debug=False)
|
||||
port=5000, online=False, debug=False, isopenBrowser=False)
|
||||
|
Loading…
Reference in New Issue
Block a user