Browse Source

消息样式修改

xiaohaizhao 4 months ago
parent
commit
3a032a1593
3 changed files with 19 additions and 11 deletions
  1. 1 0
      pages/tabbar/message/index.json
  2. 15 10
      pages/tabbar/message/index.scss
  3. 3 1
      pages/tabbar/message/index.wxml

+ 1 - 0
pages/tabbar/message/index.json

@@ -1,5 +1,6 @@
 {
     "usingComponents": {
+        "van-tag": "@vant/weapp/tag/index"
     },
     "navigationBarTitleText": "信息"
 }

+ 15 - 10
pages/tabbar/message/index.scss

@@ -1,5 +1,3 @@
-// @import '/static/unread.wxss';
-
 .tab-active-class {
     color: var(--assist) !important;
     font-size: 28rpx !important;
@@ -13,17 +11,17 @@
     min-height: 194rpx;
     width: 690rpx;
     box-sizing: border-box;
-    border-radius: 16rpx;
+    border-radius: 8rpx;
     overflow: hidden;
     background: #ffffff;
     margin: 0 auto 20rpx;
-    padding: 30rpx;
+    padding: 36rpx 40rpx 20rpx 40rpx;
 
     .title {
         height: 40rpx;
-        font-size: 28rpx;
+        font-size: 30rpx;
         font-family: PingFang SC-Medium, PingFang SC;
-        font-weight: 500;
+        font-weight: 700;
         color: #333333;
     }
 
@@ -37,14 +35,21 @@
     }
 
     .time {
-        height: 28rpx;
+        display: flex;
+        align-items: center;
         font-size: 20rpx;
         font-family: PingFang SC-Regular, PingFang SC;
-        color: #999999;
+        color: #BCBCBC;
         margin-top: 16rpx;
 
         .tag {
             margin-right: 10rpx;
+            font-size: 24rpx;
+            color: #1989FA;
+            border-radius: 4rpx;
+            background: rgba(56,116,246,0.1);
+            line-height: 40rpx;
+            padding: 0 20rpx;
         }
     }
 
@@ -54,7 +59,7 @@
         height: 16rpx;
         background: var(--error);
         border-radius: 50%;
-        top: 6rpx;
-        right: 6rpx;
+        top: 0;
+        right: 0;
     }
 }

+ 3 - 1
pages/tabbar/message/index.wxml

@@ -8,7 +8,9 @@
         <view class="title line-1">{{item.title}}</view>
         <view class="content line-3">{{item.message}}</view>
         <view class="time">
-            <van-tag wx:if="{{item.name}}" class="tag" plain type="primary">{{language[item.name]||item.name}}</van-tag>{{item.createdate}}
+            <view class="tag" wx:if="{{item.name}}">{{language[item.name]||item.name}}</view>
+            <view style="flex: 1;"></view>
+            {{item.createdate}}
         </view>
         <view wx:if="{{item.isread=='0'}}" class="unread-item" />
     </navigator>