diff --git a/manifest.json b/manifest.json index 83969b1..3e03524 100644 --- a/manifest.json +++ b/manifest.json @@ -1,182 +1,183 @@ { - "name" : "芯程物联", - "appid" : "__UNI__BEE3050", - "description" : "开源物联网平台", - "versionName" : "2.2.0", - "versionCode" : 200, - "transformPx" : false, - "app-plus" : { - "kernel" : { - "ios" : "WKWebview" - }, - "usingComponents" : true, - "nvueCompiler" : "uni-app", - "compilerVersion" : 3, - "splashscreen" : { - "alwaysShowBeforeRender" : true, - "waiting" : true, - "autoclose" : true, - "delay" : 0 - }, - "modules" : { - "Barcode" : {}, - "OAuth" : {}, - "Camera" : {} - }, - "distribute" : { - "android" : { - "permissions" : [ - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "minSdkVersion" : 22, - "targetSdkVersion" : 30, - "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ], - "permissionExternalStorage" : { - "request" : "none", - "prompt" : "应用保存运行状态等信息,需要获取读写手机存储权限,请允许。" - }, - "permissionPhoneState" : { - "request" : "none", - "prompt" : "为保证您正常、安全地使用,需要获取设备识别码使用权限,请允许。" - } - }, - "ios" : { - "idfa" : true, - "privacyDescription" : { - "NSLocationAlwaysUsageDescription" : "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。", - "NSLocationAlwaysAndWhenInUseUsageDescription" : "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。", - "NSLocalNetworkUsageDescription" : "允许访问蜂窝网络,用于扫码/关联式添加设备", - "NSLocationWhenInUseUsageDescription" : "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。" - }, - "dSYMs" : false - }, - "sdkConfigs" : { - "push" : {}, - "statics" : {}, - "maps" : {}, - "ad" : {}, - "oauth" : { - "weixin" : { - "appid" : "wx6be3f0d7bf7154e1", - "appsecret" : "b6c1d0da60bd5250857d211cdc64fdc9", - "UniversalLinks" : "" - } - } - }, - "splashscreen" : { - "iosStyle" : "common", - "androidStyle" : "common", - "alwaysShowBeforeRender" : false, - "waiting" : true, - "autoclose" : false, - "delay" : 0, - "android" : { - "hdpi" : "./static/logo.9.png", - "xhdpi" : "./static/logo.9.png", - "xxhdpi" : "./static/logo.9.png" - } - }, - "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" - } - } - } - }, - "uniStatistics" : { - "enable" : false - }, - "nativePlugins" : {} - }, - "quickapp" : {}, - "mp-weixin" : { - "appid" : "wx5bfbadf52adc17f3", - "setting" : { - "urlCheck" : false, - "minified" : true - }, - "usingComponents" : true, - "uniStatistics" : { - "enable" : false - }, - "optimization" : { - "subPackages" : true - }, - "permission" : { - "scope.userLocation" : { - "desc" : "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。" - } - }, - "requiredPrivateInfos" : [ "getLocation" ], - "lazyCodeLoading" : "requiredComponents" - }, - "mp-alipay" : { - "usingComponents" : true - }, - "mp-baidu" : { - "usingComponents" : true - }, - "mp-toutiao" : { - "usingComponents" : true - }, - "uniStatistics" : { - "enable" : false - }, - "h5" : { - "title" : "芯程物联", - "router" : { - "mode" : "hash", - "base" : "./" - }, - "devServer" : { - "port" : 8090 - }, - "optimization" : { - "treeShaking" : { - "enable" : false - } - }, - "template" : "uni_modules/jessibuca/hybrid/index.html", - "sdkConfigs" : { - "maps" : { - "qqmap" : { - "key" : "4PDBZ-4KQKU-AX6VO-GU7NB-INDZJ-YBFXC" - } - } - } - } -} + "name": "芯程物联", + "appid": "__UNI__BEE3050", + "description": "开源物联网平台", + "versionName": "2.2.0", + "versionCode": 200, + "transformPx": false, + "app-plus": { + "kernel": { + "ios": "WKWebview" + }, + "usingComponents": true, + "nvueCompiler": "uni-app", + "compilerVersion": 3, + "splashscreen": { + "alwaysShowBeforeRender": true, + "waiting": true, + "autoclose": true, + "delay": 0 + }, + "modules": { + "Barcode": {}, + "OAuth": {}, + "Camera": {} + }, + "distribute": { + "android": { + "permissions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "minSdkVersion": 22, + "targetSdkVersion": 30, + "abiFilters": ["armeabi-v7a", "arm64-v8a"], + "permissionExternalStorage": { + "request": "none", + "prompt": "应用保存运行状态等信息,需要获取读写手机存储权限,请允许。" + }, + "permissionPhoneState": { + "request": "none", + "prompt": "为保证您正常、安全地使用,需要获取设备识别码使用权限,请允许。" + } + }, + "ios": { + "idfa": true, + "privacyDescription": { + "NSLocationAlwaysUsageDescription": "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。", + "NSLocationAlwaysAndWhenInUseUsageDescription": "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。", + "NSLocalNetworkUsageDescription": "允许访问蜂窝网络,用于扫码/关联式添加设备", + "NSLocationWhenInUseUsageDescription": "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。" + }, + "dSYMs": false + }, + "sdkConfigs": { + "push": {}, + "statics": {}, + "maps": {}, + "ad": {}, + "oauth": { + "weixin": { + "appid": "wx6be3f0d7bf7154e1", + "appsecret": "b6c1d0da60bd5250857d211cdc64fdc9", + "UniversalLinks": "" + } + } + }, + "splashscreen": { + "iosStyle": "common", + "androidStyle": "common", + "alwaysShowBeforeRender": false, + "waiting": true, + "autoclose": false, + "delay": 0, + "android": { + "hdpi": "./static/logo.9.png", + "xhdpi": "./static/logo.9.png", + "xxhdpi": "./static/logo.9.png" + } + }, + "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" + } + } + } + }, + "uniStatistics": { + "enable": false + }, + "nativePlugins": {} + }, + "quickapp": {}, + "mp-weixin": { + "appid": "wx5bfbadf52adc17f3", + "setting": { + "urlCheck": false, + "minified": true + }, + "usingComponents": true, + "uniStatistics": { + "enable": false + }, + "optimization": { + "subPackages": true + }, + "permission": { + "scope.userLocation": { + "desc": "便于您使用该功能获取当前位置天气情况、WIFI列表等场景。" + } + }, + "requiredPrivateInfos": ["getLocation"], + "lazyCodeLoading": "requiredComponents" + }, + "mp-alipay": { + "usingComponents": true + }, + "mp-baidu": { + "usingComponents": true + }, + "mp-toutiao": { + "usingComponents": true + }, + "uniStatistics": { + "enable": false + }, + "sassImplementationName": "node-sass", + "h5": { + "title": "芯程物联", + "router": { + "mode": "hash", + "base": "./" + }, + "devServer": { + "port": 8090 + }, + "optimization": { + "treeShaking": { + "enable": false + } + }, + "template": "uni_modules/jessibuca/hybrid/index.html", + "sdkConfigs": { + "maps": { + "qqmap": { + "key": "4PDBZ-4KQKU-AX6VO-GU7NB-INDZJ-YBFXC" + } + } + } + } +} \ No newline at end of file diff --git a/pages/tabBar/scene/index.vue b/pages/tabBar/scene/index.vue index 688dc8c..8e614b0 100644 --- a/pages/tabBar/scene/index.vue +++ b/pages/tabBar/scene/index.vue @@ -113,14 +113,14 @@ } from '@/apis/modules/scene'; export default { - beforeRouteEnter (to, from, next) { + beforeRouteEnter(to, from, next) { // 在进入路由前执行一些操作,例如加载数据等 next(vm => { // 这里可以访问组件实例 `vm` vm.onLoad() // 执行加载操作 }) }, - data () { + data() { return { deleteId: '', isDelete: false, @@ -152,13 +152,13 @@ loadmoreStatus: 'loadmore', // 刷新和加载相关 }; }, - onLoad () { + onLoad() { this.getToken(); if (this.token != '' && this.token != null) { this.getList(); } }, - onShow () { + onShow() { // #ifdef MP-WEIXIN // 检查用户是否登录 if (!this.isLogin()) { @@ -183,7 +183,7 @@ // #endif }, methods: { - getToken () { + getToken() { // 本地缓存获取token this.token = uni.getStorageSync('token'); // vuex存储token @@ -191,13 +191,13 @@ console.log(this.token) }, //删除 - handleDelete (item) { + handleDelete(item) { this.isDelete = true; this.deleteId = item.sceneId; this.deleteContent = `确定删除“${item.sceneName}”?` }, // 确认删除 - handleConfirmDelete () { + handleConfirmDelete() { delScene(this.deleteId).then(res => { if (res.code === 200) { this.list = []; @@ -215,7 +215,7 @@ }); }, //判断是否登录 - isLogin () { + isLogin() { if (this.token == '' || this.token == null) { return false; } else { @@ -223,21 +223,21 @@ } }, // 场景状态改变事件 - handleStatusChange (item) { + handleStatusChange(item) { this.list = []; this.queryParams.enable = item.id; this.queryParams.pageNum = 1; this.getList(); }, // 场景列表 - goToSceneList () { + goToSceneList() { uni.navigateTo({ url: '/pagesA/scene/list' }); this.isMenu = false; }, // 新增场景 - handleAddScene () { + handleAddScene() { // 使用vuex会导致小程序性能问题所以存储本地 let sceneData = { sceneId: null, @@ -264,7 +264,7 @@ }); }, // 场景详情 - handleSceneDetail (id) { + handleSceneDetail(id) { const storage = uni.getStorageSync('sceneData'); if (storage) { uni.removeStorageSync('sceneData'); @@ -290,7 +290,7 @@ }); }, // 获取条件 - getCondName (cond) { + getCondName(cond) { if (cond === 1) { return this.$tt('scene.anyCondition') } else if (cond === 2) { @@ -301,7 +301,7 @@ return this.$tt('scene.unknown') } }, - getExecuteModeName (mode) { + getExecuteModeName(mode) { if (mode === 1) { return this.$tt('scene.serial') } else if (mode === 2) { @@ -311,7 +311,7 @@ } }, // 获取场景列表 - getList () { + getList() { listScene(this.queryParams) .then(res => { const { @@ -327,16 +327,16 @@ }); }, // 搜索 - handleSearch () { + handleSearch() { this.list = []; this.queryParams.pageNum = 1; this.getList(); }, - handleClearSearch () { + handleClearSearch() { this.handleSearch(); }, // 下拉刷新 - onPullDownRefresh () { + onPullDownRefresh() { console.log('下拉刷新'); this.list = []; this.total = 0; @@ -348,7 +348,7 @@ }, 1000); }, // 上拉加载 - onReachBottom () { + onReachBottom() { console.log('上拉加载'); this.loadmoreStatus = 'loading'; this.queryParams.pageNum = ++this.queryParams.pageNum; @@ -363,7 +363,7 @@ }, 1000); }, //执行一次 - handleRunOnce (data) { + handleRunOnce(data) { const params = { sceneId: data.sceneId }; @@ -375,7 +375,7 @@ }); }, // 切换状态 - handleSwitchStatus (data) { + handleSwitchStatus(data) { const params = { sceneId: data.sceneId, enable: data.enable, @@ -488,7 +488,7 @@ } // 小程序中popup坑 - /deep/ .u-safe-bottom { + ::v-deep .u-safe-bottom { display: none; } } diff --git a/pages/tabBar/user/user.vue b/pages/tabBar/user/user.vue index bbcde96..d34fbe9 100644 --- a/pages/tabBar/user/user.vue +++ b/pages/tabBar/user/user.vue @@ -144,13 +144,22 @@