Browse Source

公司简介默认标题获取

master
aBin 3 years ago
parent
commit
f1a591bba2
  1. BIN
      dist.zip
  2. 16
      src/views/CompanyProfile/CompanyProfile.vue

BIN
dist.zip

Binary file not shown.

16
src/views/CompanyProfile/CompanyProfile.vue

@ -56,28 +56,32 @@ export default {
],
},
content: {},
showLoading: true
showLoading: true,
};
},
watch: {
'$route.query.code'(val) {
if (this.$route.path === this.list.url) {
this.code = val;
for (let i = 0; i < this.list.children.length; i++) {
if (val === this.list.children[i].code) {
this.defaultTitle = this.list.children[i].title;
}
}
this.getDefaultTitle(val);
this.getData(this.code);
}
},
},
created() {
this.code = this.$route.query.code;
this.getDefaultTitle(this.code);
this.getData(this.code);
},
methods: {
...mapActions('home', ['getDetail']),
getDefaultTitle(code) {
for (let i = 0; i < this.list.children.length; i++) {
if (code === this.list.children[i].code) {
this.defaultTitle = this.list.children[i].title;
}
}
},
async getData(showPage) {
try {
this.showLoading = true;

Loading…
Cancel
Save