diff --git a/uni_modules/DCloud-uts-batteryinfo/changelog.md b/uni_modules/DCloud-uts-batteryinfo/changelog.md deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/uni_modules/DCloud-uts-batteryinfo/package.json b/uni_modules/DCloud-uts-batteryinfo/package.json deleted file mode 100644 index 0da8c55d4451c3667c2a1d2f9ff90b12ad0f1569..0000000000000000000000000000000000000000 --- a/uni_modules/DCloud-uts-batteryinfo/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "id": "DCloud-uts-batteryinfo", - "displayName": "uts-batteryinfo", - "version": "1.0.0", - "description": "uts-batteryinfo", - "keywords": [ - "uts-batteryinfo" -], - "repository": "", - "engines": { - "HBuilderX": "^3.1.0" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "", - "data": "", - "permissions": "" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "u", - "aliyun": "u" - }, - "client": { - "Vue": { - "vue2": "u", - "vue3": "u" - }, - "App": { - "app-android": "u", - "app-ios": "u" - }, - "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" - }, - "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" - }, - "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} \ No newline at end of file diff --git a/uni_modules/DCloud-uts-batteryinfo/readme.md b/uni_modules/DCloud-uts-batteryinfo/readme.md deleted file mode 100644 index 2ed1b40870cbcb9653d4a8dc9f42d62e528c0b28..0000000000000000000000000000000000000000 --- a/uni_modules/DCloud-uts-batteryinfo/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# uts-batteryinfo -### 开发文档 -[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html) -[UTS 原生插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html) -[Hello UTS](https://gitcode.net/dcloud/hello-uts/-/tree/dev) \ No newline at end of file diff --git a/uni_modules/DCloud-uts-batteryinfo/utssdk/app-android/index.uts b/uni_modules/DCloud-uts-batteryinfo/utssdk/app-android/index.uts deleted file mode 100644 index 59bf6bf0e791a319d32e226468c456096e68e3c9..0000000000000000000000000000000000000000 --- a/uni_modules/DCloud-uts-batteryinfo/utssdk/app-android/index.uts +++ /dev/null @@ -1,24 +0,0 @@ -import Context from "android.content.Context"; -import BatteryManager from "android.os.BatteryManager"; -import { getAppContext } from "io.dcloud.uts.android"; - - -export default async function getBatteryInfo(): Promise { - const context = getAppContext(); - if (context != null) { - const manager = context.getSystemService( - Context.BATTERY_SERVICE - ) as BatteryManager; - const level = manager.getIntProperty( - BatteryManager.BATTERY_PROPERTY_CAPACITY - ); - return { - level, - isCharging: manager.isCharging() - }; - } - return { - level: 0, - isCharging: false - }; -} \ No newline at end of file diff --git a/uni_modules/DCloud-uts-batteryinfo/utssdk/mp-weixin/index.js b/uni_modules/DCloud-uts-batteryinfo/utssdk/mp-weixin/index.js deleted file mode 100644 index f96417c3c1e31a55be4d38e6442811367519bc0a..0000000000000000000000000000000000000000 --- a/uni_modules/DCloud-uts-batteryinfo/utssdk/mp-weixin/index.js +++ /dev/null @@ -1,9 +0,0 @@ -export default async function getBatteryInfo() { - return new Promise((resolve) => { - wx.getBatteryInfo({ - success(res) { - resolve(res) - } - }) - }) -} diff --git a/uni_modules/DCloud-uts-batteryinfo/utssdk/web/index.js b/uni_modules/DCloud-uts-batteryinfo/utssdk/web/index.js deleted file mode 100644 index 7d7637e14435bafb53aa09091cdafddde81fd2b9..0000000000000000000000000000000000000000 --- a/uni_modules/DCloud-uts-batteryinfo/utssdk/web/index.js +++ /dev/null @@ -1,13 +0,0 @@ -export default async function getBatteryInfo() { - if ((navigator).getBattery) { - const battery = await navigator.getBattery() - return { - level: battery.level * 100, - isCharging: battery.charging - } - } - return { - level: 0, - isCharging: false - }; -}