From 1f38d830a06b4a3f114dc5b3bb75fe692e94d135 Mon Sep 17 00:00:00 2001 From: zhaofang <752743406@qq.com> Date: Fri, 11 Nov 2022 18:52:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/page-title/page-title.vue | 54 ++++++++----- pages/my/myArticles.vue | 113 ++++++++++++++------------- pages/news/index.vue | 13 +-- 3 files changed, 95 insertions(+), 85 deletions(-) diff --git a/components/page-title/page-title.vue b/components/page-title/page-title.vue index f47f571..3edf4c9 100644 --- a/components/page-title/page-title.vue +++ b/components/page-title/page-title.vue @@ -1,9 +1,10 @@ @@ -17,6 +18,10 @@ showBack:{ type:Boolean, default:false + }, + goPgae:{ + type:String, + default:'' } }, data() { @@ -25,6 +30,13 @@ } }, methods: { + topgae() { + if(this.goPgae!=''){ + uni.navigateTo({ + url:this.goPgae + }); + } + }, toBack(){ if(this.backUrl!=''){ if(this.backUrl == '/pages/my/index'){ @@ -60,11 +72,15 @@ // display: none; // background:linear-gradient(to bottom,#6BA0FC, #6297FD); background-color: #fff; + display: flex; + justify-content: space-between; .back{ - float: left; + // float: left; color: #000; - padding-top:8px; - padding-left: 15px; + padding-top:6px; + height: 40px; + line-height: 40px; + // padding-left: 15px; } .title{ text-align: center; @@ -79,18 +95,18 @@ line-height: 40px; } } - .arrow:before { - content: " "; - display: inline-block; - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); - transform: rotate(45deg); - height: .5rem; - width: .5rem; - border-width: 0 0 2px 2px; - border-color: #FFFFFF; - border-style: solid; - position: relative; - top: 0 - } + // .arrow:before { + // content: " "; + // display: inline-block; + // -webkit-transform: rotate(45deg); + // -ms-transform: rotate(45deg); + // transform: rotate(45deg); + // height: .5rem; + // width: .5rem; + // border-width: 0 0 2px 2px; + // border-color: #FFFFFF; + // border-style: solid; + // position: relative; + // top: 0 + // } diff --git a/pages/my/myArticles.vue b/pages/my/myArticles.vue index 9f6f69d..fe49752 100644 --- a/pages/my/myArticles.vue +++ b/pages/my/myArticles.vue @@ -2,18 +2,18 @@ - 我的文章 + + + - + - - --> + + + + + + 状态 + + + + + {{status.label}} + + - - + @@ -221,10 +231,11 @@ export default { }); }, chooseStatus(e) { + console.log(e,'e') if(this.flagLoading) { return; } - // this.statusSelectShow = false; + this.statusSelectShow = false; // this.statusBtn = e.value[0].label; this.articleList.pageIndex = 1; this.articleList.status = e.value; @@ -338,11 +349,13 @@ export default { } .top-filter { .top-content { - position: relative; + // position: relative; .put-articles{ - position: absolute; - right:0; - top:-60upx; + text-align: right; + // float: right; + // position: absolute; + // right:0; + // top:-60upx; font-size: 32upx; font-weight: 600; color: #387DF7; @@ -351,17 +364,7 @@ export default { .top-content-options { // height: 40px; display: flex; - justify-content: space-between; - align-items: center; line-height: 40px; - // padding:20upx 30upx 0 30upx ; - // .textbtn { - // background-color: #ffffff; - // color: #4f4f4f; - // border-radius: 8upx; - // font-size: 24upx; - - // } .input-search { flex: 1; // padding: 28upx 20upx; @@ -380,47 +383,47 @@ export default { } } -.textbtn { - background-color: #ffffff; - padding: 18upx 20upx; - color: #4f4f4f; - border-radius: 8upx; - font-size: 24upx; -} .addition { - margin-left: 20rpx; - .textbtn { - background-color: #ffffff; - color: #4f4f4f; - border-radius: 8upx; - font-size: 24upx; - } -} - -.uni-list { + width: 108upx; + margin-left: 90rpx; + position: relative; + .textbtn { + display: flex; + width: 108upx; + color: #4f4f4f; + font-size: 28upx; + } .sea-show{ - // padding: 10rpx 30upx 0 30upx; - // padding-top: 10upx; - line-height: 60upx; + width: 130upx; + position: absolute; + top: 80upx; + right: 0; + background: #FFFFFF; + box-shadow: 0px 2upx 8upx 4upx rgba(0,0,0,0.07); + border-radius: 12upx; + padding: 20upx 60upx; + z-index: 99; .sea-active{ - border: 1rpx solid #679cfc !important; - color: #679cfc; + color: #387DF7 !important; } .sea-index{ - font-size: 26rpx; - padding: 6rpx 16rpx; - border: 1rpx solid #ccc; - border-radius: 20rpx; - margin-right: 16rpx; - background-color: #fff; + font-size: 28upx; + color: #666666; + line-height: 60upx; + text-align: center; } .sea-index:last-child{ margin-right: 0; } } +} + +.uni-list { + + .article_one{ // padding: 20upx 30upx; // padding-top: 10upx; diff --git a/pages/news/index.vue b/pages/news/index.vue index 1074de2..79803cf 100644 --- a/pages/news/index.vue +++ b/pages/news/index.vue @@ -43,7 +43,7 @@ tab:0, data:[],//拿到的数据 total:0,//总条数 - loadStatus:'more',//more,loading,noMore + loadStatus:'noMore',//more,loading,noMore query:{ pageIndex:1,//当前页 type:null,//当前只限于文章 @@ -96,6 +96,7 @@ this.message.list = []; this.queryData.pageIndex = 1; } + let $this = this; uni.showLoading({ title: '加载中...' }); apiMessage.list(this.queryData).then(res => { if (res.status == 200) { @@ -111,11 +112,6 @@ }); this.loadAuthorInfo(res.result.list,ids) } - if(this.message.list.length