浏览器图标调整
This commit is contained in:
parent
8b2e1d2d29
commit
80864b13e4
87
src/App.vue
87
src/App.vue
@ -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
BIN
src/assets/icon/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/icon/favicon_xty.png
Normal file
BIN
src/assets/icon/favicon_xty.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 97 KiB |
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user