添加内容
这是我看到的一个案例教程 给 globalData 添加获取到的手机版本信息,但是我写完之后发现 globalData 没有我要的窗口宽高 连下面的console.log 也不显示,求大神帮帮指点一下。谢谢 App({ globalData: {}, onLaunch () { try { const res = wx.getSystemInfoSync(); this.globalData.windowWidth = res.windowWidth; this.glabalData.windowHeight = res.windowHeight; console.log(1) } catch (e) { } }, })