...
|
...
|
@@ -37,15 +37,15 @@ import { MessageCountType, PageMessageListType } from '../../types' |
|
|
const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance }
|
|
|
|
|
|
const list = ref<PageMessageListType[]>([
|
|
|
{ title: '系统通知', text: '', numKey: 'sysCount', textkey: 'sysFirstContent', BadgeNum: 0, time: '暂无', type: '1', imgUrl: '/static/images/response.png' },
|
|
|
{ title: '用户反馈', text: '', numKey: 'userCount', textkey: 'userFirstContent', BadgeNum: 0, time: '暂无', type: '2', imgUrl: '/static/images/message.png' },
|
|
|
{ title: '续方通知', text: '', numKey: 'xufangCount', textkey: 'xufangContent', BadgeNum: 0, time: '暂无', type: '3', imgUrl: '/static/images/xftz.png', url: '/pages2/order/renew' }
|
|
|
{ title: '系统通知', text: '', numKey: 'sysCount', textkey: 'sysFirstContent', timeKey: 'sysFirstTime', BadgeNum: 0, time: '暂无', type: '1', imgUrl: '/static/images/response.png' },
|
|
|
{ title: '用户反馈', text: '', numKey: 'userCount', textkey: 'userFirstContent', timeKey: 'userFirstTime', BadgeNum: 0, time: '暂无', type: '2', imgUrl: '/static/images/message.png' },
|
|
|
{ title: '续方通知', text: '', numKey: 'xufangCount', textkey: 'xufangContent', timeKey: 'xufangTime', BadgeNum: 0, time: '暂无', type: '3', imgUrl: '/static/images/xftz.png', url: '/pages2/order/renew' }
|
|
|
])
|
|
|
|
|
|
const getDataHandler = async () => {
|
|
|
const { result }: { result: MessageCountType } = await getMsg_count()
|
|
|
|
|
|
list.value = list.value.map(_ => ({ ..._, BadgeNum: result[_.numKey] || 0, text: result[_.textkey] || '暂无消息' }))
|
|
|
list.value = list.value.map(_ => ({ ..._, BadgeNum: result[_.numKey] || 0, text: result[_.textkey] || '暂无消息', time: result[_.timeKey] || '暂无' }))
|
|
|
}
|
|
|
|
|
|
const jumpUrlHandler = (_: PageMessageListType) => (['1', '2'].includes(_.type) ? proxy.$h.jumpUrl(`/pages2/message/list?title=${_.title}&type=${_.type}`) : proxy.$h.jumpUrl(_.url))
|
...
|
...
|
@@ -68,9 +68,10 @@ onShow(() => getDataHandler()) |
|
|
font-size: 36rpx;
|
|
|
font-weight: 700;
|
|
|
margin-bottom: 8rpx;
|
|
|
width: fit-content;
|
|
|
}
|
|
|
&-text {
|
|
|
width: 65vw;
|
|
|
width: 50vw;
|
|
|
color: #666666;
|
|
|
font-size: 26rpx;
|
|
|
@include oneLine(2);
|
...
|
...
|
@@ -79,6 +80,7 @@ onShow(() => getDataHandler()) |
|
|
color: #999999;
|
|
|
font-size: 26rpx;
|
|
|
margin-bottom: 12rpx;
|
|
|
width: max-content;
|
|
|
}
|
|
|
.poBox {
|
|
|
position: relative;
|
...
|
...
|
|