From e67e96bb637fbd5ce29949b58cccf4780b4a08ea Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 3 Apr 2023 11:29:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=95=BF=E9=A1=B5=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/home/index.vue | 1 - src/pages/article/activity.vue | 2 - src/pages/article/index.vue | 2 - src/pages/column/index.vue | 8 +- src/pages/publication/index.vue | 95 ++++++++++ src/pages/publication/patent.vue | 140 ++++++++++++++ src/pages/publication/thesis.vue | 128 +++++++++++++ src/pages/talentCenter/index.vue | 286 +++++++++++++++++++++++++++++ src/plugins/requests/index.js | 7 +- src/router/modules/publication.js | 14 ++ src/router/modules/talentCenter.js | 14 ++ 11 files changed, 683 insertions(+), 14 deletions(-) create mode 100644 src/pages/publication/index.vue create mode 100644 src/pages/publication/patent.vue create mode 100644 src/pages/publication/thesis.vue create mode 100644 src/pages/talentCenter/index.vue create mode 100644 src/router/modules/publication.js create mode 100644 src/router/modules/talentCenter.js diff --git a/src/layouts/home/index.vue b/src/layouts/home/index.vue index 8e937f8..acac7f2 100644 --- a/src/layouts/home/index.vue +++ b/src/layouts/home/index.vue @@ -37,7 +37,6 @@ export default { document.body.onclick = e => { e.stopPropagation() this.$refs.header.showSearch = false - console.log(this.$refs.header.showSearch) } }, methods: { diff --git a/src/pages/article/activity.vue b/src/pages/article/activity.vue index 1c858cb..613941e 100644 --- a/src/pages/article/activity.vue +++ b/src/pages/article/activity.vue @@ -142,8 +142,6 @@ export default { // 最新资讯 getArticle() { this.$post(this.api.newlyPublishedArticles, { - - pageNum: 1, pageSize: 5, siteId: this.$route.query.siteId || this.$store.state.content.site diff --git a/src/pages/article/index.vue b/src/pages/article/index.vue index a5cec49..2556258 100644 --- a/src/pages/article/index.vue +++ b/src/pages/article/index.vue @@ -157,8 +157,6 @@ export default { // 最新资讯 getArticle() { this.$post(this.api.newlyPublishedArticles, { - - pageNum: 1, pageSize: 5, siteId: this.$route.query.siteId || this.$store.state.content.site diff --git a/src/pages/column/index.vue b/src/pages/column/index.vue index e1b6608..e8d7186 100644 --- a/src/pages/column/index.vue +++ b/src/pages/column/index.vue @@ -321,8 +321,6 @@ export default { // 最新资讯 getNews() { this.$post(this.api.newlyPublishedArticles, { - - pageNum: 1, pageSize: 5, siteId: this.$route.query.siteId || this.$store.state.content.site @@ -632,9 +630,8 @@ export default { cursor: pointer; } .texts { - max-width: 620px; + width: 52%; padding-left: 30px; - margin-right: 20px; } .type { margin-bottom: 15px; @@ -663,8 +660,7 @@ export default { @include mul-ellipsis(2); } .pic { - width: 430px; - // min-width: 380px; + width: 46%; height: 244px; } } diff --git a/src/pages/publication/index.vue b/src/pages/publication/index.vue new file mode 100644 index 0000000..e5d5bd8 --- /dev/null +++ b/src/pages/publication/index.vue @@ -0,0 +1,95 @@ + + + + + \ No newline at end of file diff --git a/src/pages/publication/patent.vue b/src/pages/publication/patent.vue new file mode 100644 index 0000000..407beb5 --- /dev/null +++ b/src/pages/publication/patent.vue @@ -0,0 +1,140 @@ + + + + + \ No newline at end of file diff --git a/src/pages/publication/thesis.vue b/src/pages/publication/thesis.vue new file mode 100644 index 0000000..41f69c7 --- /dev/null +++ b/src/pages/publication/thesis.vue @@ -0,0 +1,128 @@ + + + + + \ No newline at end of file diff --git a/src/pages/talentCenter/index.vue b/src/pages/talentCenter/index.vue new file mode 100644 index 0000000..b4054db --- /dev/null +++ b/src/pages/talentCenter/index.vue @@ -0,0 +1,286 @@ + + + + + \ No newline at end of file diff --git a/src/plugins/requests/index.js b/src/plugins/requests/index.js index 3fdb01a..480544c 100644 --- a/src/plugins/requests/index.js +++ b/src/plugins/requests/index.js @@ -51,7 +51,8 @@ service.interceptors.response.use( // 服务器状态码不是200的情况 error => { if (error.response.status) { - switch (error.response.status) { + const { msg, code } = error.response.data + switch (code) { // 401: 未登录 case 401: util.local.remove(Setting.storeKey); @@ -76,8 +77,8 @@ service.interceptors.response.use( break; // 其他错误,直接抛出错误提示 default: - util.errorMsg(error.response.data.msg); - Promise.reject(res); + util.errorMsg(msg); + Promise.reject(error.response.data); } return Promise.reject(error.response); } diff --git a/src/router/modules/publication.js b/src/router/modules/publication.js new file mode 100644 index 0000000..dc77df7 --- /dev/null +++ b/src/router/modules/publication.js @@ -0,0 +1,14 @@ +import BasicLayout from '@/layouts/home' +const name = 'publication' +export default { + path: `/${name}`, + component: BasicLayout, + children: [ + { + name, + path: `/${name}`, + component: () => import(`@/pages/${name}`), + meta: { title: '' } + }, + ] +}; diff --git a/src/router/modules/talentCenter.js b/src/router/modules/talentCenter.js new file mode 100644 index 0000000..0634ebc --- /dev/null +++ b/src/router/modules/talentCenter.js @@ -0,0 +1,14 @@ +import BasicLayout from '@/layouts/home' +const name = 'talentCenter' +export default { + path: `/${name}`, + component: BasicLayout, + children: [ + { + name, + path: `/${name}`, + component: () => import(`@/pages/${name}`), + meta: { title: '' } + } + ] +};