js发布vue.config.js

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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容