<template>
<view>
<web-view src="https://static-mp-a2f873cf-9e82-4201-a4bc-f5da55fa9121.next.bspapp.com" @error="error"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
title: ''
}
},
methods: {
error(e) {
console.log(e)
}
}
}
</script>
<style>
</style>
1***@qq.com
- 发布:2024-03-27 10:38
- 更新:2024-03-27 14:57
- 阅读:270
产品分类: uniCloud/App
示例代码:
操作步骤:
<template>
<view>
<web-view src="https://static-mp-a2f873cf-9e82-4201-a4bc-f5da55fa9121.next.bspapp.com" @error="error"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
title: ''
}
},
methods: {
error(e) {
console.log(e)
}
}
}
</script>
<style>
</style>
<template>
<view>
<web-view src="https://static-mp-a2f873cf-9e82-4201-a4bc-f5da55fa9121.next.bspapp.com" @error="error"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
title: ''
}
},
methods: {
error(e) {
console.log(e)
}
}
}
</script>
<style>
</style>
预期结果:
成功加载外部链接
成功加载外部链接
实际结果:
执行后失败
10:28:55.908 at https://g.alicdn.com/AWSC/et/1.77.3/et_f.js:3
10:28:56.008 Uncaught SyntaxError: Unexpected token import at https://static-mp-a2f873cf-9e82-4201-a4bc-f5da55fa9121.next.bspapp.com/assets/index-15998083.js:6
执行后失败
10:28:55.908 at https://g.alicdn.com/AWSC/et/1.77.3/et_f.js:3
10:28:56.008 Uncaught SyntaxError: Unexpected token import at https://static-mp-a2f873cf-9e82-4201-a4bc-f5da55fa9121.next.bspapp.com/assets/index-15998083.js:6
bug描述:
web-view 加载第三方链接(unicloud的前端网页托管链接)有的手机可以正常加载,有的手机会报错加载不出。目前加载不出的那台手机是nova手机 安卓系统8.1, 如果换成其它不是unicloud托管的链接 每个手机都能打开
1***@qq.com (作者)
不好意思报错信息忘写了。 10:28:55.908 at https://g.alicdn.com/AWSC/et/1.77.3/et_f.js:3
10:28:56.008 Uncaught SyntaxError: Unexpected token import at https://static-mp-a2f873cf-9e82-4201-a4bc-f5da55fa9121.next.bspapp.com/assets/index-15998083.js:6
2024-03-27 10:58