diff --git a/package.json b/package.json index 5622223..de27006 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vue-admin", "private": true, - "version": "1.2.41", + "version": "1.3.1", "type": "module", "scripts": { "dev": "vite", diff --git a/src/api/home.js b/src/api/home.js index 365fdc4..784cc41 100644 --- a/src/api/home.js +++ b/src/api/home.js @@ -86,3 +86,17 @@ export function appMenuSave(data) { data }); } + +/** + * 消息已读 + * @returns + */ +export function unread(params) { + return request({ + method: "GET", + url: "/notification/unread", + params + }); +} + + diff --git a/src/api/shop.js b/src/api/shop.js index 34bc6e8..39ee74a 100644 --- a/src/api/shop.js +++ b/src/api/shop.js @@ -192,10 +192,10 @@ export function updateAgency(data) { * @param {*} data * @returns */ -export function messageChannel(userId, merchantCode) { +export function messageChannel(userId) { return request({ method: 'get', - url: `/merchantChannel/messageChannel/${userId}/${merchantCode}` + url: `/merchantChannel/messageChannel/${userId}` }) } diff --git a/src/views/layout/components/pageHeader.vue b/src/views/layout/components/pageHeader.vue index 30b81d3..fc3e218 100644 --- a/src/views/layout/components/pageHeader.vue +++ b/src/views/layout/components/pageHeader.vue @@ -30,12 +30,13 @@
-
+
- + {{ `[${title1[item.typefirst]}-${title2[item.typesecond]}] ${item.conrtent}` }}
@@ -75,6 +76,12 @@ import { dayjs } from "element-plus"; import { useConfigure } from "@/store/configure.js"; import { useUser } from "@/store/user.js"; import { useRoutes } from "@/store/routes.js"; +import { useRouter } from "vue-router" + +import { unread } from '@/api/home.js' + +const router = useRouter() + const storeUser = useUser(); const storeRoutes = useRoutes(); @@ -102,6 +109,23 @@ function operationFunction(type) { emits("operation", type); } +// 跳转详细详情 +function toDetail(item) { + if (item.typefirst == 1 && item.typesecond == 1) { + router.push({ + name: 'shop_detail', + query: { + id: item.userid, + type: 'msg1' + } + }) + if (!item.isdeal) { + unread({ noticecode: item.noticecode }) + storeUser.getNotices() + } + } +} + // 退出登录 function logOut() { // 清除缓存 / token 等 @@ -224,11 +248,17 @@ function logOut() { max-height: 400px; overflow-y: auto; - .item { + .list { padding: 14px 0; + } - &:not(:last-child) { - border-bottom: 1px solid #ececec; + .item { + padding: 14px; + border-radius: 8px; + + &:hover { + cursor: pointer; + background-color: #efefef; } } } diff --git a/src/views/notice/index.vue b/src/views/notice/index.vue index b673502..1f53d98 100644 --- a/src/views/notice/index.vue +++ b/src/views/notice/index.vue @@ -17,10 +17,10 @@
- + @@ -34,8 +34,14 @@ @@ -53,6 +59,7 @@ import { dayjs } from "element-plus"; import { getNotices } from "@/api/user.js"; import { title1, title2 } from '@/views/notice/noticeEnum.js' +import { unread } from '@/api/home.js' // 表格参数 const tableOptions = reactive({ @@ -85,6 +92,14 @@ async function getNoticesAjax() { } } +// 已读消息 +function readerHandle(item) { + if (!item.isdeal) { + unread({ noticecode: item.noticecode }) + } + paginationChange() +} + onMounted(() => { getNoticesAjax() }) diff --git a/src/views/organization/components/aisleInfo.vue b/src/views/organization/components/aisleInfo.vue index 696ef32..18fcaf9 100644 --- a/src/views/organization/components/aisleInfo.vue +++ b/src/views/organization/components/aisleInfo.vue @@ -75,7 +75,7 @@ const loading = ref(false) // 通道进件信息 async function messageChannelAjax() { try { - const res = await messageChannel(route.query.id, route.query.merchantcode) + const res = await messageChannel(route.query.id) reviewRemarks.value = res.reviewRemarks merchantChannels.value = res.merchantChannels form.value = res.merchantChannelMessage @@ -92,8 +92,7 @@ async function submitHandle(state, index) { type: state, errMsg: form.value[index].remake || '', userId: route.query.id, - channelId: form.value[index].channel || '', - merchantCode: route.query.merchantcode + channelId: form.value[index].channel || '' }) loading.value = false ElMessage.success('提交成功') diff --git a/src/views/organization/shop_detail.vue b/src/views/organization/shop_detail.vue index ff24b75..9f901be 100644 --- a/src/views/organization/shop_detail.vue +++ b/src/views/organization/shop_detail.vue @@ -227,6 +227,9 @@ onMounted(async () => { await merchBaseAccountAjax() await messageChannelAjax() type.value = navs[0].type + if (route.query.type && route.query.type == 'msg1') { + type.value = 5 + } })