diff --git a/src/pages/Setup.vue b/src/pages/Setup.vue index 0d4db2d..148a8d7 100644 --- a/src/pages/Setup.vue +++ b/src/pages/Setup.vue @@ -73,6 +73,7 @@ export default { options: [], value: this.$store.getters.equipId, baseUrl: this.$store.getters.baseUrl, + bgUrl: '', setTime: this.$store.getters.setTime / 1000, fullscreen: false } @@ -98,10 +99,16 @@ export default { }) return } + this.options.map(el => { + if (el.value === this.value) { + this.bgUrl = el.background_url + } + }) let obj = { baseUrl: this.baseUrl, setTime: this.setTime * 1000, - equipId: this.value + equipId: this.value, + bgUrl: this.bgUrl } this.$store.dispatch('setConfig', obj) this.$router.push('/pointstatus') diff --git a/src/pages/modules/PointStatus.vue b/src/pages/modules/PointStatus.vue index 4365423..b0fff9d 100644 --- a/src/pages/modules/PointStatus.vue +++ b/src/pages/modules/PointStatus.vue @@ -2,7 +2,9 @@
.cbox { position: relative; - width: 1920px; - height: 1080px; + /* width: 1920px; + height: 1080px; */ text-align: center; background-size: 100% 100%; } diff --git a/src/style/reset.css b/src/style/reset.css index 2a76b6a..59fe5a6 100644 --- a/src/style/reset.css +++ b/src/style/reset.css @@ -82,7 +82,7 @@ body { -khtml-user-select:none;/*早期浏览器*/ user-select:none; background-color: #050830; - background: #05032a center center / 100% 100% url(../images/screen1/bg.jpg) no-repeat; + /* background: #05032a center center / 100% 100% url(../images/screen1/bg.jpg) no-repeat; */ } div, p { diff --git a/src/vuex/modules/com.js b/src/vuex/modules/com.js index cb45083..cd8eb76 100644 --- a/src/vuex/modules/com.js +++ b/src/vuex/modules/com.js @@ -9,7 +9,8 @@ const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.10.41:8 const state = { baseUrl: getStore('baseUrl') || baseUrl, setTime: getStore('setTime') || 50000, - equipId: getStore('equipId') || '' + equipId: getStore('equipId') || '', + bgUrl: getStore('bgUrl') || '' } const actions = { @@ -17,6 +18,7 @@ const actions = { setStore('baseUrl', res.baseUrl) setStore('setTime', res.setTime) setStore('equipId', res.equipId) + setStore('bgUrl', res.bgUrl) commit(types.COM_CONFIG, res) } } @@ -24,7 +26,8 @@ const actions = { const getters = { baseUrl: state => state.baseUrl, setTime: state => state.setTime, - equipId: state => state.equipId + equipId: state => state.equipId, + bgUrl: state => state.bgUrl } const mutations = { @@ -32,6 +35,7 @@ const mutations = { state.baseUrl = res.baseUrl state.setTime = res.setTime state.equipId = res.equipId + state.bgUrl = res.bgUrl } }