项目里,需要通过Android的webview加载一个html文件,并执行相应的js脚本。发现在部分低版本手机上,js报错的情况。主要集中在低版本的webview中。debug后发现,是js脚本中存在箭头函数(lambda表达式),导致执行失败,替换为常规函数即可。
推测是:低版本webView中,还不支持这种js语法。
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true