小程序屏幕自动调节亮度,安卓系统正常,苹果系统出现不恢复之前亮度情况?
onLoad: function (options) {
var that = this
wx.getScreenBrightness({
success: function (res) {
that.setData({
ScreenBrightness: res.value
})
}
}),
wx.setScreenBrightness({
value: 0.9 //屏幕亮度值,范围 0~1,0 最暗,1 最亮
})
},
onHide:function(){
console.log(this.data)
wx.setScreenBrightness({
value: this.data.currentBrightness
})
},
苹果没有恢复之前亮度,需要手动调节