diff --git a/manifest.json b/manifest.json index 22d3396..081e9ff 100644 --- a/manifest.json +++ b/manifest.json @@ -1,114 +1,114 @@ { - "name" : "星星锁Lite", - "appid" : "__UNI__933D519", - "description" : "", - "versionName" : "1.3.2", - "versionCode" : "39", - "mp-weixin" : { - "appid" : "wx9829a39e65550757", - "setting" : { - "urlCheck" : true, - "minified" : true - }, - "permission" : { - "scope.bluetooth" : { - "desc" : "蓝牙将用于控制和管理您的智能门锁" - } - }, - "usingComponents" : true, - "lazyCodeLoading" : "requiredComponents", - "optimization" : { - "subPackages" : true - }, - "plugins" : { - "wmpf-voip" : { - "version" : "latest", - "provider" : "wxf830863afde621eb", - "genericsImplementation" : { - "call-page-plugin" : { - "custombox" : "pages/main/customBox" - } - } - } - } + "name": "星星锁Lite", + "appid": "__UNI__933D519", + "description": "", + "versionName": "1.3.0", + "versionCode": "37", + "mp-weixin": { + "appid": "wx9829a39e65550757", + "setting": { + "urlCheck": true, + "minified": true }, - "vueVersion" : "3", - "app-plus" : { - "distribute" : { - "icons" : { - "android" : { - "hdpi" : "unpackage/res/icons/72x72.png", - "xhdpi" : "unpackage/res/icons/96x96.png", - "xxhdpi" : "unpackage/res/icons/144x144.png", - "xxxhdpi" : "unpackage/res/icons/192x192.png" - }, - "ios" : { - "appstore" : "unpackage/res/icons/1024x1024.png", - "ipad" : { - "app" : "unpackage/res/icons/76x76.png", - "app@2x" : "unpackage/res/icons/152x152.png", - "notification" : "unpackage/res/icons/20x20.png", - "notification@2x" : "unpackage/res/icons/40x40.png", - "proapp@2x" : "unpackage/res/icons/167x167.png", - "settings" : "unpackage/res/icons/29x29.png", - "settings@2x" : "unpackage/res/icons/58x58.png", - "spotlight" : "unpackage/res/icons/40x40.png", - "spotlight@2x" : "unpackage/res/icons/80x80.png" - }, - "iphone" : { - "app@2x" : "unpackage/res/icons/120x120.png", - "app@3x" : "unpackage/res/icons/180x180.png", - "notification@2x" : "unpackage/res/icons/40x40.png", - "notification@3x" : "unpackage/res/icons/60x60.png", - "settings@2x" : "unpackage/res/icons/58x58.png", - "settings@3x" : "unpackage/res/icons/87x87.png", - "spotlight@2x" : "unpackage/res/icons/80x80.png", - "spotlight@3x" : "unpackage/res/icons/120x120.png" - } - } - }, - "android" : { - "permissions" : [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "targetSdkVersion" : 34, - "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ] - }, - "ios" : { - "dSYMs" : false - } - }, - "modules" : { - "Bluetooth" : {}, - "VideoPlayer" : {}, - "Camera" : {}, - "Record" : {} - }, - "splashscreen" : { - "waiting" : false + "permission": { + "scope.bluetooth": { + "desc": "蓝牙将用于控制和管理您的智能门锁" + } + }, + "usingComponents": true, + "lazyCodeLoading": "requiredComponents", + "optimization": { + "subPackages": true + }, + "plugins": { + "wmpf-voip": { + "version": "latest", + "provider": "wxf830863afde621eb", + "genericsImplementation": { + "call-page-plugin": { + "custombox": "pages/main/customBox" + } } + } } + }, + "vueVersion": "3", + "app-plus": { + "distribute": { + "icons": { + "android": { + "hdpi": "unpackage/res/icons/72x72.png", + "xhdpi": "unpackage/res/icons/96x96.png", + "xxhdpi": "unpackage/res/icons/144x144.png", + "xxxhdpi": "unpackage/res/icons/192x192.png" + }, + "ios": { + "appstore": "unpackage/res/icons/1024x1024.png", + "ipad": { + "app": "unpackage/res/icons/76x76.png", + "app@2x": "unpackage/res/icons/152x152.png", + "notification": "unpackage/res/icons/20x20.png", + "notification@2x": "unpackage/res/icons/40x40.png", + "proapp@2x": "unpackage/res/icons/167x167.png", + "settings": "unpackage/res/icons/29x29.png", + "settings@2x": "unpackage/res/icons/58x58.png", + "spotlight": "unpackage/res/icons/40x40.png", + "spotlight@2x": "unpackage/res/icons/80x80.png" + }, + "iphone": { + "app@2x": "unpackage/res/icons/120x120.png", + "app@3x": "unpackage/res/icons/180x180.png", + "notification@2x": "unpackage/res/icons/40x40.png", + "notification@3x": "unpackage/res/icons/60x60.png", + "settings@2x": "unpackage/res/icons/58x58.png", + "settings@3x": "unpackage/res/icons/87x87.png", + "spotlight@2x": "unpackage/res/icons/80x80.png", + "spotlight@3x": "unpackage/res/icons/120x120.png" + } + } + }, + "android": { + "permissions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "targetSdkVersion": 34, + "abiFilters": ["armeabi-v7a", "arm64-v8a"] + }, + "ios": { + "dSYMs": false + } + }, + "modules": { + "Bluetooth": {}, + "VideoPlayer": {}, + "Camera": {}, + "Record": {} + }, + "splashscreen": { + "waiting": false + } + } } diff --git a/pages/main/lockDetail.vue b/pages/main/lockDetail.vue index 3cc70b9..f68c6be 100644 --- a/pages/main/lockDetail.vue +++ b/pages/main/lockDetail.vue @@ -78,7 +78,10 @@ @@ -91,7 +94,8 @@ 监控 @@ -217,7 +229,10 @@ 门锁记录 @@ -240,7 +255,11 @@ - + 设置 + 删除 + { + const netWork = await $basic.getNetworkType() + if (!netWork) { + return + } + + const message = '删除锁后,所有信息都会一起删除,确定删除锁吗?' + + uni.showModal({ + title: '提示', + content: message, + async success(res) { + if (res.confirm) { + uni.showLoading({ + title: '删除中' + }) + const { code: resetDeviceCode } = await $bluetooth.resetDevice({ + name: $bluetooth.currentLockInfo.name, + authUid: $user.userInfo.uid.toString(), + keyId: $bluetooth.keyId.toString() + }) + if (resetDeviceCode === 0 || resetDeviceCode === -2) { + const { code, message } = await deleteLockRequest({ + lockId: $bluetooth.currentLockInfo.lockId + }) + if (code === 0) { + uni.hideLoading() + $lock.updateLockSearch({ + ...$lock.lockSearch, + pageNo: 1 + }) + $lock.getLockList($lock.lockSearch) + $basic.backAndToast('删除成功', 1) + } else { + uni.hideLoading() + uni.showToast({ + title: message, + icon: 'none' + }) + } + } else if (resetDeviceCode === -1) { + uni.hideLoading() + uni.showToast({ + title: '删除失败,请保持在锁附近', + icon: 'none' + }) + } + } + } + }) + }