Browse Source

通知公告跳转界面

master
aBin 3 years ago
parent
commit
0d70b7e964
  1. 11
      src/components/LeftNav/LeftNav.vue
  2. 2
      src/views/OtherPages/NoticeNotice.vue

11
src/components/LeftNav/LeftNav.vue

@ -58,20 +58,21 @@ export default {
methods: {
changeQuery(code, url, item) {
console.log('code, url, item: ', code, url, item);
console.log('url: ', url);
let childCode = code;
if (item && item.children && item.children.length) {
childCode = item.children[0].code;
}
if (!url) {
if (this.code && code !== this.code) {
// this.$router.push({ query: { code: childCode } });
const path = window.location.href.split('?')
window.location.href= path[0]+`?code=${childCode}`
const path = window.location.href.split('?');
window.location.href = path[0] + `?code=${childCode}`;
this.$emit('changeCode', code);
this.childCode = code;
} else if (code === this.code) {
const path = window.location.href.split('?')
window.location.href= path[0]+`?code=${code}`
const path = window.location.href.split('?');
window.location.href = path[0] + `?code=${code}`;
}
} else {
if (url === '/') {

2
src/views/OtherPages/NoticeNotice.vue

@ -127,7 +127,7 @@ export default {
},
changeCode(code) {
this.code = code;
this.introId = '';
// this.introId = '';
},
changeYear(year) {
this.year = year;

Loading…
Cancel
Save