獲取屏幕寬度(高度相對應 height)
方法1
imageLoad: function () {
this.setData({
imageWidth: wx.getSystemInfoSync().windowWidth
})
}
方法
.imgClass{
width: 100vw;
vw 表示 view width,vh 表示 view height
前面的數字表示百分比
獲取屏幕寬度(高度相對應 height)
方法1
imageLoad: function () {
this.setData({
imageWidth: wx.getSystemInfoSync().windowWidth
})
}
方法
.imgClass{
width: 100vw;
vw 表示 view width,vh 表示 view height
前面的數字表示百分比
微信小程序真機調試時出現了,Error: request:fail url not in domain list:api.xxx.com 需要把網址添加到合法域名中,見圖 --- 自用 不解釋