9 changed files with 188 additions and 118 deletions
-
0src/assets/SvgIcons/activity-management.svg
-
10src/assets/SvgIcons/bell.svg
-
0src/assets/SvgIcons/cash-management.svg
-
0src/assets/SvgIcons/channel-management.svg
-
0src/assets/SvgIcons/gold-management.svg
-
0src/assets/SvgIcons/permission-management.svg
-
92src/components/dialogs/MessageDialog.vue
-
202src/views/home.vue
-
2src/views/moneyManage/executor/executor.vue
@ -0,0 +1,10 @@ |
|||||
|
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" class="design-iconfont"> |
||||
|
<path d="M20.2471 26.999C20.2471 28.6559 18.9039 29.999 17.2471 29.999C15.5904 29.9988 14.2471 28.6557 14.2471 26.999H20.2471ZM17.5244 7.5C22.0806 7.5 25.7742 11.1938 25.7744 15.75V21.6045C25.7745 22.1781 26.0027 22.7281 26.4082 23.1338L26.8154 23.541C27.1003 23.8261 27.2149 24.2398 27.1172 24.6309C26.9895 25.1417 26.5304 25.4998 26.0039 25.5H9.0459C8.5192 25.5 8.06038 25.1418 7.93262 24.6309C7.83483 24.2397 7.9493 23.8261 8.23438 23.541L8.64062 23.1338C9.04631 22.7281 9.27432 22.1782 9.27441 21.6045V15.75C9.27461 11.1939 12.9683 7.50015 17.5244 7.5Z" fill="url(#hstdcnta0__paint0_linear_1114_40363)"/> |
||||
|
<path d="M22.7617 16.501C22.3475 16.501 22.0117 16.1652 22.0117 15.751C22.0117 13.2657 19.997 11.251 17.5117 11.251C17.0975 11.251 16.7617 10.9152 16.7617 10.501C16.7617 10.0868 17.0975 9.75098 17.5117 9.75098C20.8254 9.75098 23.5117 12.4373 23.5117 15.751C23.5117 16.1652 23.1759 16.501 22.7617 16.501Z" fill="#fff"/> |
||||
|
<defs> |
||||
|
<linearGradient id="hstdcnta0__paint0_linear_1114_40363" x1="36.7782" y1="17.9995" x2="15.8579" y2="-1.1813" gradientUnits="userSpaceOnUse"> |
||||
|
<stop stop-color="#2741DE"/> |
||||
|
<stop offset="1" stop-color="#3A68F9"/> |
||||
|
</linearGradient> |
||||
|
</defs> |
||||
|
</svg> |
||||
@ -1,92 +0,0 @@ |
|||||
<script setup> |
|
||||
import { ref, onMounted } from 'vue' |
|
||||
import API from '@/util/http.js' // 假设你已有请求工具 |
|
||||
|
|
||||
const emit = defineEmits(['close', 'update-dot']) |
|
||||
const dialogRef = ref(null) |
|
||||
|
|
||||
// 模拟接口返回消息数据 |
|
||||
const messages = ref([]) |
|
||||
|
|
||||
// 获取消息接口 |
|
||||
async function getMessages() { |
|
||||
try { |
|
||||
const res = await API({ url: '/getMessages', method: 'GET' }) |
|
||||
if (res.code === 200) { |
|
||||
messages.value = res.data |
|
||||
// 如果有未读消息,通知父组件显示红点 |
|
||||
const hasUnread = messages.value.some(msg => !msg.read) |
|
||||
// emit('update-dot', false) |
|
||||
}else { |
|
||||
|
|
||||
// emit('update-dot', false) |
|
||||
|
|
||||
} |
|
||||
} catch (e) { |
|
||||
emit('update-dot', false) |
|
||||
console.error('获取消息失败:', e) |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
onMounted(() => { |
|
||||
getMessages() |
|
||||
}) |
|
||||
|
|
||||
function closeDialog() { |
|
||||
emit('close') |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<template> |
|
||||
<dialog class="message-dialog" open> |
|
||||
<div class="dialog-content"> |
|
||||
<h3>消息中心</h3> |
|
||||
<div v-if="messages.length > 0"> |
|
||||
<!-- <div |
|
||||
v-for="msg in messages" |
|
||||
:key="msg.id" |
|
||||
class="msg-item" |
|
||||
:class="{ unread: !msg.read }" |
|
||||
> |
|
||||
{{ msg.title }} |
|
||||
</div>--> |
|
||||
<div> |
|
||||
测试测试 |
|
||||
</div> |
|
||||
</div> |
|
||||
<div v-else>测试测试</div> |
|
||||
|
|
||||
<div class="dialog-footer"> |
|
||||
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
</dialog> |
|
||||
</template> |
|
||||
|
|
||||
<style scoped> |
|
||||
.message-dialog { |
|
||||
border: none; |
|
||||
border-radius: 10px; |
|
||||
background: rgba(255, 255, 255, 0.96); |
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.25); |
|
||||
width: 380px; |
|
||||
z-index: 99999; |
|
||||
} |
|
||||
.dialog-content { |
|
||||
padding: 20px; |
|
||||
} |
|
||||
.msg-item { |
|
||||
padding: 6px 0; |
|
||||
} |
|
||||
.msg-item.unread { |
|
||||
font-weight: bold; |
|
||||
color: #409eff; |
|
||||
} |
|
||||
.dialog-footer { |
|
||||
text-align: right; |
|
||||
margin-top: 20px; |
|
||||
} |
|
||||
::backdrop { |
|
||||
background-color: rgba(0, 0, 0, 0.4); |
|
||||
} |
|
||||
</style> |
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue