浏览器图标调整

This commit is contained in:
fan 2019-11-06 10:42:08 +08:00
parent 8b2e1d2d29
commit 80864b13e4
4 changed files with 53 additions and 42 deletions

View File

@ -10,50 +10,53 @@ import { handleToken } from '@/utils/auth';
import { creatSubscribe, perpetualTopic } from '@/utils/stomp';
import DeomonTopic from '@/views/demonstration/deomonTopic';
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
import { ProjectIcon } from '@/scripts/ConstDic';
export default {
name: 'App',
components: {
DeomonTopic
},
mixins: [
WindowResizeHandler
],
watch: {
'$store.state.socket.roomInvite': function (val) {
if (val.creatorId) {
this.subscribeMessage(val);
}
}
},
mounted() {
this.prohibitSystemContextMenu();
this.subscribe();
},
methods: {
resizeHandler() {
this.$store.dispatch('app/resize', {width: this._clientWidth, height: this._clientHeight});
},
prohibitSystemContextMenu() {
window.document.oncontextmenu = function () {
return false;
};
},
subscribe() {
this.$nextTick(() => {
if (!this.$route.path.includes('/login') && this.$route.path != '/404') {
const header = { group: '', 'X-Token': handleToken() };
creatSubscribe(perpetualTopic, header);
}
});
},
subscribeMessage(res) {
if (this.$refs.deomonTopic) {
this.$refs.deomonTopic.doShow(res);
this.$store.dispatch('socket/setRoomInvite');
}
}
}
name: 'App',
components: {
DeomonTopic
},
mixins: [
WindowResizeHandler
],
watch: {
'$store.state.socket.roomInvite': function (val) {
if (val.creatorId) {
this.subscribeMessage(val);
}
}
},
mounted() {
this.prohibitSystemContextMenu();
this.subscribe();
const project = window.sessionStorage.getItem('project');
document.querySelector("link[rel*='icon']").href = ProjectIcon[project];
},
methods: {
resizeHandler() {
this.$store.dispatch('app/resize', {width: this._clientWidth, height: this._clientHeight});
},
prohibitSystemContextMenu() {
window.document.oncontextmenu = function () {
return false;
};
},
subscribe() {
this.$nextTick(() => {
if (!this.$route.path.includes('/login') && this.$route.path != '/404') {
const header = { group: '', 'X-Token': handleToken() };
creatSubscribe(perpetualTopic, header);
}
});
},
subscribeMessage(res) {
if (this.$refs.deomonTopic) {
this.$refs.deomonTopic.doShow(res);
this.$store.dispatch('socket/setRoomInvite');
}
}
}
};
</script>

BIN
src/assets/icon/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

View File

@ -2198,12 +2198,20 @@ export const IbpOperation = {
};
import LangStorage from '@/utils/lang';
import Favicon from '@/assets/icon/favicon.png';
import FaviconXty from '@/assets/icon/favicon_xty.png';
export const loginTitle = {
xty: '西安铁路职业技术学院城市轨道交通实训平台',
login: LangStorage.getLang() == 'en' ? ' Urban Rail Transit Practical Training Platform' : '城市轨道交通实训平台',
design: LangStorage.getLang() == 'en' ? ' Urban Rail Transit Design Platform' : '城市轨道交通设计平台',
designxty: '西安铁路职业技术学院城市轨道交通设计平台'
};
export const ProjectIcon = {
xty: FaviconXty,
login: Favicon,
design: Favicon,
designxty: FaviconXty
};
export const ProjectCode = {
xty: 'XTY',