diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..0268d53 Binary files /dev/null and b/dist.zip differ diff --git a/src/views/CompanyProfile/CompanyProfile.vue b/src/views/CompanyProfile/CompanyProfile.vue index a9d96ed..8cb5605 100644 --- a/src/views/CompanyProfile/CompanyProfile.vue +++ b/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;