diff --git a/components/pullDownRefresh/pullDownRefresh.wxss b/components/pullDownRefresh/pullDownRefresh.wxss index 7ee6289..2054a48 100644 --- a/components/pullDownRefresh/pullDownRefresh.wxss +++ b/components/pullDownRefresh/pullDownRefresh.wxss @@ -1,5 +1,6 @@ .pulldown-refresh { - width:100%; + /* width:calc(100% - 40rpx); */ + /* margin-left: 20rpx; */ background: #f7f7f7; } .pulldown-refresh .pulldown-state { diff --git a/pages/discussion/components/issueItem/issueItem.wxss b/pages/discussion/components/issueItem/issueItem.wxss index 13e51db..3cd15df 100644 --- a/pages/discussion/components/issueItem/issueItem.wxss +++ b/pages/discussion/components/issueItem/issueItem.wxss @@ -1,11 +1,11 @@ .issue-item { width:100%; background: #fff; - border-radius: 16rpx; + /* border-radius: 16rpx; */ box-sizing: border-box; - padding: 0 25rpx; + padding: 0 30rpx; overflow: hidden; - margin-bottom: 20rpx; + margin-bottom: 15rpx; } .issue-item .header { diff --git a/pages/discussion/components/issueList/issueList.wxml b/pages/discussion/components/issueList/issueList.wxml index bb0463c..43aeaf5 100644 --- a/pages/discussion/components/issueList/issueList.wxml +++ b/pages/discussion/components/issueList/issueList.wxml @@ -1,8 +1,13 @@ - + + + diff --git a/pages/discussion/components/issueList/issueList.wxss b/pages/discussion/components/issueList/issueList.wxss index 657fd4f..ea09f5b 100644 --- a/pages/discussion/components/issueList/issueList.wxss +++ b/pages/discussion/components/issueList/issueList.wxss @@ -3,13 +3,19 @@ height:100%; } .issue-list .search { + margin-top: 2rpx; width: 100%; - height: 60rpx; - margin-bottom:16rpx; + height: 80rpx; + background: #fff; + margin-bottom:19rpx; display: flex; align-items: center; justify-content: space-between; } +.issue-list .search .left-v2{ + height: 100%; + width: calc(100% - 130rpx); +} .issue-list .search .left { background: #fff; border-radius: 8rpx; @@ -35,6 +41,8 @@ } .issue-list .search .right { + margin-right: 30rpx; + background: #fff; height:100%; display: flex; align-items: center; @@ -56,7 +64,7 @@ left: 0; height: 100%; width: 100%; - background: #f7f7f7; + background: #fff; } .issue-list .search .right .back { transform: rotateY(-180deg); diff --git a/pages/discussion/components/projectItem/projectItem.wxss b/pages/discussion/components/projectItem/projectItem.wxss index ed8e041..f773c85 100644 --- a/pages/discussion/components/projectItem/projectItem.wxss +++ b/pages/discussion/components/projectItem/projectItem.wxss @@ -1,11 +1,11 @@ .project-item { width:100%; background: #fff; - border-radius: 16rpx; + /* border-radius: 16rpx; */ box-sizing: border-box; padding: 0 25rpx; overflow: hidden; - margin-bottom: 20rpx; + margin-bottom: 15rpx; } .project-item .header { diff --git a/pages/discussion/components/projectList/projectList.wxml b/pages/discussion/components/projectList/projectList.wxml index bfaeb3b..14d9015 100644 --- a/pages/discussion/components/projectList/projectList.wxml +++ b/pages/discussion/components/projectList/projectList.wxml @@ -1,9 +1,9 @@ - + diff --git a/pages/discussion/components/projectList/projectList.wxss b/pages/discussion/components/projectList/projectList.wxss index 0177195..ee002eb 100644 --- a/pages/discussion/components/projectList/projectList.wxss +++ b/pages/discussion/components/projectList/projectList.wxss @@ -3,9 +3,11 @@ height:100%; } .project-list .search { + margin-top: 2rpx; width: 100%; - height: 60rpx; - margin-bottom:16rpx; + height: 80rpx; + background: #fff; + margin-bottom:19rpx; display: flex; align-items: center; justify-content: space-between; diff --git a/pages/discussion/discussion.js b/pages/discussion/discussion.js index 2129f28..759be9e 100644 --- a/pages/discussion/discussion.js +++ b/pages/discussion/discussion.js @@ -5,7 +5,18 @@ Page({ discussionType: 'issue', completeInfoDialogVisible: false, infoCompleted: 0, - gridName: '' + gridName: '', + typeList: [{ //排名方式:0-周,1-月 + type: '0', + name: '议题', + select: true + }, + { + type: '1', + name: '项目', + select: false + } + ], }, onLoad () { this.setData({ @@ -43,6 +54,31 @@ Page({ }) } }, + // 议题、项目切换 v2 + onButtonChange: function(e) { + const list = this.data.typeList + let that = this; + list.forEach(item => { + if (item.type === e.currentTarget.dataset.type) { + item.select = true + } else { + item.select = false + } + }) + that.setData({ + typeList: list, + }) + if(e.currentTarget.dataset.type == 0){ + this.setData({ + discussionType: 'issue' + }) + }else{ + this.setData({ + discussionType: 'project' + }) + } + + }, // 触底函数 onReachBottom () { if (this.data.discussionType === 'issue') { diff --git a/pages/discussion/discussion.wxml b/pages/discussion/discussion.wxml index d5d7467..8bfffdd 100644 --- a/pages/discussion/discussion.wxml +++ b/pages/discussion/discussion.wxml @@ -5,11 +5,16 @@ {{gridName}} - + + + + @@ -20,7 +25,7 @@ - + diff --git a/pages/discussion/discussion.wxss b/pages/discussion/discussion.wxss index 795a21b..fdbe04e 100644 --- a/pages/discussion/discussion.wxss +++ b/pages/discussion/discussion.wxss @@ -91,13 +91,13 @@ page { .discussion .issue-list { width: 100%; box-sizing: border-box; - padding: 30rpx 20rpx 0; + /* padding: 30rpx 20rpx 0; */ } .discussion .project-list { width: 100%; box-sizing: border-box; - padding: 30rpx 20rpx 0; + /* padding: 30rpx 20rpx 0; */ } .addIssue { @@ -113,3 +113,50 @@ page { height: 100%; object-fit: cover; } + +/* 新增tab切换 */ +.tab-v2 { + padding-left: 30rpx; + width: calc(100% - 130rpx); + height: 80rpx; + position: absolute; + display: flex; + align-items: center; +} + +.tab-v2 button { + position: relative; + display: inline-block; + margin: 0 42rpx 0 0; + flex-shrink: 0; + /* width: auto !important; */ + width: 208rpx; + height: 52rpx; + min-height: 52rpx !important; + line-height: 52rpx; + border-radius: 30rpx; + padding: 0 20rpx; +} + +button::after { + border: 0rpx; +} + +.tab-v2 .font-w { + font-size: 30rpx; + font-weight: bold; + color: #fff; + background: linear-gradient(to right, #e95027, #db1a1f); +} + +.tab-v2 .font-b { + background: #fff; + font-size: 30rpx; + font-weight: 500; + color: #333; + border: 1rpx solid #dbdbdb; +} + +.tab-v2 .hover-btn { + box-shadow: 0px 0px 10px 0px rgba(188, 0, 5, 0.22); +} \ No newline at end of file