提交 1ac5023b 编写于 作者: W wanganxp

补充电量模块异常的报错提示

上级 775ef9eb
......@@ -14,15 +14,20 @@
}
},
onLoad() {
try {
uni.getBatteryInfo({
success: res => {
this.level = res.level;
this.isCharging = res.isCharging;
}
});
} catch (e) {
console.error(e.message);
uni.showModal({
content: e.message,
showCancel: false
});
}
}
}
</script>
<style>
</style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册