Chicolor 4 anni fa
parent
commit
d21b611411

+ 8 - 4
miniprogram/components/itemmyNews/itemmyNews.wxml

@@ -1,14 +1,18 @@
 <!-- 为消息-我的消息里通知的组件,组件中数据来自data:newNewsData.js -->
 <view class="card">
   <view class="top">
-    <view class="profile" wx:if="{{item.publishType=='回复'}}">
-      <text class="publisher-name">{{item.publisherName}}</text><text class="primary-text-color"
-        style="font-size:24rpx;">对您的评论进行了回复</text>
+    <view class="profile" wx:if="{{item.publishType == '回复'}}">
+      <text class="primary-text-color" style="font-size: 24rpx;"><text class="publisher-name"
+          style="color: #000000;">{{item.publisherName}}</text> 对您的评论进行了回复</text>
+    </view>
+    <view class="profile" wx:if="{{item.publishType == '动态'}}">
+      <text class="primary-text-color" style="font-size: 24rpx;">您收藏的信息 <text class="publisher-name"
+          style="color: #000000;">{{item.publisherName}}</text> 有新动态</text>
     </view>
     <text class="primary-text-color detail">查看</text>
   </view>
   <view class="bottom">
     <view class="title secondary-text-color">{{item.title}}</view>
-    <text class="primary-text-color detail">回复</text>
+    <text class="primary-text-color detail" wx:if="{{item.publishType == '回复'}}">回复</text>
   </view>
 </view>

+ 7 - 5
miniprogram/components/itemmyNews/itemmyNews.wxss

@@ -2,7 +2,7 @@
   height: auto;
   margin: 30rpx 20rpx 0rpx 20rpx;
   background-color: #ffffff;
-  box-shadow: 5rpx 5rpx 8rpx 0rpx rgba(0,0,0,0.16);
+  box-shadow: 5rpx 5rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
   border-radius: 20rpx;
   padding-top: 20rpx;
 }
@@ -20,11 +20,11 @@
   display: flex;
   flex-direction: row;
   justify-content: space-between;
-  align-items: center;
+  align-items: flex-end;
   margin: 0rpx 30rpx 0rpx 30rpx;
 }
 
-.bottom{
+.bottom {
   display: flex;
   flex-direction: row;
   justify-content: space-between;
@@ -33,12 +33,14 @@
   padding-bottom: 20rpx;
 }
 
-.profile {
+/* .profile {
   display: flex;
   flex-direction: row;
   align-items: center;
-}
+} */
 
 .detail {
+  width: 100rpx;
   font-size: 24rpx;
+  text-align: right;
 }

+ 12 - 15
miniprogram/data/newMessageData.js

@@ -1,26 +1,23 @@
 // 消息-关注动态中组件itemfollowNews的数据
-var json=[
-  {
-    "id":"1",
+var json = [{
+    "id": "1",
     // 动态的编号id
-    "publisherAvatar":"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1608131389634&di=bf796ce931cfbe3befff359069468b0f&imgtype=0&src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_match%2F0%2F162260862%2F0.jpg",
+    "publisherAvatar": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1608131389634&di=bf796ce931cfbe3befff359069468b0f&imgtype=0&src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_match%2F0%2F162260862%2F0.jpg",
     //组织头像
-    "publisherName":"蓝田文体发展中心",
-    "publishType":"活动",
+    "publisherName": "蓝田文体发展中心",
+    "publishType": "活动",
     //动态类型
-    "title":"紫金新生达人秀|期待你的精彩",
-    "subTitle":"紫金新生达人秀现面向全校学生开启报名通道,报名即有综素加分,通过初赛就有二课!",
+    "title": "是的,只要线上报名就可以了哦,具体内容我们会以短信形式通知~",
   },
   {
-    "id":"2",
-    "publisherAvatar":"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1608131389634&di=bf796ce931cfbe3befff359069468b0f&imgtype=0&src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_match%2F0%2F162260862%2F0.jpg",
-    "publisherName":"蓝田文体发展中心",
-    "publishType":"活动",
-    "title":"紫金新生达人秀|期待你的精彩",
-    "subTitle":"紫金新生达人秀现面向全校学生开启报名通道,报名即有综素加分,通过初赛就有二课!",
+    "id": "2",
+    "publisherAvatar": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1608131389634&di=bf796ce931cfbe3befff359069468b0f&imgtype=0&src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_match%2F0%2F162260862%2F0.jpg",
+    "publisherName": "蓝田文体发展中心",
+    "publishType": "活动",
+    "title": "紫金新生达人秀|期待你的精彩",
   }
 ]
 
 module.exports = {
-  newMessage:json
+  newMessage: json
 }

+ 12 - 15
miniprogram/data/newNewsData.js

@@ -1,26 +1,23 @@
 // 消息-我的消息中组件itemmyNews的数据
-var json=[
-  {
-    "id":"1",
+var json = [{
+    "id": "1",
     // 消息的编号
-    "publisherAvatar":"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1608131389634&di=bf796ce931cfbe3befff359069468b0f&imgtype=0&src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_match%2F0%2F162260862%2F0.jpg",
+    "publisherAvatar": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1608131389634&di=bf796ce931cfbe3befff359069468b0f&imgtype=0&src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_match%2F0%2F162260862%2F0.jpg",
     // 组织头像
-    "publisherName":"蓝田文体发展中心",
-    "publishType":"回复",
+    "publisherName": "蓝田文体发展中心",
+    "publishType": "回复",
     // 消息类型
-    "title":"紫金新生达人秀|期待你的精彩",
-    "subTitle":"紫金新生达人秀现面向全校学生开启报名通道,报名即有综素加分,通过初赛就有二课!",
+    "title": "是的,只要线上报名就可以了哦,具体内容我们会以短信形式通知~",
   },
   {
-    "id":"2",
-    "publisherAvatar":"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1608131389634&di=bf796ce931cfbe3befff359069468b0f&imgtype=0&src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_match%2F0%2F162260862%2F0.jpg",
-    "publisherName":"蓝田文体发展中心",
-    "publishType":"回复",
-    "title":"紫金新生达人秀|期待你的精彩",
-    "subTitle":"紫金新生达人秀现面向全校学生开启报名通道,报名即有综素加分,通过初赛就有二课!",
+    "id": "2",
+    "publisherAvatar": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1608131389634&di=bf796ce931cfbe3befff359069468b0f&imgtype=0&src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_match%2F0%2F162260862%2F0.jpg",
+    "publisherName": "慎远杯",
+    "publishType": "动态",
+    "title": "报名时间延长啦,大家快来报名吧~",
   }
 ]
 
 module.exports = {
-  newNews:json
+  newNews: json
 }

+ 20 - 20
miniprogram/pages/main/main.js

@@ -12,40 +12,40 @@ Page({
     filterItem: ["", "", "", ""],
     filterName: [{},
       {
-        type: "信息类型",
-        list: [{
-            sub: "通知",
-            item: [{
-                secondSub: "生活通知",
-                subitem: ["水电通知", "缴费通知", "假期通知", "后勤通知", "图书馆通知"]
+        title: "信息类型",
+        children: [{
+            title: "通知",
+            children: [{
+                title: "生活通知",
+                children: ["水电通知", "缴费通知", "假期通知", "后勤通知", "图书馆通知"]
               },
               {
-                secondSub: "学业通知",
-                subitem: ["选课通知", "竞赛通知", "考试通知"]
+                title: "学业通知",
+                children: ["选课通知", "竞赛通知", "考试通知"]
               },
               {
-                secondSub: "其他通知",
-                subitem: ["其他通知"]
+                title: "其他通知",
+                children: ["其他通知"]
               }
             ]
           },
           {
-            sub: "活动",
-            item: ["志愿活动", "文艺活动", "体育活动", "学术活动", "素质拓展", "精品课程", "其他活动"]
+            title: "活动",
+            children: ["志愿活动", "文艺活动", "体育活动", "学术活动", "素质拓展", "精品课程", "其他活动"]
           },
           {
-            sub: "纳新",
-            item: ["社团纳新", "组织纳新"]
+            title: "纳新",
+            children: ["社团纳新", "组织纳新"]
           }
         ]
       },
       {
-        type: "发布来源",
-        item: ["我关注的", "社团", "组织", "权服侠", "学校部门"]
+        title: "发布来源",
+        children: ["我关注的", "社团", "组织", "权服侠", "学校部门"]
       },
       {
-        type: "我的需求",
-        item: ["二课分", "三课分", "四课分", "勤工助学", "志愿者小时数", "综素/活动纪实"]
+        title: "我的需求",
+        children: ["二课分", "三课分", "四课分", "勤工助学", "志愿者小时数", "综素/活动纪实"]
       }
     ],
     activity: null,
@@ -156,9 +156,9 @@ Page({
           if (i == 0) {
             arr[i].tag = ['紫金港', '管控', '保卫处']
           } else if (i == 1) {
-            arr[i].tag = ['公益', '丹青']
-          } else if (i == 2) {
             arr[i].tag = ['玉泉', '停电']
+          } else if (i == 2) {
+            arr[i].tag = ['公益', '画展']
           }
           this.setData({
             mainDatas: arr

+ 31 - 3
miniprogram/pages/main/main.wxml

@@ -3,22 +3,23 @@
 <view class="page">
   <view class="filter">
     <view class="filter-item secondary-text-color" data-filter-list="1" bindtap="toggleFilterList">
-      <text>{{filterItem[1] == "" ? filterName[1].type : filterItem[1]}}</text>
+      <text>{{filterItem[1] == "" ? filterName[1].title : filterItem[1]}}</text>
       <image class="filter-arrow" id="arrow1" mode="aspectFit" src="/images/arrow.png"></image>
     </view>
     <view class="filter-line"></view>
     <view class="filter-item secondary-text-color" data-filter-list="2" bindtap="toggleFilterList">
-      <text>{{filterItem[2] == "" ? filterName[2].type : filterItem[2]}}</text>
+      <text>{{filterItem[2] == "" ? filterName[2].title : filterItem[2]}}</text>
       <image class="filter-arrow" id="arrow2" mode="aspectFit" src="/images/arrow.png"></image>
     </view>
     <view class="filter-line"></view>
     <view class="filter-item secondary-text-color" data-filter-list="3" bindtap="toggleFilterList">
-      <text>{{filterItem[3] == "" ? filterName[3].type : filterItem[3]}}</text>
+      <text>{{filterItem[3] == "" ? filterName[3].title : filterItem[3]}}</text>
       <image class="filter-arrow" id="arrow3" mode="aspectFit" src="/images/arrow.png"></image>
     </view>
   </view>
   <!-- 信息类型 -->
   <view class="filter-lists">
+<<<<<<< HEAD
     <view wx:if="{{filterList == 1}}" class="filter-list1" id="list1">
       <view wx:for="{{filterName[1].list}}" wx:for-item="item" wx:key="type">
         <view class="filter-list-title primary-text-color">{{item.sub}}</view>
@@ -49,23 +50,50 @@
         <view class="filter-list-item secondary-text-color" wx:for="{{item.item}}" wx:for-item="name" wx:key="*this"
           data-filter-list="1" data-filter-item="{{name}}" bindtap="toggleFilterItem">{{name}}<view
             wx:if="{{filterItem[1] == name}}">✔</view>
+=======
+    <view wx:if="{{filterList == 1}}" class="filter-list" id="list1">
+      <view wx:for="{{filterName[1].children}}" wx:for-item="item" wx:key="title">
+        <view class="filter-list-title primary-text-color">{{item.title}}</view>
+        <view wx:for="{{item.children}}" wx:for-item="item" wx:key="title">
+          <view wx:if="{{!item.children}}" class="filter-list-item secondary-text-color" data-filter-list="1"
+            data-filter-item="{{item}}" bindtap="toggleFilterItem">{{item}}<view wx:if="{{filterItem[1] == item}}">✔
+            </view>
+          </view>
+          <view class="filter-list-subtitle primary-text-color" wx:if="{{item.children}}">{{item.title}}</view>
+          <view class="filter-list-item secondary-text-color" wx:for="{{item.children}}" wx:for-item="title"
+            wx:key="title" data-filter-list="1" data-filter-item="{{title}}" bindtap="toggleFilterItem">{{title}}<view
+              wx:if="{{filterItem[1] == title}}">✔</view>
+          </view>
+>>>>>>> master
         </view>
       </view>
     </view>
     <!-- 发布来源 -->
     <view class="filter-list"></view>
     <view wx:if="{{filterList == 2}}" class="filter-list" id="list2">
+<<<<<<< HEAD
       <view class="filter-list-item secondary-text-color" wx:for="{{filterName[2].item}}" wx:for-item="name"
         wx:key="*this" data-filter-list="2" data-filter-item="{{name}}" bindtap="toggleFilterItem">{{name}}<view
           wx:if="{{filterItem[2] == name}}">✔</view>
+=======
+      <view class="filter-list-item secondary-text-color" wx:for="{{filterName[2].children}}" wx:for-item="title"
+        wx:key="*this" data-filter-list="2" data-filter-item="{{title}}" bindtap="toggleFilterItem">{{title}}<view
+          wx:if="{{filterItem[2] == title}}">✔</view>
+>>>>>>> master
       </view>
     </view>
     <!-- 我的需求 -->
     <view class="filter-list"></view>
     <view wx:if="{{filterList == 3}}" class="filter-list" id="list3">
+<<<<<<< HEAD
       <view class="filter-list-item secondary-text-color" wx:for="{{filterName[3].item}}" wx:for-item="name"
         wx:key="*this" data-filter-list="3" data-filter-item="{{name}}" bindtap="toggleFilterItem">{{name}}<view
           wx:if="{{filterItem[3] == name}}">✔</view>
+=======
+      <view class="filter-list-item secondary-text-color" wx:for="{{filterName[3].children}}" wx:for-item="title"
+        wx:key="*this" data-filter-list="3" data-filter-item="{{title}}" bindtap="toggleFilterItem">{{title}}<view
+          wx:if="{{filterItem[3] == title}}">✔</view>
+>>>>>>> master
       </view>
     </view>
   </view>

+ 7 - 22
miniprogram/pages/main/main.wxss

@@ -42,7 +42,7 @@
 
 .filter-lists {
   position: fixed;
-  top: 75rpx;
+  top: 60rpx;
   left: 0rpx;
   display: flex;
   justify-content: space-around;
@@ -51,21 +51,13 @@
   z-index: 100;
 }
 
-.filter-list1 {
-  display: flex;
-  flex-direction: column;
-  justify-content: flex-start;
-  width: 100%;
-  font-size: 25rpx;
-  background: rgba(255, 255, 255, 0.95);
-  opacity: 0;
-}
-
 .filter-list {
   display: flex;
   flex-direction: column;
   justify-content: flex-start;
   width: 33%;
+  max-height: 500rpx;
+  overflow-y: scroll;
   font-size: 25rpx;
   background: rgba(255, 255, 255, 0.95);
   opacity: 0;
@@ -74,28 +66,21 @@
 .filter-list-title {
   display: flex;
   justify-content: space-between;
-  height: 40rpx;
-  font-size: 25rpx;
-  line-height: 40rpx;
+  line-height: 50rpx;
   margin-left: 15rpx;
-  margin-right: 15rpx;
 }
 
 .filter-list-subtitle {
   display: flex;
   justify-content: space-between;
-  height: 40rpx;
-  font-size: 25rpx;
-  line-height: 40rpx;
+  line-height: 50rpx;
   margin-left: 20rpx;
-  margin-right: 15rpx;
 }
 
 .filter-list-item {
   display: flex;
   justify-content: space-between;
-  height: 60rpx;
-  line-height: 60rpx;
-  margin-left: 20rpx;
+  line-height: 50rpx;
+  margin-left: 25rpx;
   margin-right: 25rpx;
 }