diff --git a/src/components/notification/index.vue b/src/components/notification/index.vue index ea61ada..385912a 100644 --- a/src/components/notification/index.vue +++ b/src/components/notification/index.vue @@ -2,15 +2,17 @@ import './index.scss' import { BjxHelper } from "../../utils"; - /** * props: todayPassTime: Json Array * example: [["YYYY-MM-DD hh:mm:ss"], ["YYYY-MM-DD hh:mm:ss"]] */ -const props = defineProps(['avatar', 'name', 'company', 'is-vip', 'pass-date', 'pass-time', 'today-pass-time']) -let lastName = BjxHelper.getBJXFirstChar(props.name) -let isVIP = JSON.parse(props.isVip) -let todayPassJsonObject = JSON.parse(props.todayPassTime) +const props = defineProps(['item']) +const item = props.item.passRecords[0] +const otherItems = props.item.passRecords.slice(1) +console.log(item.userName, otherItems.length , otherItems) +let lastName = BjxHelper.getBJXFirstChar(item.userName) +// let isVIP = props.isVip +// let todayPassJsonObject = JSON.parse(props.todayPassTime) @@ -21,61 +23,67 @@ let todayPassJsonObject = JSON.parse(props.todayPassTime) - - - {{lastName}} + + + + {{BjxHelper.getBJXFirstChar(item.userName)}} - + - - + + + - + - {{props.name}} + {{item.userName}} 无姓名 - - VIP - - - {{props.company}} + {{item.company}} 无公司信息 + +
+ + + 被阻止人员 + +
+ +
- + - + - - + + - 当日还有 {{todayPassJsonObject.length}} 次记录 + 当日还有 {{otherItems.length}} 次记录 - {{ passTime }} + {{ passTime.time }} - diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index a9761ac..e0dd056 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -1,4 +1,4 @@ -