undefineduni_modules/qiun-data-charts/static/h5/echarts.min.js net::ERR_NAME_NOT_RESOLVED
·
问题:
uni-app项目vue发布h5网页配置了运行路径。

配置如:阿里云 linux 的nginx 配置uni-app的H5前端项目vue,后端接口阿里云。_Lan.W的博客-CSDN博客
发布到nginx之后,报错 ,使用qiun-data-charts的柱图,使用的是echarts的配置,然后:echarts.min.js文件找不的报错
pages-sys-workbench-index.155d875a.js:1 GET http://xx.xx.cnundefineduni_modules/qiun-data-charts/static/h5/echarts.min.js net::ERR_NAME_NOT_RESOLVED


分析
未h5运行基础路径时,运行是正常,那就是uniapp项目h5配置之后,导致路径不对。找到qiun-charts框引用echarts.min.js的地方,查看拼接如下。
解决:
修改qiun chartts源码,把cloudh5这个路径拼接上

如上图:在qiun-data-charts.vue文件时,配置的运行路径字段是:window.location.pathname,
rooturl加上pathname
const rooturl = window.location.origin+window.location.pathname
运行ok。
更多推荐


所有评论(0)