From 11384c914ace4cc7742ded189d7e4596b9f08f2b Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Fri, 28 Jul 2023 17:53:18 +0800 Subject: [PATCH] change style id1350 --- src/pages/index/index.vue | 29 +- src/store/actions.js | 1 + src/store/device.js | 10 +- .../device/components/store_name/store_name.vue | 2 +- .../device/pages/air_conditioner/detail/detail.vue | 14 +- .../device/pages/audio_manage/audio_manage.vue | 531 +++++++++++---------- .../device/pages/device_manage/device_manage.vue | 28 +- src/subpackage/device/pages/index/index.vue | 246 ++++++---- .../device/pages/switch_manage/switch_manage.vue | 103 ++-- .../static/images/air_conditioner/nw_close.png | Bin 0 -> 2553 bytes .../static/images/air_conditioner/nw_open.png | Bin 0 -> 2347 bytes src/subpackage/device/static/images/arrow_1a.png | Bin 0 -> 225 bytes src/subpackage/device/static/images/close.png | Bin 816 -> 2553 bytes src/subpackage/device/static/images/electrify.png | Bin 0 -> 2612 bytes src/subpackage/device/static/images/i_txt.png | Bin 11208 -> 2572 bytes src/subpackage/device/static/images/i_voice_1.png | Bin 2479 -> 2551 bytes src/subpackage/device/static/images/in.png | Bin 950 -> 2252 bytes src/subpackage/device/static/images/longOpen.png | Bin 6449 -> 2864 bytes src/subpackage/device/static/images/open.png | Bin 924 -> 2347 bytes src/subpackage/device/static/images/out.png | Bin 1033 -> 2489 bytes src/subpackage/device/static/images/outage.png | Bin 0 -> 2563 bytes src/subpackage/device/static/images/page_bg.jpg | Bin 0 -> 10607 bytes src/subpackage/device/static/images/timing.png | Bin 1345 -> 2788 bytes 23 files changed, 536 insertions(+), 428 deletions(-) create mode 100644 src/subpackage/device/static/images/air_conditioner/nw_close.png create mode 100644 src/subpackage/device/static/images/air_conditioner/nw_open.png create mode 100644 src/subpackage/device/static/images/arrow_1a.png create mode 100644 src/subpackage/device/static/images/electrify.png create mode 100644 src/subpackage/device/static/images/outage.png create mode 100644 src/subpackage/device/static/images/page_bg.jpg diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index bc4a991..64f6c73 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -7,18 +7,20 @@ 点击登陆 - 今日总收入 - {{loginStatus?'¥':''}}{{loginStatus?(indexData.amount || '0'):'***'}} - - - 收款笔数 - {{loginStatus?(indexData.in_count || '0'):'**'}} - - - 退款笔数 - {{loginStatus?(indexData.out_count || '0'):'**'}} + + 今日总收入 + {{loginStatus?'¥':''}}{{loginStatus?(indexData.amount || '0'):'***'}} + + + 收款笔数 + {{loginStatus?(indexData.in_count || '0'):'**'}} + + + 退款笔数 + {{loginStatus?(indexData.out_count || '0'):'**'}} + - + @@ -375,11 +377,12 @@ } .ic-header{ position: relative; - height: 476upx; + height: auto; margin-bottom: 24upx; - padding: 38upx 24upx 0; + padding: 38upx 24upx 30upx; border-radius: 14upx; background-color: $themeColor; + overflow: hidden; .ih-address{ margin-bottom: 26upx; @include centerFlex(center); diff --git a/src/store/actions.js b/src/store/actions.js index 73e1a6d..e195e2a 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -3,6 +3,7 @@ import { servers } from '../js/server'; import { API } from '../js/api'; export default { getBrandInfo({commit, state}){ + if(state?.brandInfo?.brand?.id)return Promise.resolve(state.brandInfo); return servers.get({ url: API.calc, data: {}, diff --git a/src/store/device.js b/src/store/device.js index 298c35a..9b8c841 100644 --- a/src/store/device.js +++ b/src/store/device.js @@ -17,7 +17,7 @@ export default { } }, actions: { // 小程序模块化访问失败 this.$store.dispatch('device/getStoreList') - getStoreList({ commit, state , rootState}){ + getStoreList({ commit, state , rootState}, { stadium_id = '' } = {}){ return deviceServer.get({ url: deviceApi.stadiumList, data: { brand_id: rootState.brandInfo.brand.id }, @@ -26,7 +26,13 @@ export default { .then(res=>{ let _list = res.list || []; commit('setStoreList', _list); - if(JSON.stringify(state.curStoreInfo) == '{}'&&_list.length)commit('setStoreInfo', _list[0]); + if(Object.keys(state.curStoreInfo)?.length ===0&&_list?.length){ + if(stadium_id&&_list.some(item=>item.id===stadium_id)){ + commit('setStoreInfo', _list.find(item=>item.id===stadium_id)); + }else{ + commit('setStoreInfo', _list[0]); + } + } return res; }) } diff --git a/src/subpackage/device/components/store_name/store_name.vue b/src/subpackage/device/components/store_name/store_name.vue index 4dfc364..764c308 100644 --- a/src/subpackage/device/components/store_name/store_name.vue +++ b/src/subpackage/device/components/store_name/store_name.vue @@ -17,7 +17,7 @@ export default { curStoreInfo: state => state.device.curStoreInfo, }), getThemeIcon(){ - return ()=> {return (this.theme=='light')?'../../static/images/arrow_b2_light.png':'../../static/images/arrow_b2.png';} + return ()=> {return (this.theme=='light')?'../../static/images/arrow_b2_light.png':'../../static/images/arrow_1a.png';} }, getThemeColor(){ return ()=> {return (this.theme=='light')?'#FFFFFF':'#1a1a1a';} diff --git a/src/subpackage/device/pages/air_conditioner/detail/detail.vue b/src/subpackage/device/pages/air_conditioner/detail/detail.vue index 1bbe9f6..bfea9a7 100644 --- a/src/subpackage/device/pages/air_conditioner/detail/detail.vue +++ b/src/subpackage/device/pages/air_conditioner/detail/detail.vue @@ -26,11 +26,11 @@ - + - + @@ -315,6 +315,11 @@ export default { + diff --git a/src/subpackage/device/pages/device_manage/device_manage.vue b/src/subpackage/device/pages/device_manage/device_manage.vue index 4362f90..26553ba 100644 --- a/src/subpackage/device/pages/device_manage/device_manage.vue +++ b/src/subpackage/device/pages/device_manage/device_manage.vue @@ -109,7 +109,10 @@ export default { curStoreInfo(newVal, oldVal){ let { pageInfo } = this; this.deviceList = []; - this.getDeviceList(pageInfo) + this.getDeviceList({ + stadium_id: newVal.id, + hardware_type: pageInfo.deviceType, + }) } }, components: { @@ -126,7 +129,10 @@ export default { let _pageInfo = dmObj[`d${options.sid}`] || {}; this.pageInfo = _pageInfo; uni.setNavigationBarTitle({ title: _pageInfo.name }); - this.getDeviceList(_pageInfo) + this.getDeviceList({ + stadium_id: options.stadium_id, + hardware_type: _pageInfo.deviceType, + }) }, methods: { refreshBtn: util.debounce(function({deviceInfo, index}){ @@ -228,14 +234,13 @@ export default { } }) }, - getDeviceList(pageInfo){ - let { curStoreInfo } = this; + getDeviceList({ stadium_id, hardware_type }){ util.showLoad(); deviceServer.get({ url: deviceApi.hardwareList, data: { - 'filter[stadium_id]': curStoreInfo.id, - 'filter[hardware_type]': pageInfo.deviceType, + 'filter[stadium_id]': stadium_id, + 'filter[hardware_type]': hardware_type, }, failMsg: '加载设备失败!' }) @@ -284,6 +289,11 @@ export default {