美文网首页小程序开发
微信小程序开发:在mpvue项目中按照环境动态引入阿拉丁统计 s

微信小程序开发:在mpvue项目中按照环境动态引入阿拉丁统计 s

作者: 扛着煤气去救火 | 来源:发表于2019-08-01 15:36 被阅读0次

    在mpvue项目中按照环境动态引入阿拉丁统计sdk

    出现错误:

    
    thirdScriptError
    
    sdk uncaught third Error
    
    Cannot read property 'getElementsByTagName' of undefined
    
    TypeError: Cannot read property 'getElementsByTagName' of undefined
    
        at Function.o.e (http://127.0.0.1:60977/appservice/common/manifest.js:21:36)
    
        at Object.dcK (http://127.0.0.1:60977/appservice/app.js:6:7)
    
        at o (http://127.0.0.1:60977/appservice/common/manifest.js:39:91)
    
        at Object.NHnr (http://127.0.0.1:60977/appservice/app.js:29:13)
    
        at o (http://127.0.0.1:60977/appservice/common/manifest.js:39:91)
    
        at Object.global.webpackJsonpMpvue (http://127.0.0.1:60977/appservice/common/manifest.js:13:13)
    
        at http://127.0.0.1:60977/appservice/app.js:5:8
    
        at require (http://127.0.0.1:60977/appservice/__dev__/WAService.js:1:1016120)
    
        at <anonymous>:1:1
    
        at HTMLScriptElement.scriptLoaded (http://127.0.0.1:60977/appservice/appservice?t=1564644391858:21225:21)
    
    

    解决办法:把import变为require.

    相关文章

      网友评论

        本文标题:微信小程序开发:在mpvue项目中按照环境动态引入阿拉丁统计 s

        本文链接:https://www.haomeiwen.com/subject/akxcdctx.html