[youzan/vant]经测试,华为畅享8,华为荣耀9i 无法访问有 SKU 组件的页面

2024-05-22 255 views
8

经测试,华为畅享8,华为荣耀9i 无法访问有 SKU 组件的页面 报错

android 4.4.23+

[vue-router] Failed to resolve async component default: SyntaxError: Unexpected token ( [vue-router] uncaught error during route navigation:

回答

3

自带浏览器

0

官方示例上能复现这个问题不

0

官方示例上能复现这个问题不

9

手头没有这样的机器,能否提供更多的报错信息,或者帮我们定位一下

4

手头没有这样的机器,能否提供更多的报错信息,或者帮我们定位一下

非常抱歉,如果可以,我也希望提供更多的报错信息 原本我也是想自己先定位问题 但是在使用 vconsole 后发现报错信息只有这两行 [vue-router] Failed to resolve async component default: SyntaxError: Unexpected token ( [vue-router] uncaught error during route navigation: 原本应该还有展开的更多具体的信息 但是在 vconsole 中没有 请问我需要怎么做才能拿到更多报错信息?

0

_20181207181729

5

Unexpected token ( at Object.webpackJsonp../node_modules/vant/es/sku/Sku.js (http://192.168.100.239/0.js:455:1) at __webpack_require__ (http://192.168.100.239/app.js:708:30) at fn (http://192.168.100.239/app.js:113:20) at Object.eval ([module]:1:63) at Object.webpackJsonp../node_modules/vant/es/sku/index.js (http://192.168.100.239/0.js:534:1) at __webpack_require__ (http://192.168.100.239/app.js:708:30) at fn (http://192.168.100.239/app.js:113:20) at Object.eval ([module]:8:70) at Object.webpackJsonp../node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/pages/product/components/Sku.vue (http://192.168.100.239/0.js:103:1) at __webpack_require__ (http://192.168.100.239/app.js:708:30)

8

component: (resolve) => require(['@/pages/product/Product'], resolve) 如果不用这种方式加载组件,会白屏

9

看起来是 Promise 兼容性导致的,异步组件会使用 Promise,低版本安卓存在不支持 Promise 的情况,建议引入 es6-promise 这类的 polyfill 库

0

看起来是 Promise 兼容性导致的,异步组件会使用 Promise,低版本安卓存在不支持 Promise 的情况,建议引入 es6-promise 这类的 polyfill 库

项目已经安装了 babel-polyfill