From 2e9510a0646b24e11c5fc0c7a482057b1085cd28 Mon Sep 17 00:00:00 2001 From: Zhang HaoYang <1304907854@qq.com> Date: Sun, 2 Jul 2023 23:04:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Monthly.vue | 30 ++++++-- src/components/MonthlyDetail.vue | 128 +++++++++++++++++++++++++++++-- src/components/Paper.vue | 1 - 3 files changed, 146 insertions(+), 13 deletions(-) diff --git a/src/components/Monthly.vue b/src/components/Monthly.vue index 55bca30..da22b94 100644 --- a/src/components/Monthly.vue +++ b/src/components/Monthly.vue @@ -64,7 +64,7 @@


- 阅读该期 + 阅读该期

@@ -154,8 +154,8 @@ export default { }, // 初始化渲染页面 mounted(){ - this.getProjectNum(); this.getMonely(); + this.getProjectNum(); }, methods: { goBack() { @@ -172,8 +172,9 @@ export default { }).then((res)=>{ that.ProjectNum = parseInt(res.data); // console.log(res.data); - }) + }); }, + // 获取月刊总数 getMonely(){ var that = this; axios({ @@ -182,12 +183,29 @@ export default { params: { } }).then(function (res){ - that.Monely = res.data; - // that.Monely = parseInt(res.data); - // that.selectMonly = that.Monely; + that.Monely = parseInt(res.data); // console.log(res.data); }) }, + // 月刊详情页面跳转 + ToDetail(){ + if(this.selectMonly > 0 && this.selectMonly <= this.Monely){ + let pathInfo = this.$router.resolve({ + path: '/MonthlyDetail', + query:{ + MonethlyId:this.selectMonly + } + }) + window.open(pathInfo.href, '_self'); + }else{ + this.$message({ + message: '请输入正确的月刊号', + type: 'warning', + offset:100, + duration:700, + }); + } + } } } diff --git a/src/components/MonthlyDetail.vue b/src/components/MonthlyDetail.vue index 1b443ae..fcee0e7 100644 --- a/src/components/MonthlyDetail.vue +++ b/src/components/MonthlyDetail.vue @@ -1,15 +1,131 @@ - \ No newline at end of file diff --git a/src/components/Paper.vue b/src/components/Paper.vue index 785f05d..6f3e654 100644 --- a/src/components/Paper.vue +++ b/src/components/Paper.vue @@ -34,7 +34,6 @@ export default { goBack() { window.history.go(-1); }, - } }