<!-- 消息 --> <template> <view class="message"> <TabBar></TabBar> <view class="main" v-for="(item, index) in list" :key="index"> <view class="date-time">{{item.date}}</view> <view class="card" @click="clickDetail"> <view class="title"> <!-- <text v-show="isManager">收到新的访客申请</text> <text v-show="!isManager" class="text">您的访客信息{{item.status}}</text> --> <view class="ui"> <view class="text"> <text class="name">{{item.name}}</text> <text class="number">{{item.number}}</text> </view> <view v-show="!isManager" :class="item.status === '未通过' ? 'button-area' : item.status === '已通过' ? 'button-area pass' : 'button-area submit'">申请{{item.status}}</view> </view> <view class="ui-time"> <text class="start">{{item.startTime}}</text> <text class="text"> 至 </text> <text class="end">{{item.endTime}}</text> </view> </view> <!-- <view class="content"> <text class="content-title">申请者工号:</text> <text class="value">{{item.number}}</text> </view> <view class="content"> <text>ㅤ访客姓名:</text> <text>{{item.name}}</text> </view> <view class="content"> <text>ㅤ访问时间:</text> <text>{{item.time}}</text> </view> --> <!-- <view class="detail-area"> <view class="detail" @click="clickDetail">详ㅤ情</view> </view> --> </view> </view> </view> </template> <script> import TabBar from '@/components/tabBar/tabBar.vue'; export default { components: { TabBar, }, data() { return { isManager: false, list: [ { //0未通过,1已通过,2已提交 status: '未通过', number: '1111', name: '张三', startTime: '2022-12-03', endTime: '2022-01-69', date: '星期一 上午9:00' }, { //0未通过,1已通过,2已提交 status: '已通过', number: '1111', name: '张三', startTime: '2022-12-03', endTime: '2022-01-69', date: '星期一 上午9:00' }, { //0未通过,1已通过,2已提交 status: '已提交', number: '1111', name: '张三', startTime: '2022-12-03', endTime: '2022-01-69', date: '星期一 上午9:00' }, ] } }, onShow() { let pages = getCurrentPages(); const curPage = pages[pages.length - 1]; this.currentPagePath = curPage.route; uni.setStorageSync('currentPagePath', this.currentPagePath); }, methods: { clickDetail() { wx.navigateTo({ url: '/pages/checkMessageDetail/checkMessageDetail' }) } } } </script> <style lang="scss" scoped> .message { padding: 40rpx; padding-bottom: 200rpx; .date-time { display: flex; justify-content: center; align-items: center; margin-top: 40rpx; margin-bottom: 20rpx; color: #9b9b9b; } .card { padding: 30rpx 32rpx; background-color: #fff; border-radius: 16rpx; margin-bottom: 20rpx; .title { display: flex; // flex-direction: row; flex-direction: column; // justify-content: space-between; // align-items: center; font-size: 32rpx; .ui { display: flex; flex-direction: row; justify-content: space-between; align-items: center; .text { display: flex; flex-direction: row; align-items: center; .name { color: #333; font-weight: 500; font-size: 36rpx; white-space: nowrap; } .number { color: #b1b1b1; margin-left: 20rpx; } } } .ui-time { display: flex; flex-direction: row; align-items: center; color: #b1b1b1; margin-top: 30rpx; .text { margin: 0 20rpx; } } .text { // font-weight: 600; } .button-area { padding: 6rpx 16rpx; background-color: #f02a0a; border-radius: 16rpx; color: #ecf9e8; font-size: 28rpx; white-space: nowrap; } .pass { background-color: #2ebf00; } .submit { background-color: #1076e3; } } .content { margin: 32rpx 0; .content-title { // margin-right: 32rpx; } } .detail-area { width: 100%; display: flex; justify-content: flex-end; .detail { width: fit-content; padding: 10rpx 16rpx; background-color: blue; border-radius: 16rpx; // letter-spacing: 10rpx; } } } } </style>