diff --git a/src/manifest.json b/src/manifest.json index 75bc553..1c5a678 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -74,7 +74,7 @@ "vueVersion": "3", "h5": { "router": { - "base": "/h5portal/", + "base": "/iws/h5portal/", "mode": "history" }, "title": "安徽机具租赁商城" diff --git a/src/pages/message/index.vue b/src/pages/message/index.vue index 895c811..dd69ea5 100644 --- a/src/pages/message/index.vue +++ b/src/pages/message/index.vue @@ -64,13 +64,18 @@ import { computed, ref, reactive } from 'vue' import { onHide, onLoad, onShow, onUnload } from '@dcloudio/uni-app' import { useMemberStore } from '@/stores/index.js' -import { getMessageListAPI, isReadMessageAllAPI } from '@/services/message/index.js' +import { + getMessageListAPI, + isReadMessageAllAPI, + getMessageListAllAPI, +} from '@/services/message/index.js' const memberStore = useMemberStore() const userName = ref('') const userAccount = ref('') const userCompanyId = ref('') const messageInterval = ref(null) const messageList = ref([]) +const messageListAll = ref([]) onLoad(() => { userName.value = memberStore.userInfo.nickName @@ -86,7 +91,9 @@ onHide(() => { }) onShow(() => { - getMessageListData() + Promise.all([getMessageListAllData()]).then(() => { + getMessageListData() + }) messageInterval.value = setInterval(() => { getMessageListData() }, 3000) @@ -116,12 +123,16 @@ const onClearNoRead = async () => { } }) const res = await isReadMessageAllAPI(isReadParams) - console.log(res, '已读结果') + // console.log(res, '已读结果') } const getMessageListData = async () => { const { data: res } = await getMessageListAPI() - messageList.value = res + messageList.value = [...new Set([...messageListAll.value, ...res])] +} +const getMessageListAllData = async () => { + const { data: res } = await getMessageListAllAPI() + messageListAll.value = res } const onJumpToMessagePages = (item) => { const { toCompany, toUser, toCompanyName, fromCompany, fromCompanyName, fromUser } = item diff --git a/src/services/message/index.js b/src/services/message/index.js index 3d6b36e..1563338 100644 --- a/src/services/message/index.js +++ b/src/services/message/index.js @@ -30,6 +30,16 @@ export const getMessageListAPI = (data) => { data, }) } +/** + * 消息 消息列表 历史列表所有 + */ +export const getMessageListAllAPI = (data) => { + return http({ + method: 'GET', + url: '/material-mall/bm_message/listFromDB', + data, + }) +} /** * 消息 消息已读 */