Browse Source

三级目录跳转当前列表页

master
aBin 3 years ago
parent
commit
2487b08c22
  1. 12
      .env.production
  2. 8
      src/components/Location/Location.vue

12
.env.production

@ -1,10 +1,10 @@
VUE_APP_MODE=production VUE_APP_MODE=production
VUE_APP_NODE_ENV=production VUE_APP_NODE_ENV=production
VUE_APP_SCENE=/datang/ VUE_APP_SCENE=/v1.0/datang/
VUE_APP_BASE_URL=https://test.tall.wiki VUE_APP_BASE_URL=http://127.0.0.1:8000
VUE_APP_API_URL=https://test.tall.wiki/datang/v1.0 VUE_APP_API_URL=http://127.0.0.1:8000/v1.0
VUE_APP_PROXY_URL=/datang/v1.0 VUE_APP_PROXY_URL=/v1.0
VUE_APP_PUBLIC_PATH=/datang VUE_APP_PUBLIC_PATH=/v1.0/datang
VUE_APP_MSG_URL=wss://test.tall.wiki/websocket/message/v4.0/ws VUE_APP_MSG_URL=wss://127.0.0.1:8000/websocket/message/v4.0/ws
VUE_APP_TITLE=大唐 VUE_APP_TITLE=大唐
VUE_APP_DESCRIPTION=大唐 VUE_APP_DESCRIPTION=大唐

8
src/components/Location/Location.vue

@ -1001,8 +1001,7 @@ export default {
if (itemC.children && itemC.children.length) { if (itemC.children && itemC.children.length) {
for (let m = 0; m < itemC.children.length; m++) { for (let m = 0; m < itemC.children.length; m++) {
const itemD = itemC.children[m]; const itemD = itemC.children[m];
if (itemD.code === this.code && m !== 0) { if (itemD.code === this.code) {
console.log('itemC: ', itemC);
this.$router.push({ this.$router.push({
path: item.url, path: item.url,
query: { code: itemC.children[0].code }, query: { code: itemC.children[0].code },
@ -1019,26 +1018,21 @@ export default {
let titleObj = {}; let titleObj = {};
let lists = []; let lists = [];
for (let i = 0; i < this.tabList.length; i++) { for (let i = 0; i < this.tabList.length; i++) {
console.log('111111111');
if (this.tabList[i].url === path) { if (this.tabList[i].url === path) {
titleObj = { ...this.tabList[i] }; titleObj = { ...this.tabList[i] };
lists = [...this.tabList[i].children]; lists = [...this.tabList[i].children];
} }
} }
if (lists[0].children && lists[0].children.length) { if (lists[0].children && lists[0].children.length) {
console.log('2222222222');
this.$router.push({ this.$router.push({
path: titleObj.url, path: titleObj.url,
query: { code: lists[0].children[0].code }, query: { code: lists[0].children[0].code },
}); });
// this.code = lists[0].children[0].code;
} else { } else {
console.log('333333333333');
this.$router.push({ this.$router.push({
path: titleObj.url, path: titleObj.url,
query: { code: lists[0].code }, query: { code: lists[0].code },
}); });
// this.code = lists[0].code;
} }
}, },
}, },

Loading…
Cancel
Save