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); }, - } }