报错:document is not defined
document is not defined
解决办法:进行window的逻辑判断
if (typeof window !== ‘undefined‘) { .... }
原文:https://www.cnblogs.com/liumcb/p/13356768.html