提交添加战术计算、添加头部设置
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div class="header_top">
|
||||
<!-- <svg-icon icon-class="Head" :class-name="['headItem']"></svg-icon> -->
|
||||
<img style="width:100%;" :src="require('@/assets/images/shijingjun/' + skinInfo + '/head.png')" alt="" />
|
||||
<img v-if="!headImage" class="header_img" alt="" />
|
||||
<img v-else-if="headImage === 'default'" class="header_img" :src="require('@/assets/images/jianchuang/' + skinInfo + '/head.png')" alt="" />
|
||||
<img v-else class="header_img" :src="headImage" alt="" />
|
||||
<div class="dateTime">
|
||||
<span>{{ date.ymd }}</span>
|
||||
<span>{{ $t("headerTitles.week")[date.week] }}</span>
|
||||
@ -42,11 +44,13 @@ export default {
|
||||
ymd: "2023/11/20",
|
||||
week: "1",
|
||||
},
|
||||
flag: false,
|
||||
showSystem: false, //设置框
|
||||
head: "",
|
||||
head: null,
|
||||
skinInfo: JSON.parse(localStorage.getItem("systemSetting")).skinInfo,
|
||||
appVersion: localStorage.getItem("appVersion"),
|
||||
batteryInfo: "",
|
||||
headImage: ''
|
||||
};
|
||||
},
|
||||
beforeMount() {
|
||||
@ -55,6 +59,10 @@ export default {
|
||||
//
|
||||
// this.head = res;
|
||||
// });
|
||||
let header = localStorage.getItem("header")
|
||||
if (header) {
|
||||
this.head = JSON.parse(header)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.setTime()
|
||||
@ -68,8 +76,45 @@ export default {
|
||||
if (e.key == "systemSetting") {
|
||||
let obj = JSON.parse(e.newValue);
|
||||
that.skinInfo = obj.skinInfo;
|
||||
if(this.head) {
|
||||
switch (that.skinInfo) {
|
||||
case 'yingguangse':
|
||||
that.headImage = that.head.header1
|
||||
break;
|
||||
case 'gonganlan':
|
||||
that.headImage = that.head.header2
|
||||
break;
|
||||
case 'hong':
|
||||
that.headImage = that.head.header3
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
that.headImage = 'default'
|
||||
}
|
||||
}
|
||||
});
|
||||
this.$recvChanel("header", () => {
|
||||
let header = localStorage.getItem("header")
|
||||
that.head = JSON.parse(header)
|
||||
if (that.head) {
|
||||
switch (that.skinInfo) {
|
||||
case 'yingguangse':
|
||||
that.headImage = that.head.header1
|
||||
break;
|
||||
case 'gonganlan':
|
||||
that.headImage = that.head.header2
|
||||
break;
|
||||
case 'hong':
|
||||
that.headImage = that.head.header3
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
that.headImage = 'default'
|
||||
}
|
||||
|
||||
})
|
||||
this.$recvChanel("batteryInfo", (data) => {
|
||||
if (data.isShow) {
|
||||
this.batteryInfo = data.title;
|
||||
@ -126,6 +171,13 @@ export default {
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 19;
|
||||
.header_img {
|
||||
width:100%;
|
||||
height: 100%;
|
||||
}
|
||||
.header_img:not([src]){
|
||||
opacity:0;
|
||||
}
|
||||
|
||||
.dateTime {
|
||||
position: absolute;
|
||||
|
||||
Reference in New Issue
Block a user