diff --git a/src/assets/styles/element-variables.scss b/src/assets/styles/element-variables.scss index 47e0d6c..be56db9 100644 --- a/src/assets/styles/element-variables.scss +++ b/src/assets/styles/element-variables.scss @@ -57,7 +57,8 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts'; } .RightContent{ width:20vw; - margin-top:10px; + height:fit-content; + margin-top:50px; margin-left:20px; border-radius: 6px; background-color: #ffffff; diff --git a/src/components/Monthly/Monthly.vue b/src/components/Monthly/Monthly.vue index 6f4232b..80290db 100644 --- a/src/components/Monthly/Monthly.vue +++ b/src/components/Monthly/Monthly.vue @@ -54,7 +54,7 @@ 选择期数: 共包含 - 17 + {{labelItem.length}} 类 @@ -80,19 +80,19 @@ 选择分类: - + - 查看分类 + 查看分类 @@ -150,14 +150,23 @@ export default { Monely:0, //保存用户选择期刊期数: selectMonly:null, + // 保存用户选择的分类: + selectlabelItem:null, + //标签: + labelItem:[], }; }, // 初始化渲染页面 mounted(){ this.getMonely(); this.getProjectNum(); + this.getLabel(); }, methods: { + test(){ + var that = this; + console.log(that.selectlabelItem); + }, goBack() { window.history.go(-1); }, @@ -187,6 +196,22 @@ export default { // console.log(res.data); }) }, + //获取所有标签: + getLabel(){ + var that = this; + axios({ + method: 'post', + url: 'http://localhost:8082/helloGithub_war_exploded/retLabel', + params: { + } + }).then(function (res){ + that.labelItem = []; + for(let i=0;i 0 && this.selectMonly <= this.Monely){ @@ -205,6 +230,26 @@ export default { duration:700, }); } + }, + // 月刊分类页跳转 + changePage(){ + if(this.selectlabelItem){ + let pathInfo = this.$router.resolve({ + path: '/MonthlyByTags', + query:{ + Protype:this.selectlabelItem + } + }) + window.open(pathInfo.href, '_self'); + }else{ + this.$message({ + message: '请选择分类类型', + type: 'warning', + offset:100, + duration:700, + }); + } + } } } @@ -242,4 +287,9 @@ export default { text-align: center; border-radius:10px; } + +::v-deep .el-scrollbar{ + max-height:150px; + overflow: scroll; +} \ No newline at end of file diff --git a/src/components/Monthly/MonthlyByTags.vue b/src/components/Monthly/MonthlyByTags.vue new file mode 100644 index 0000000..969c818 --- /dev/null +++ b/src/components/Monthly/MonthlyByTags.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + 《HelloGitHub》月刊{{selectlabelItem}}分区 + + + + + + + + + + + + 这里是按照「分类」 + 阅读往期的 HelloGitHub 月刊内容, 您目前在查看往期 HelloGitHub 月刊中的 + {{selectlabelItem}} 项目 + 集合。 + + + + + + + + + + + + + + + 加载中... + - 你不经意间触碰到了底线 - + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/Monthly/MonthlyDetail.vue b/src/components/Monthly/MonthlyDetail.vue index 7b58326..95b87a0 100644 --- a/src/components/Monthly/MonthlyDetail.vue +++ b/src/components/Monthly/MonthlyDetail.vue @@ -1,15 +1,14 @@ - + - 上一期 - - + 上一期 + / {{Monely}} - 下一期 + 下一期 - 《HelloGitHub》月刊第{{selectMonly}}期 + 《HelloGitHub》月刊第{{MonthlyId}}期 @@ -43,31 +42,61 @@ - + + + + + + + {{MonType[index]}}语言区 + + + + + + + + + 加载中... + - 你不经意间触碰到了底线 - + + + + - - - - - - - - - - - + + + + 快速导航 + + + + + + {{MonType[index2]}} + + + + + + + \ No newline at end of file diff --git a/src/components/Monthly/MonthlyItems.vue b/src/components/Monthly/MonthlyItems.vue new file mode 100644 index 0000000..9ab27c9 --- /dev/null +++ b/src/components/Monthly/MonthlyItems.vue @@ -0,0 +1,113 @@ + + + {{briefTitle}} + + + Star:1400 + Fork:755 + 浏览量:{{Items.lookCount}} + + + 详 情 + + + + {{briefDescribe}} + + + + + + + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 6219de3..b9ec12b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -6,6 +6,7 @@ import monthly from "@/components/Monthly/Monthly.vue"; import ranking from "@/components/Ranking.vue"; import paper from "@/components/Paper/Paper.vue"; import MonthlyDetail from "@/components/Monthly/MonthlyDetail.vue"; +import MonthlyByTags from "@/components/Monthly/MonthlyByTags.vue"; import UserInfoPage from "@/components/User/UserInfoPage.vue"; import ProjectDetail from "@/components/Project/ProjectDetail.vue"; import ArticleDetail from "@/components/Paper/ArticleDetail.vue"; @@ -56,6 +57,11 @@ const routes = [ name: 'UserInfoPage', component: UserInfoPage }, + { + path: '/MonthlyByTags', + name: 'MonthlyByTags', + component: MonthlyByTags + }, { path: '/ProjectDetail', name: 'ProjectDetail', diff --git a/src/views/index.vue b/src/views/index.vue index 152cccd..319a2c9 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -5,7 +5,9 @@ + +
加载中...
- 你不经意间触碰到了底线 -