wx-starlock/pages/notificationDetail/notificationDetail.vue
2025-02-06 11:37:41 +08:00

57 lines
1.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view v-if="notification">
<view class="time">创建时间{{ timeFormat(notification.createdAt, 'yyyy-mm-dd h:M') }}</view>
<view class="content">{{ notification.data }}</view>
</view>
</template>
<script>
import { timeFormat } from 'uview-plus'
export default {
data() {
return {
notification: null
}
},
onLoad(options) {
this.notification = JSON.parse(options.notification)
console.log(this.notification)
},
methods: {
timeFormat
}
}
</script>
<style lang="scss">
page {
background-color: $uni-bg-color-grey;
}
</style>
<style lang="scss" scoped>
.time {
margin-top: 24rpx;
margin-left: 25rpx;
color: #6c6c6c;
font-size: 28rpx;
font-weight: bold;
}
.content {
font-size: 28rpx;
font-weight: bold;
color: #6c6c6c;
width: 652rpx;
margin-left: 25rpx;
margin-top: 20rpx;
border-radius: 24rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 24rpx;
box-shadow: 2rpx 2rpx 10rpx rgba(0, 0, 0, 0.2);
}
</style>