报错信息ReferenceError: window is not defined
看到此报错应该在env文件中写入一下代码
window=global
报错信息Cannot read properties of undefined (reading ‘userAgent’)
看到此报错应该在env文件中写入一下代码
navigator={
"userAgent":'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36'
}
window.location.origin TypeError: Cannot read properties of undefined (reading ‘origin’)
看到此报错应该在env文件中写入一下代码
location={
"ancestorOrigins": {},
"href": "https://m.ctyun.cn/wap/main/auth/login",
"origin": "https://m.ctyun.cn",
"protocol": "https:",
"host": "m.ctyun.cn",
"hostname": "m.ctyun.cn",
"port": "",
"pathname": "/wap/main/auth/login",
"search": "",
"hash": ""
}