From 043aabc3738928b58f9e572c12cb5d368dc64e78 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Fri, 13 May 2022 17:58:54 +0800 Subject: [PATCH 1/6] add index isPermissionShowTab --- src/pages/index/index.vue | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 3ba4f50..19eaf9d 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -34,14 +34,15 @@ - - - - - {{e.name}} + + + + + + {{e.name}} + - - + @@ -183,6 +184,14 @@ // #endif }, methods: { + // 账号有开启了权限的才显示菜单,否则不显示【ID1000840】 + isPermissionShowTab(e){ + let { indexData } = this; + if(indexData&&Object.prototype.toString.call(indexData.permission) === '[object Object]'){ + return indexData.permission[e.serverKey] + } + return false; + }, toNoticeList(){ if(!app.isLogin())return this.showAuthor(); util.routeTo(`/pages/message/list/list`,'nT'); From 43b401e211c115e8fce77e965e5192e025955f30 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Mon, 16 May 2022 16:18:14 +0800 Subject: [PATCH 2/6] add device tab author --- src/subpackage/device/js/device_api.js | 4 ++ src/subpackage/device/pages/index/index.vue | 57 +++++++++++++++++++++++------ 2 files changed, 50 insertions(+), 11 deletions(-) diff --git a/src/subpackage/device/js/device_api.js b/src/subpackage/device/js/device_api.js index 80c9df3..ff6be99 100644 --- a/src/subpackage/device/js/device_api.js +++ b/src/subpackage/device/js/device_api.js @@ -58,6 +58,10 @@ export const DEVICE_API = { // 20211015 orderRefund:`${ORIGIN}/admin/stadium/order/refund`, // 订场/次卡退款 + + // 【ID1000841】 20220516 小程序-商家助手菜单入口权限优化 + hardwareTypeList:`${ORIGIN}/admin/stadium/hardwareType/list`, // 设备权限列表 + } diff --git a/src/subpackage/device/pages/index/index.vue b/src/subpackage/device/pages/index/index.vue index b020bf3..7163596 100644 --- a/src/subpackage/device/pages/index/index.vue +++ b/src/subpackage/device/pages/index/index.vue @@ -20,10 +20,13 @@ - - - {{e.name || ''}} - + + + + {{e.name || ''}} + + + @@ -37,7 +40,6 @@ import deviceApi from '../../js/device_api'; const rootPage = '/subpackage/device' const tabArr = [ - {id: 1, name: '照明', path: `/pages/switch_manage/switch_manage`}, {id: 2, name: '空调', path: `/pages/switch_manage/switch_manage`}, {id: 3, name: '风扇', path: `/pages/switch_manage/switch_manage`}, @@ -57,7 +59,6 @@ const tabArr = [ // {id: 17, name: '窗帘', path: `/pages/switch_manage/switch_manage`}, {id: 18, name: '路由器', path: `/pages/switch_manage/switch_manage`}, {id: 19, name: '物联卡', path: `/pages/switch_manage/switch_manage`}, - ]; import { mapState } from 'vuex' export default { @@ -69,7 +70,6 @@ export default { storeList: state => state.device.storeList, curStoreInfo: state => state.device.curStoreInfo, }), - getTop(){ return (lineHeight)=>{ // #ifdef MP-WEIXIN @@ -80,12 +80,27 @@ export default { return top } }, + // + showHardwareIdLs(){ + let { hardwareTypeList } = this; + let _ls = hardwareTypeList || []; + let _fls = _ls.filter(ele=>ele.stadium_has); + let _idLs = _fls.map(el => el.mini_local_menu_id); + return _idLs || []; + }, + }, + watch: { + curStoreInfo(nw, od){ + console.warn(od.id, nw.id); + this.getHardwareTypeList(); + } }, data(){ return { - tabArr, - deviceInfo:"" - } + tabArr: [], + deviceInfo:"", + hardwareTypeList: [], + } }, async onLoad(){ try{ @@ -93,6 +108,7 @@ export default { let _brandInfo = await this.$store.dispatch('getBrandInfo'); await this.$store.dispatch('getStoreList'); this.updateAC(); + await this.getHardwareTypeList(); util.hideLoad(); }catch(err){ util.hideLoad(); @@ -100,9 +116,28 @@ export default { }, onShow() { - this.updateAC()//更新中控信息 + this.updateAC() // 更新中控信息 }, methods: { + isShowHardwareTab(e){ + let { showHardwareIdLs } = this; + if(!showHardwareIdLs || !showHardwareIdLs.length)return false; + return showHardwareIdLs.includes(e.id); + }, + getHardwareTypeList(){ + let { curStoreInfo } = this; + this.tabArr = []; + return deviceServer.get({ + url: deviceApi.hardwareTypeList, + data: { stadium_id: curStoreInfo.id }, + failMsg: '加载设备类型列表失败!' + }) + .then(res=>{ + let _ls = res || []; + if(_ls&&_ls.length)this.tabArr = tabArr; + return this.hardwareTypeList = _ls || []; + }) + }, copyDeviceID(){ let that = this uni.setClipboardData({ From 646f7bab7c8f2bf6300e779c2fa9532da1700911 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Thu, 26 May 2022 11:19:18 +0800 Subject: [PATCH 3/6] change air conditioner ext --- src/subpackage/device/pages/air_conditioner/detail/detail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subpackage/device/pages/air_conditioner/detail/detail.vue b/src/subpackage/device/pages/air_conditioner/detail/detail.vue index c740500..1bbe9f6 100644 --- a/src/subpackage/device/pages/air_conditioner/detail/detail.vue +++ b/src/subpackage/device/pages/air_conditioner/detail/detail.vue @@ -275,7 +275,7 @@ export default { setExt({query, value}){ if(query.data.toString() !== '[object Object]')query.data = {}; if(query.data.value.toString() !== '[object Object]')query.data.value = {}; - query.data&&query.data.value&&(query.data.value.ext = value); + query.data&&query.data.value&&(query.data.value.ext = value + ''); return query; }, setOp({query, value}){ From f8b7e174b849e03b6b171d5384330ae70f585ad3 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Thu, 26 May 2022 16:28:01 +0800 Subject: [PATCH 4/6] change air contral ext --- src/subpackage/device/pages/air_conditioner/detail/detail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subpackage/device/pages/air_conditioner/detail/detail.vue b/src/subpackage/device/pages/air_conditioner/detail/detail.vue index c740500..1bbe9f6 100644 --- a/src/subpackage/device/pages/air_conditioner/detail/detail.vue +++ b/src/subpackage/device/pages/air_conditioner/detail/detail.vue @@ -275,7 +275,7 @@ export default { setExt({query, value}){ if(query.data.toString() !== '[object Object]')query.data = {}; if(query.data.value.toString() !== '[object Object]')query.data.value = {}; - query.data&&query.data.value&&(query.data.value.ext = value); + query.data&&query.data.value&&(query.data.value.ext = value + ''); return query; }, setOp({query, value}){ From b77881735a2656b2a6437ab7349bd50ef450e53b Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Wed, 1 Jun 2022 10:30:56 +0800 Subject: [PATCH 5/6] vtest 1.1.24 --- src/store/mutations.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/store/mutations.js b/src/store/mutations.js index 99d4083..0918706 100644 --- a/src/store/mutations.js +++ b/src/store/mutations.js @@ -1,6 +1,5 @@ // 同步方法 - export default { // 设置品牌信息 setBrandInfo(state, brandInfo){ From 0c7acd6878616c4864e8155a4680ffea6515ffb3 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Wed, 1 Jun 2022 10:43:05 +0800 Subject: [PATCH 6/6] v 1.1.24 formal --- src/js/api.js | 4 ++-- src/manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/api.js b/src/js/api.js index 095333b..3c9fff4 100644 --- a/src/js/api.js +++ b/src/js/api.js @@ -1,5 +1,5 @@ -export const ORIGIN = `https://testmanager.ouxuanzhineng.cn`; // 测试 -// export const ORIGIN = `https://minimanage.ouxuanzhineng.cn`; // 正式 +// export const ORIGIN = `https://testmanager.ouxuanzhineng.cn`; // 测试 +export const ORIGIN = `https://minimanage.ouxuanzhineng.cn`; // 正式 // export const ORIGIN = `http://192.168.1.135:9090`; // 20210927 测试 diff --git a/src/manifest.json b/src/manifest.json index 98b6d1a..a5b378a 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -55,7 +55,7 @@ /* 快应用特有相关 */ "mp-weixin" : { /* 微信小程序特有相关 */ - "appid" : "wx7106e84614cf0060", + "appid" : "wxf1294b279ad1b845", "setting" : { "urlCheck" : false },