1、publicPath:代表打包后,.html文件引用的地址
module.exports = defineConfig({
transpileDependencies: false,
// publicPath: "/",
// publicPath: "/static/rfcapp/37661176_20240409171730",
publicPath: "/static/frontpage/",
image.png
2、js/fonts/css上传到
image.png
3、index.html改名为frontpage.html,上传到
image.png
4、在flask新建frontpage.py页面
@app1.app2.route('/frontpage/<rfcNum>', methods=['GET', 'POST'])
def rfcapp(rfcNum):
return render_template("frontpage.html")
5、checklist.py增加访问URL:
@app1.app2.route('/frontpage/<rfcNum>', methods=['GET', 'POST'])
def frontpageindex(rfcNum):
return render_template("frontpage.html")
6、访问URL:http://fti.gtac.huawei.com:9002/frontpage/37661176_20240409171730
flask会把frontpage.html回传给浏览器,浏览器会下载js/css;
js包含vue,浏览器执行vue,vue获取url内的taskid,去flask获取信息,并页面展示;
image.png