wx-starlock/pages/passwordDetail/passwordDetail.vue
范鹏 f9669c8d2c 1. 完成锁密码相关功能
2. 完成锁电子钥匙相关功能
2024-08-28 16:55:11 +08:00

72 lines
2.0 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>
<view class="item">
<view class="item-title">密码</view>
<view class="item-content">{{ currentPasswordInfo.keyboardPwd }}</view>
</view>
<view class="item" style="margin-top: 2rpx">
<view class="item-title">名称</view>
<view class="item-content">{{ currentPasswordInfo.keyboardPwdName }}</view>
</view>
<view class="item" style="margin-top: 2rpx">
<view class="item-title">有效期</view>
<view v-if="currentPasswordInfo.keyboardPwdType === 2">永久</view>
<view v-else>
<view class="item-content">{{ timeFormat(currentPasswordInfo.startDate, 'yyyy-mm-dd h:M') }}</view>
<view class="item-content">{{ timeFormat(currentPasswordInfo.endDate, 'yyyy-mm-dd h:M') }}</view>
</view>
</view>
<view class="item" style="margin-top: 20rpx">
<view class="item-title">发送人</view>
<view class="item-content">{{ currentPasswordInfo.senderUsername }}</view>
</view>
<view class="item" style="margin-top: 2rpx">
<view class="item-title">发送时间</view>
<view class="item-content">{{ timeFormat(currentPasswordInfo.sendDate, 'yyyy-mm-dd h:M') }}</view>
</view>
<view class="tips">密码生成后请在当日2359前使用一次进行激活否则过0点后未激活则失效</view>
</view>
</template>
<script>
import { mapState } from 'pinia'
import { useLockStore } from '@/stores/lock'
import { timeFormat } from 'uview-plus'
export default {
data () {
return {}
},
computed: {
...mapState(useLockStore, ['currentPasswordInfo']),
},
methods: {
timeFormat
},
}
</script>
<style lang="scss">
page {
background-color: $uni-bg-color-grey;
}
</style>
<style lang="scss" scoped>
.item {
padding: 24rpx 32rpx;
background-color: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
font-weight: 500;
}
.tips {
padding: 24rpx 32rpx;
font-size: 24rpx;
color: #999999;
}
</style>