57 lines
1.1 KiB
Vue
57 lines
1.1 KiB
Vue
<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>
|