This commit is contained in:
2025-09-14 00:21:54 +08:00
commit d40b3bbd62
766 changed files with 36275 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
Page({
onShareAppMessage() {
return {
title: '获取电池信息',
path: 'packageAPI/pages/get-battery-info/get-battery-info',
};
},
data: {
},
getBatteryInfo() {
xhs.getBatteryInfo({
complete: res => {
const msg = res.isCharging ? '充电中' : '使用电池中';
this.setData({
level: res.level,
isCharging: msg,
});
},
});
},
});