PyWebIO
PyWebIO copied to clipboard
多应用请求失败问题
我使用了 platform.path_deploy 部署了指定目录的多应用, 目前可以通过 output.put_link(name="正则表达式",url="/app_re_match", app=None, new_window=True),点击后市通过 http://127.0.0.1:65534/app_re_match 打开其他应用, 但是使用output.put_link 的app参数跳转应用, output.put_link(name="正则表达式",url=None, app=“app_re_match”, new_window=True), 打开的url是http://127.0.0.1:65534/?app=app_re_match,结果发现没有跳转成功,显示的还是当前页面, 请问这是什么原因呢
output.put_link(app=...) 仅支持在 start_server() 启动的应用中使用
put_html(f'''{total_css}
<div class="contenedor">
<button onclick="window.location.href = 'http://{get_host_ip()}:8080/tools/merge_table/main?reload'" class="button">表格合并*</button>
</div>
''')
我在使用path_deploy部署时, 通常用index.py来重写索引页, 然后用put_grid创建矩阵, 在里面是很多put_html, 写一个按钮来跳转不同工具, {total_css}是index内的css样式字符串, 引用到put_html,class="contenedor" 就是css样式了, {get_host_ip()}是获取本机ip,