From 52959a97d25dc2b55797b11ed5e7d65a8d160ed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Sun, 6 Apr 2025 15:19:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E6=88=90=E7=9B=91=E6=8E=A7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9B=B8=E5=85=B3=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/sdk.js | 12 -- config/constants.js | 9 - package-lock.json | 254 +++--------------------- package.json | 4 - pages.json | 8 +- pages/addDevice/distributionNetwork.vue | 122 +++--------- pages/addDevice/selectDeviceType.vue | 39 ---- pages/main/home.vue | 14 +- pages/main/lockDetail.vue | 17 ++ pages/p2p/p2pPlayer.vue | 183 +++++++++++++---- stores/basic.js | 5 - stores/sdk.js | 45 ----- 12 files changed, 224 insertions(+), 488 deletions(-) delete mode 100644 api/sdk.js delete mode 100644 config/constants.js delete mode 100644 pages/addDevice/selectDeviceType.vue delete mode 100644 stores/sdk.js diff --git a/api/sdk.js b/api/sdk.js deleted file mode 100644 index c417029..0000000 --- a/api/sdk.js +++ /dev/null @@ -1,12 +0,0 @@ -import request from '../utils/request' - -// sdk 模块 - -// 获取SDK Token -export function getSdkToken(data) { - return request({ - url: '/wechat/tencentYunBind', - method: 'POST', - data - }) -} diff --git a/config/constants.js b/config/constants.js deleted file mode 100644 index 264739d..0000000 --- a/config/constants.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * 应用全局常量配置 - */ - -// P2P相关常量 -export const P2P_PLAYER_ID = 'p2p-player' -export const P2P_PUSHER_ID = 'p2p-pusher' - -// 其他常量可以在这里添加 diff --git a/package-lock.json b/package-lock.json index 192787a..32037f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,10 +7,6 @@ "dependencies": { "pinia": "^2.2.0", "pinia-plugin-unistorage": "^0.1.2", - "qcloud-iotexplorer-appdev-plugin-wificonf-blecombo": "^3.0.118", - "qcloud-iotexplorer-appdev-plugin-wificonf-core": "^3.0.118", - "qcloud-iotexplorer-appdev-sdk": "^3.0.118", - "qcloud-iotexplorer-bluetooth-adapter": "^3.0.118", "uview-plus": "^3.3.12" }, "devDependencies": { @@ -1152,31 +1148,6 @@ "buffer": "^6.0.3" } }, - "node_modules/@keyv/serialize/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, "node_modules/@meoc/utils": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/@meoc/utils/-/utils-0.2.9.tgz", @@ -2464,6 +2435,31 @@ "readable-stream": "^3.4.0" } }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -2496,9 +2492,9 @@ } }, "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "dev": true, "funding": [ { @@ -2517,7 +2513,7 @@ "license": "MIT", "dependencies": { "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "ieee754": "^1.2.1" } }, "node_modules/cac": { @@ -3303,15 +3299,6 @@ } } }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "license": "MIT", - "engines": { - "node": ">=0.10" - } - }, "node_modules/dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -4339,12 +4326,6 @@ "node": ">=0.10.0" } }, - "node_modules/event-emitter-for-miniprogram": { - "version": "3.0.118", - "resolved": "https://registry.npmjs.org/event-emitter-for-miniprogram/-/event-emitter-for-miniprogram-3.0.118.tgz", - "integrity": "sha512-1PcFkCGtSrYX7Fwwrrz5OxmO1vrkDZuLOrrS/Ok2XYjADcTUspxXENlh/PaizTH3VIlF1T3W27QXEoixrzKyQA==", - "license": "MIT" - }, "node_modules/eventemitter3": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", @@ -4558,15 +4539,6 @@ "node": ">=8" } }, - "node_modules/filter-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", - "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/find-node-modules": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/find-node-modules/-/find-node-modules-2.1.3.tgz", @@ -5453,15 +5425,6 @@ "node": ">= 0.4" } }, - "node_modules/iotexplorer-ui-dev-config": { - "version": "3.0.118", - "resolved": "https://registry.npmjs.org/iotexplorer-ui-dev-config/-/iotexplorer-ui-dev-config-3.0.118.tgz", - "integrity": "sha512-XC1tQ+oY/0C0/n7qG4ofxAGxfONFDGHQ3tpgK2F2JmF2sQIlRSAd4L80cHQKxPFqyIbmIB751DEqupCPnh+F4w==", - "license": "MIT", - "dependencies": { - "tslib": "^2.1.0" - } - }, "node_modules/is-array-buffer": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", @@ -5993,12 +5956,6 @@ "jiti": "lib/jiti-cli.mjs" } }, - "node_modules/js-base64": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.7.tgz", - "integrity": "sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==", - "license": "BSD-3-Clause" - }, "node_modules/js-md5": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/js-md5/-/js-md5-0.8.3.tgz", @@ -6411,12 +6368,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.uniqwith": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz", - "integrity": "sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q==", - "license": "MIT" - }, "node_modules/lodash.upperfirst": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", @@ -7664,103 +7615,6 @@ "node": ">=6" } }, - "node_modules/qcloud-iotexplorer-appdev-plugin-wificonf-blecombo": { - "version": "3.0.118", - "resolved": "https://registry.npmjs.org/qcloud-iotexplorer-appdev-plugin-wificonf-blecombo/-/qcloud-iotexplorer-appdev-plugin-wificonf-blecombo-3.0.118.tgz", - "integrity": "sha512-ni8uOa8m1L2gSPkAa2/afKOzaLpeCPdmEW39Hbn2j7S4V5UPbWL+1lObNy8stlRUR++vKPIhb/DOlW1OTHAcDQ==", - "license": "MIT", - "dependencies": { - "iotexplorer-ui-dev-config": "3.0.118", - "qcloud-iotexplorer-appdev-plugin-wificonf-core": "3.0.118", - "qcloud-iotexplorer-appdev-sdk": "3.0.118", - "qcloud-iotexplorer-bluetooth-adapter": "3.0.118", - "qcloud-iotexplorer-bluetooth-adapter-llsync": "3.0.118", - "qcloud-iotexplorer-common-libs": "3.0.118", - "qcloud-iotexplorer-logger": "3.0.118", - "shortid-for-miniprogram": "^2.2.15", - "spark-md5": "^3.0.1", - "tslib": "^2.1.0" - } - }, - "node_modules/qcloud-iotexplorer-appdev-plugin-wificonf-core": { - "version": "3.0.118", - "resolved": "https://registry.npmjs.org/qcloud-iotexplorer-appdev-plugin-wificonf-core/-/qcloud-iotexplorer-appdev-plugin-wificonf-core-3.0.118.tgz", - "integrity": "sha512-2iObI2Hifi3ew+5EraINeNm0APF0jv2BYs2vyIuRwuJwNN6bPTrDGo1LIPyQpGBq03y4h9MUy11VxSVbeN9jbA==", - "license": "MIT", - "dependencies": { - "iotexplorer-ui-dev-config": "3.0.118", - "qcloud-iotexplorer-appdev-sdk": "3.0.118", - "tslib": "^2.1.0" - } - }, - "node_modules/qcloud-iotexplorer-appdev-sdk": { - "version": "3.0.118", - "resolved": "https://registry.npmjs.org/qcloud-iotexplorer-appdev-sdk/-/qcloud-iotexplorer-appdev-sdk-3.0.118.tgz", - "integrity": "sha512-UzlvJgizhWeKGh75gaj3w6fuHNKF0oB418U733/lyexlUX5a9KWySrSO49AYwfOrPPp4vllTbZ2vP5jXJ7+l2w==", - "license": "MIT", - "dependencies": { - "event-emitter-for-miniprogram": "3.0.118", - "js-base64": "^3.2.4", - "qcloud-iotexplorer-common-libs": "3.0.118", - "qcloud-iotexplorer-logger": "3.0.118", - "query-string": "^6.9.0", - "shortid-for-miniprogram": "^2.2.15", - "tslib": "^2.1.0" - } - }, - "node_modules/qcloud-iotexplorer-bluetooth-adapter": { - "version": "3.0.118", - "resolved": "https://registry.npmjs.org/qcloud-iotexplorer-bluetooth-adapter/-/qcloud-iotexplorer-bluetooth-adapter-3.0.118.tgz", - "integrity": "sha512-K/Qw14PID86VxL6vA6JiuxOYrnOgiX7yUSxlmuXlqNsJcbc7AaSUUCQUPP3Ds0AKcRp5EIzdMy8f5ANF9WIv1w==", - "license": "MIT", - "dependencies": { - "event-emitter-for-miniprogram": "3.0.118", - "lodash.uniqwith": "^4.5.0", - "qcloud-iotexplorer-appdev-sdk": "3.0.118", - "qcloud-iotexplorer-common-libs": "3.0.118", - "qcloud-iotexplorer-logger": "3.0.118", - "tslib": "^2.1.0" - } - }, - "node_modules/qcloud-iotexplorer-bluetooth-adapter-llsync": { - "version": "3.0.118", - "resolved": "https://registry.npmjs.org/qcloud-iotexplorer-bluetooth-adapter-llsync/-/qcloud-iotexplorer-bluetooth-adapter-llsync-3.0.118.tgz", - "integrity": "sha512-dklNG7VFyQJkwnhl/aUxBMKhqhghl4y7RrcPih6q8AjJPHLY5k7DpP8tUVcLKCymXaiq3K6S6d1C9CTgL5AA9g==", - "license": "MIT", - "dependencies": { - "event-emitter-for-miniprogram": "3.0.118", - "iotexplorer-ui-dev-config": "3.0.118", - "qcloud-iotexplorer-appdev-sdk": "3.0.118", - "qcloud-iotexplorer-bluetooth-adapter": "3.0.118", - "qcloud-iotexplorer-common-libs": "3.0.118", - "qcloud-iotexplorer-logger": "3.0.118", - "shortid-for-miniprogram": "^2.2.15", - "spark-md5": "^3.0.1", - "tslib": "^2.1.0" - } - }, - "node_modules/qcloud-iotexplorer-common-libs": { - "version": "3.0.118", - "resolved": "https://registry.npmjs.org/qcloud-iotexplorer-common-libs/-/qcloud-iotexplorer-common-libs-3.0.118.tgz", - "integrity": "sha512-nnCnfMwDjzCOY3wjNxvdkZZwLn91tYSie1TgwuC6oOD4pDRcbkOSRHG7W24l8gX/VLqOMkF+OiJzL6LRCQ3q+A==", - "license": "MIT", - "dependencies": { - "qcloud-iotexplorer-logger": "3.0.118", - "rxjs": "^7.8.0", - "shortid-for-miniprogram": "^2.2.15", - "spark-md5": "^3.0.1", - "tslib": "^2.1.0" - } - }, - "node_modules/qcloud-iotexplorer-logger": { - "version": "3.0.118", - "resolved": "https://registry.npmjs.org/qcloud-iotexplorer-logger/-/qcloud-iotexplorer-logger-3.0.118.tgz", - "integrity": "sha512-kVW5Kq1vqBwRMAUs2wOYLMCCfrs1FKt0AFDRPnIEoZiTeBzXtk9QF1K50rb+zMtmZ6RUlwIKoomWZRMI3oqR/w==", - "license": "MIT", - "dependencies": { - "tslib": "^2.1.0" - } - }, "node_modules/quansync": { "version": "0.2.10", "resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.10.tgz", @@ -7778,24 +7632,6 @@ ], "license": "MIT" }, - "node_modules/query-string": { - "version": "6.14.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.14.1.tgz", - "integrity": "sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==", - "license": "MIT", - "dependencies": { - "decode-uri-component": "^0.2.0", - "filter-obj": "^1.1.0", - "split-on-first": "^1.0.0", - "strict-uri-encode": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -8115,6 +7951,7 @@ "version": "7.8.2", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" @@ -8294,12 +8131,6 @@ "node": ">=8" } }, - "node_modules/shortid-for-miniprogram": { - "version": "2.2.15", - "resolved": "https://registry.npmjs.org/shortid-for-miniprogram/-/shortid-for-miniprogram-2.2.15.tgz", - "integrity": "sha512-Ulw76O5R9UtanxKhiaN9fbQJc0B3YtqFHhDCV8B6/Ay/tjq0RlS4thRxWNI5rnxMVq7EOTrlFFE6QVFsWKLz5w==", - "license": "MIT" - }, "node_modules/side-channel": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", @@ -8450,21 +8281,6 @@ "node": ">=0.10.0" } }, - "node_modules/spark-md5": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.2.tgz", - "integrity": "sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw==", - "license": "(WTFPL OR MIT)" - }, - "node_modules/split-on-first": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", - "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/split2": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", @@ -8475,15 +8291,6 @@ "node": ">= 10.x" } }, - "node_modules/strict-uri-encode": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", - "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -9343,6 +9150,7 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, "license": "0BSD" }, "node_modules/type-check": { diff --git a/package.json b/package.json index 21115b4..51c700d 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,6 @@ "dependencies": { "pinia": "^2.2.0", "pinia-plugin-unistorage": "^0.1.2", - "qcloud-iotexplorer-appdev-plugin-wificonf-blecombo": "^3.0.118", - "qcloud-iotexplorer-appdev-plugin-wificonf-core": "^3.0.118", - "qcloud-iotexplorer-appdev-sdk": "^3.0.118", - "qcloud-iotexplorer-bluetooth-adapter": "^3.0.118", "uview-plus": "^3.3.12" }, "devDependencies": { diff --git a/pages.json b/pages.json index b3f0e56..b85c5ba 100644 --- a/pages.json +++ b/pages.json @@ -14,6 +14,7 @@ { "path": "p2pPlayer", "style": { + "navigationStyle": "custom", "navigationBarTitleText": "监控", "mp-weixin": { "usingComponents": { @@ -61,13 +62,6 @@ "navigationBarTitleText": "WiFi配网", "disableScroll": true } - }, - { - "path": "selectDeviceType", - "style": { - "navigationBarTitleText": "选择设备类型", - "disableScroll": true - } } ] }, diff --git a/pages/addDevice/distributionNetwork.vue b/pages/addDevice/distributionNetwork.vue index c0a6c76..30780f7 100644 --- a/pages/addDevice/distributionNetwork.vue +++ b/pages/addDevice/distributionNetwork.vue @@ -109,23 +109,9 @@ - - diff --git a/pages/main/home.vue b/pages/main/home.vue index c41a2b9..93cdf65 100644 --- a/pages/main/home.vue +++ b/pages/main/home.vue @@ -182,7 +182,6 @@ import { deleteKeyRequest } from '@/api/key' import { deleteLockRequest } from '@/api/lock' import { setStorage, getStorage } from '@/utils/storage' - import { useSdkStore } from '@/stores/sdk' export default { data() { @@ -225,11 +224,7 @@ this.deviceInfo = await this.getDeviceInfo() const token = getStorage('token') if (token) { - await Promise.all([ - this.getLockList(this.lockSearch), - this.getUserInfo(), - this.initSdk() - ]).then(res => { + await Promise.all([this.getLockList(this.lockSearch), this.getUserInfo()]).then(res => { this.pending = false uni.hideLoading() const list = getStorage('lockList') @@ -277,7 +272,6 @@ 'resetDevice' ]), ...mapActions(useBasicStore, ['routeJump', 'getDeviceInfo', 'getNetworkType', 'shareJump']), - ...mapActions(useSdkStore, ['initSdk']), async deleteLock(lock, groupIndex, lockIndex) { const that = this const netWork = await this.getNetworkType() @@ -422,7 +416,6 @@ that.getLockList(that.lockSearch) await that.getUserInfo() that.updateLoginStatus(true) - that.initSdk() resolve(true) } else { that.updateLoginStatus(false) @@ -537,11 +530,8 @@ this.focus = false }, async toSearchDevice() { - // this.routeJump({ - // name: 'selectDeviceType' - // }) this.routeJump({ - name: 'p2pPlayer' + name: 'addLockGuid' }) }, async toLockDetail(lock) { diff --git a/pages/main/lockDetail.vue b/pages/main/lockDetail.vue index b2041be..b4de880 100644 --- a/pages/main/lockDetail.vue +++ b/pages/main/lockDetail.vue @@ -172,6 +172,13 @@ > 掌静脉 + + + 监控 + 操作记录 + + + 视频日志 + - - - + + + + + + + + + + + 长按说话 + + + + + + 挂断 + + + + + + 开锁 + + + + diff --git a/stores/basic.js b/stores/basic.js index 474f642..f62d83e 100644 --- a/stores/basic.js +++ b/stores/basic.js @@ -382,11 +382,6 @@ const pages = [ path: '/pages/setting/passageMode', tabBar: false }, - { - name: 'selectDeviceType', - path: '/pages/addDevice/selectDeviceType', - tabBar: false - }, { name: 'distributionNetwork', path: '/pages/addDevice/distributionNetwork', diff --git a/stores/sdk.js b/stores/sdk.js deleted file mode 100644 index 05cfd76..0000000 --- a/stores/sdk.js +++ /dev/null @@ -1,45 +0,0 @@ -import { defineStore } from 'pinia' -import { AppDevSdk } from 'qcloud-iotexplorer-appdev-sdk' -import { getSdkToken } from '@/api/sdk' - -export const useSdkStore = defineStore('sdk', { - state() { - return { - sdk: null - } - }, - actions: { - async getSdk() { - if (this.sdk.loginManager.isLogin) { - return this.sdk - } - await this.initSdk() - return this.sdk - }, - async initSdk() { - try { - const getAccessToken = async () => { - const { code, data, message } = await getSdkToken() - if (code === 0) { - return data - } - uni.showToast({ - title: message, - icon: 'none' - }) - return null - } - - this.sdk = await new AppDevSdk({ - appKey: 'mtBfaXFtISXFYVVsd', - getAccessToken - }) - - this.sdk.init() - } catch (error) { - console.log(111, this.sdk) - console.log('error', error) - } - } - } -})