顶部样式

init
zhusiyu 3 years ago
parent 300aa44f8d
commit 1c3ae1bc49

@ -33,6 +33,8 @@
this.isPartyCenter = false this.isPartyCenter = false
} }
}, },
deep: true,
immediate: true
}, },
}, },
created(){ created(){
@ -40,14 +42,14 @@
}, },
mounted(){ mounted(){
this.timeFn(); this.timeFn();
// this.getHref(); //this.getHref();
}, },
methods: { methods: {
timeFn() { timeFn() {
this.timing = setInterval(() => { this.timing = setInterval(() => {
this.dateDay = formatTime(new Date(), 'HH: mm') this.dateDay = formatTime(new Date(), 'HH: mm')
this.dateYear = formatTime(new Date(), 'yyyy-MM-dd') this.dateYear = formatTime(new Date(), 'yyyy-MM-dd')
// this.dateWeek = this.weekday[new Date().getDay()] //this.dateWeek = this.weekday[new Date().getDay()]
}, 100) }, 100)
}, },
getHref(){ getHref(){

@ -87,6 +87,7 @@
layoutData: {}, layoutData: {},
showWorkBenchButton: true,// showWorkBenchButton: true,//
isPartyCenter: false, isPartyCenter: false,
href: '',
} }
}, },
computed: { computed: {
@ -106,11 +107,13 @@
this.topImgUrl = topImgPartyBuild this.topImgUrl = topImgPartyBuild
this.isPartyCenter = true this.isPartyCenter = true
} else { } else {
this.topImgUrl = topImg01
this.isPartyCenter = false this.isPartyCenter = false
} }
}, },
// //
deep: true deep: true,
immediate: true,
} }
}, },
beforeMount(){ beforeMount(){
@ -133,12 +136,12 @@
}, },
methods: { methods: {
getHref(){ getHref(){
let href = window.location.href this.href = window.location.hash
href = window.location.href.slice(window.location.href.indexOf('#') + 1) if (this.href === '#/partyCenter/party') {
if (href === '/partyCenter/party') {
this.topImgUrl = topImgPartyBuild this.topImgUrl = topImgPartyBuild
this.isPartyCenter = true this.isPartyCenter = true
} else { } else {
this.topImgUrl = topImg01
this.isPartyCenter = false this.isPartyCenter = false
} }
}, },
@ -205,6 +208,9 @@
this.topImgUrl = topImg02; this.topImgUrl = topImg02;
this.showWorkBenchButton = true; this.showWorkBenchButton = true;
} }
} else if (this.href === '#/partyCenter/party') {
this.topImgUrl = topImgPartyBuild
this.isPartyCenter = true
} else { } else {
this.rightWidth = 30; this.rightWidth = 30;
this.topImgUrl = topImg01; this.topImgUrl = topImg01;

Loading…
Cancel
Save