Commit f0816231 authored by 潘永坪's avatar 潘永坪

点亮电子门票

parent 3d41bb19
......@@ -9,8 +9,28 @@
data() {
return {
outUrl:"",//跳出地址
Brightness:"",//屏幕亮度
}
},
onShow() {
let _this=this
uni.getScreenBrightness({
success: function(res){
// 这里是把获取到的手机屏幕亮度,存储到data里面,方便给到页面生命周期隐藏和卸载方法里面用
_this.Brightness = res.value;
if(res.value != 1){
uni.setScreenBrightness({
value: 1
});
}
}
})
},
onHide: function () {
uni.setScreenBrightness({// 恢复之前屏幕亮度
value: this.Brightness
})
},
onLoad(option) {
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token")
......
......@@ -10,8 +10,28 @@
data() {
return {
outUrl:"",//跳出地址
Brightness:"",//屏幕亮度
}
},
onShow() {
let _this=this
uni.getScreenBrightness({
success: function(res){
// 这里是把获取到的手机屏幕亮度,存储到data里面,方便给到页面生命周期隐藏和卸载方法里面用
_this.Brightness = res.value;
if(res.value != 1){
uni.setScreenBrightness({
value: 1
});
}
}
})
},
onHide: function () {
uni.setScreenBrightness({// 恢复之前屏幕亮度
value: this.Brightness
})
},
onLoad(option) {
//#ifdef MP-WEIXIN
this.enterUrl=option.q
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment