252015523@qq.com
252015523@qq.com
  • 发布:2020-02-18 01:11
  • 更新:2020-06-28 21:59
  • 阅读:713

app 真机报错 h5正常 请问各位大佬知道是什么原因吗

分类:uni-app

正在热刷新,如刷新失败,请点击控制台工具栏上的【重启应用图标】
01:05:34.402 Uncaught SyntaxError: Unexpected strict mode reserved word at app-view.js:316
01:05:36.481 App Launch at App.vue:4
01:05:36.501 App Show at App.vue:7
01:05:36.564 [Object] {"API_URL":"http://tphpapi.lihe-fund.com/","IMG_url":"http://tliheimage.lihe-fund.com"} at pages\index\index.vue:25
01:05:36.585 http://tliheimage.lihe-fund.com at pages\index\index.vue:26
01:05:36.606 1 at pages\index\index.vue:54
01:05:36.627 ReferenceError: getApp is not defined at view.umd.min.js:6
01:05:36.647 TypeError: undefined is not a function at view.umd.min.js:6
01:05:36.668 ReferenceError: getApp is not defined at view.umd.min.js:6
01:05:36.689 TypeError: Cannot read property 'addVData' of undefined at view.umd.min.js:6
01:05:37.143 Uncaught SyntaxError: Unexpected strict mode reserved word at app-view.js:316

更新数据 非 APP、H5 环境不支持 export default { data() { return { option: { title: { text: 'ECharts 入门示例' }, tooltip: {}, legend: { data: ['销量'] }, xAxis: { data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"] }, yAxis: {}, series: [{ name: '销量', type: 'bar', data: [5, 20, 36, 10, 10, 20] }] } } }, onLoad() { }, methods: { changeOption() { const data = this.option.series[0].data // 随机更新示例数据 data.forEach((item, index) => { data.splice(index, 1, Math.random() * 40) }) }, onViewClick(options) { console.log(options) } } } let myChart export default { mounted() { if (typeof window.echarts === 'function') { this.initEcharts() } else { // 动态引入较大类库避免影响页面展示 const script = document.createElement('script') // view 层的页面运行在 www 根目录,其相对路径相对于 www 计算 script.src = 'static/echarts.js' script.onload = this.initEcharts.bind(this) document.head.appendChild(script) } }, methods: { initEcharts() { myChart = echarts.init(document.getElementById('echarts')) // 观测更新的数据在 view 层可以直接访问到 myChart.setOption(this.option) }, updateEcharts(newValue, oldValue, ownerInstance, instance) { // 监听 service 层数据变更 myChart.setOption(newValue) }, onClick(event, ownerInstance) { // 调用 service 层的方法 ownerInstance.callMethod('onViewClick', { test: 'test' }) } } }
2020-02-18 01:11 负责人:无 分享
已邀请:
2389259876@qq.com

2389259876@qq.com

解决了吗 我也遇到相同的问题了

  • 252015523@qq.com (作者)

    我当时是安卓版本太老5.0 ,换了版本解决

    2020-07-28 10:31

743390682@qq.com

743390682@qq.com - 90后前端女

app下开启了V3模式,我也报了下面这个错,请问解决了吗
TypeError: Cannot read property 'addVData' of undefined at view.umd.min.js:6

897411890@qq.com

897411890@qq.com

有解决嘛?我也是这个问题

  • 252015523@qq.com (作者)

    我当时是安卓版本太老5.0 ,换了版本解决

    2020-07-28 10:30

d_cms@qq.com

d_cms@qq.com

我也遇到了, 怎么解决的

  • 252015523@qq.com (作者)

    我当时是安卓版本太老5.0 ,换了版本解决

    2020-07-28 10:30

要回复问题请先登录注册