shish 7 месяцев назад
Родитель
Сommit
03abd23d4e
1 измененных файлов с 25 добавлено и 3 удалено
  1. 25 3
      hdApp/src/admin/home/workbench.vue

+ 25 - 3
hdApp/src/admin/home/workbench.vue

@@ -30,6 +30,7 @@
               <view class="income-value-large">
               <view class="income-value-large">
                 <text class="income-number-large">{{ $util.numberFormat(data.todayData.income) }}</text>
                 <text class="income-number-large">{{ $util.numberFormat(data.todayData.income) }}</text>
               </view>
               </view>
+              <view class="income-date-small">{{ currentDate }}</view>
             </view>
             </view>
             <view class="stats-right">
             <view class="stats-right">
               <view class="stat-item-vertical" @click.stop="pageTo({url:'/admin/custom/visit'})">
               <view class="stat-item-vertical" @click.stop="pageTo({url:'/admin/custom/visit'})">
@@ -587,6 +588,7 @@ export default {
       urlNo:1,
       urlNo:1,
       shortUrlList:[],
       shortUrlList:[],
       unReadMsgNum:0, //未读消息数
       unReadMsgNum:0, //未读消息数
+      currentDate: '', // 当前日期信息 如:12月26号 周五
     };
     };
   },
   },
   computed: {
   computed: {
@@ -607,9 +609,10 @@ export default {
     uni.stopPullDownRefresh();
     uni.stopPullDownRefresh();
   },
   },
   onLoad(){
   onLoad(){
-			getWeixinId().then(res => {
-				this.getappIdList = res.data
-			})
+		getWeixinId().then(res => {
+			this.getappIdList = res.data
+		})
+		this.updateCurrentDate()
   },
   },
   onShow () {
   onShow () {
       this.unReadMsgNum = 0; // 重置未读消息数
       this.unReadMsgNum = 0; // 重置未读消息数
@@ -1131,6 +1134,14 @@ export default {
           this.unReadMsgNum = res.data.msg_count
           this.unReadMsgNum = res.data.msg_count
         }
         }
       })
       })
+    },
+    updateCurrentDate(){
+      const now = new Date()
+      const month = now.getMonth() + 1
+      const date = now.getDate()
+      const weekDays = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
+      const week = weekDays[now.getDay()]
+      this.currentDate = `${month}-${date} ${week}`
     }
     }
   }
   }
 };
 };
@@ -1184,6 +1195,10 @@ export default {
       padding: 24upx 20upx;
       padding: 24upx 20upx;
       text-align: center;
       text-align: center;
       backdrop-filter: blur(10px);
       backdrop-filter: blur(10px);
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
       
       
       &:active {
       &:active {
         background: rgba(255, 255, 255, 0.2);
         background: rgba(255, 255, 255, 0.2);
@@ -1208,6 +1223,13 @@ export default {
           line-height: 1;
           line-height: 1;
         }
         }
       }
       }
+      
+      .income-date-small {
+        font-size: 24upx;
+        color: white;
+        margin-top: 30upx;
+        font-weight: bold;
+      }
     }
     }
     
     
     .stats-right {
     .stats-right {