mirror of https://gitee.com/godoos/godoos.git
15 changed files with 1015 additions and 519 deletions
@ -0,0 +1,153 @@ |
|||||
|
/* eslint-disable */ |
||||
|
// @ts-nocheck
|
||||
|
// Generated by unplugin-vue-components
|
||||
|
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
|
export {} |
||||
|
|
||||
|
/* prettier-ignore */ |
||||
|
declare module 'vue' { |
||||
|
export interface GlobalComponents { |
||||
|
Ad: typeof import('./src/components/desktop/Ad.vue')['default'] |
||||
|
AddApp: typeof import('./src/components/store/AddApp.vue')['default'] |
||||
|
AppIcon: typeof import('./src/components/taskbar/AppIcon.vue')['default'] |
||||
|
AppIconGroup: typeof import('./src/components/taskbar/AppIconGroup.vue')['default'] |
||||
|
AppItem: typeof import('./src/components/store/AppItem.vue')['default'] |
||||
|
Battery: typeof import('./src/components/taskbar/Battery.vue')['default'] |
||||
|
BatteryPop: typeof import('./src/components/taskbar/BatteryPop.vue')['default'] |
||||
|
Browser: typeof import('./src/components/builtin/Browser.vue')['default'] |
||||
|
Calendar: typeof import('./src/components/builtin/Calendar.vue')['default'] |
||||
|
Chat: typeof import('./src/components/chat/Chat.vue')['default'] |
||||
|
ChatBox: typeof import('./src/components/chat/ChatBox.vue')['default'] |
||||
|
ChatContent: typeof import('./src/components/localchat/ChatContent.vue')['default'] |
||||
|
ChatDomain: typeof import('./src/components/localchat/ChatDomain.vue')['default'] |
||||
|
ChatEditor: typeof import('./src/components/localchat/ChatEditor.vue')['default'] |
||||
|
ChatFoot: typeof import('./src/components/localchat/ChatFoot.vue')['default'] |
||||
|
ChatMenu: typeof import('./src/components/chat/ChatMenu.vue')['default'] |
||||
|
ChatMessage: typeof import('./src/components/chat/ChatMessage.vue')['default'] |
||||
|
ChatMsgList: typeof import('./src/components/chat/ChatMsgList.vue')['default'] |
||||
|
ChatNav: typeof import('./src/components/localchat/ChatNav.vue')['default'] |
||||
|
ChatUserInfo: typeof import('./src/components/chat/chatUserInfo.vue')['default'] |
||||
|
ChatUserList: typeof import('./src/components/chat/ChatUserList.vue')['default'] |
||||
|
ChatUserSetting: typeof import('./src/components/chat/ChatUserSetting.vue')['default'] |
||||
|
ChatWorkList: typeof import('./src/components/chat/ChatWorkList.vue')['default'] |
||||
|
CloseButton: typeof import('./src/components/ui/CloseButton.vue')['default'] |
||||
|
CloseDesktop: typeof import('./src/components/desktop/CloseDesktop.vue')['default'] |
||||
|
ColorPicker: typeof import('./src/components/setting/ColorPicker.vue')['default'] |
||||
|
Computer: typeof import('./src/components/computer/Computer.vue')['default'] |
||||
|
ComputerNavBar: typeof import('./src/components/computer/ComputerNavBar.vue')['default'] |
||||
|
ContextMenu: typeof import('./src/components/builtin/ContextMenu.vue')['default'] |
||||
|
CreateUrl: typeof import('./src/components/builtin/CreateUrl.vue')['default'] |
||||
|
CustomIcon: typeof import('./src/components/taskbar/CustomIcon.vue')['default'] |
||||
|
DateNote: typeof import('./src/components/builtin/DateNote.vue')['default'] |
||||
|
DateTime: typeof import('./src/components/taskbar/DateTime.vue')['default'] |
||||
|
DateTimePop: typeof import('./src/components/taskbar/DateTimePop.vue')['default'] |
||||
|
DeskItem: typeof import('./src/components/desktop/DeskItem.vue')['default'] |
||||
|
Desktop: typeof import('./src/components/desktop/Desktop.vue')['default'] |
||||
|
DesktopBackground: typeof import('./src/components/desktop/DesktopBackground.vue')['default'] |
||||
|
DialogProcess: typeof import('./src/components/window/DialogProcess.vue')['default'] |
||||
|
DialogTemp: typeof import('./src/components/window/DialogTemp.vue')['default'] |
||||
|
EditFileName: typeof import('./src/components/builtin/EditFileName.vue')['default'] |
||||
|
EditType: typeof import('./src/components/builtin/EditType.vue')['default'] |
||||
|
ElAside: typeof import('element-plus/es')['ElAside'] |
||||
|
ElAvatar: typeof import('element-plus/es')['ElAvatar'] |
||||
|
ElButton: typeof import('element-plus/es')['ElButton'] |
||||
|
ElCard: typeof import('element-plus/es')['ElCard'] |
||||
|
ElCarousel: typeof import('element-plus/es')['ElCarousel'] |
||||
|
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem'] |
||||
|
ElCol: typeof import('element-plus/es')['ElCol'] |
||||
|
ElContainer: typeof import('element-plus/es')['ElContainer'] |
||||
|
ElDialog: typeof import('element-plus/es')['ElDialog'] |
||||
|
ElDrawer: typeof import('element-plus/es')['ElDrawer'] |
||||
|
ElFooter: typeof import('element-plus/es')['ElFooter'] |
||||
|
ElForm: typeof import('element-plus/es')['ElForm'] |
||||
|
ElFormItem: typeof import('element-plus/es')['ElFormItem'] |
||||
|
ElHeader: typeof import('element-plus/es')['ElHeader'] |
||||
|
ElIcon: typeof import('element-plus/es')['ElIcon'] |
||||
|
ElInput: typeof import('element-plus/es')['ElInput'] |
||||
|
ElMain: typeof import('element-plus/es')['ElMain'] |
||||
|
ElMenu: typeof import('element-plus/es')['ElMenu'] |
||||
|
ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] |
||||
|
ElPagination: typeof import('element-plus/es')['ElPagination'] |
||||
|
ElProgress: typeof import('element-plus/es')['ElProgress'] |
||||
|
ElRow: typeof import('element-plus/es')['ElRow'] |
||||
|
ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] |
||||
|
ElTooltip: typeof import('element-plus/es')['ElTooltip'] |
||||
|
ElTransfer: typeof import('element-plus/es')['ElTransfer'] |
||||
|
ElTree: typeof import('element-plus/es')['ElTree'] |
||||
|
Error: typeof import('./src/components/taskbar/Error.vue')['default'] |
||||
|
FileIcon: typeof import('./src/components/builtin/FileIcon.vue')['default'] |
||||
|
FileIconImg: typeof import('./src/components/builtin/FileIconImg.vue')['default'] |
||||
|
FileIconIs: typeof import('./src/components/builtin/FileIconIs.vue')['default'] |
||||
|
FileList: typeof import('./src/components/builtin/FileList.vue')['default'] |
||||
|
FileProps: typeof import('./src/components/builtin/FileProps.vue')['default'] |
||||
|
FileTree: typeof import('./src/components/builtin/FileTree.vue')['default'] |
||||
|
FileViewer: typeof import('./src/components/builtin/FileViewer.vue')['default'] |
||||
|
IframeFile: typeof import('./src/components/window/IframeFile.vue')['default'] |
||||
|
ImageViewer: typeof import('./src/components/builtin/ImageViewer.vue')['default'] |
||||
|
Install: typeof import('./src/components/install/Install.vue')['default'] |
||||
|
InstallCompony: typeof import('./src/components/install/InstallCompony.vue')['default'] |
||||
|
InstallMember: typeof import('./src/components/install/InstallMember.vue')['default'] |
||||
|
InstallPerson: typeof import('./src/components/install/InstallPerson.vue')['default'] |
||||
|
LocalChat: typeof import('./src/components/localchat/LocalChat.vue')['default'] |
||||
|
LockDesktop: typeof import('./src/components/desktop/LockDesktop.vue')['default'] |
||||
|
Magnet: typeof import('./src/components/taskbar/Magnet.vue')['default'] |
||||
|
MarkDown: typeof import('./src/components/builtin/MarkDown.vue')['default'] |
||||
|
MenuBar: typeof import('./src/components/window/MenuBar.vue')['default'] |
||||
|
MenuList: typeof import('./src/components/taskbar/MenuList.vue')['default'] |
||||
|
MessageCenterPop: typeof import('./src/components/taskbar/MessageCenterPop.vue')['default'] |
||||
|
MessageIcon: typeof import('./src/components/taskbar/MessageIcon.vue')['default'] |
||||
|
MusicStore: typeof import('./src/components/builtin/MusicStore.vue')['default'] |
||||
|
MusicViewer: typeof import('./src/components/builtin/MusicViewer.vue')['default'] |
||||
|
NetWork: typeof import('./src/components/taskbar/NetWork.vue')['default'] |
||||
|
NetworkPop: typeof import('./src/components/taskbar/NetworkPop.vue')['default'] |
||||
|
NotFound: typeof import('./src/components/window/NotFound.vue')['default'] |
||||
|
Notice: typeof import('./src/components/desktop/Notice.vue')['default'] |
||||
|
NotifyGroup: typeof import('./src/components/builtin/NotifyGroup.vue')['default'] |
||||
|
OpeningDesktop: typeof import('./src/components/desktop/OpeningDesktop.vue')['default'] |
||||
|
OpenWiteDialog: typeof import('./src/components/builtin/OpenWiteDialog.vue')['default'] |
||||
|
OsImage: typeof import('./src/components/builtin/OsImage.vue')['default'] |
||||
|
PdfViewer: typeof import('./src/components/builtin/PdfViewer.vue')['default'] |
||||
|
PictureStore: typeof import('./src/components/builtin/PictureStore.vue')['default'] |
||||
|
PlanTasks: typeof import('./src/components/oa/PlanTasks.vue')['default'] |
||||
|
ProcessManager: typeof import('./src/components/setting/ProcessManager.vue')['default'] |
||||
|
QuickLink: typeof import('./src/components/computer/QuickLink.vue')['default'] |
||||
|
RectChosen: typeof import('./src/components/builtin/RectChosen.vue')['default'] |
||||
|
RouterLink: typeof import('vue-router')['RouterLink'] |
||||
|
RouterView: typeof import('vue-router')['RouterView'] |
||||
|
Screen: typeof import('./src/components/desktop/Screen.vue')['default'] |
||||
|
ScreenContent: typeof import('./src/components/desktop/ScreenContent.vue')['default'] |
||||
|
ScreenRecorder: typeof import('./src/components/taskbar/ScreenRecorder.vue')['default'] |
||||
|
Screenshort: typeof import('./src/components/taskbar/Screenshort.vue')['default'] |
||||
|
SetAccount: typeof import('./src/components/setting/SetAccount.vue')['default'] |
||||
|
SetCustom: typeof import('./src/components/setting/SetCustom.vue')['default'] |
||||
|
SetFilePwd: typeof import('./src/components/setting/SetFilePwd.vue')['default'] |
||||
|
SetLang: typeof import('./src/components/setting/SetLang.vue')['default'] |
||||
|
SetSystem: typeof import('./src/components/setting/SetSystem.vue')['default'] |
||||
|
Setting: typeof import('./src/components/setting/Setting.vue')['default'] |
||||
|
SetUpdate: typeof import('./src/components/setting/SetUpdate.vue')['default'] |
||||
|
ShareFiles: typeof import('./src/components/oa/ShareFiles.vue')['default'] |
||||
|
ShowNews: typeof import('./src/components/taskbar/ShowNews.vue')['default'] |
||||
|
StartMenu: typeof import('./src/components/taskbar/StartMenu.vue')['default'] |
||||
|
StartOption: typeof import('./src/components/taskbar/StartOption.vue')['default'] |
||||
|
StateIcon: typeof import('./src/components/taskbar/StateIcon.vue')['default'] |
||||
|
Store: typeof import('./src/components/store/Store.vue')['default'] |
||||
|
Taskbar: typeof import('./src/components/taskbar/Taskbar.vue')['default'] |
||||
|
Upgrade: typeof import('./src/components/desktop/Upgrade.vue')['default'] |
||||
|
UpPopover: typeof import('./src/components/computer/UpPopover.vue')['default'] |
||||
|
UrlBrowser: typeof import('./src/components/builtin/UrlBrowser.vue')['default'] |
||||
|
Version: typeof import('./src/components/builtin/Version.vue')['default'] |
||||
|
VideoViewer: typeof import('./src/components/builtin/VideoViewer.vue')['default'] |
||||
|
WinButton: typeof import('./src/components/ui/WinButton.vue')['default'] |
||||
|
WinCheckBox: typeof import('./src/components/ui/WinCheckBox.vue')['default'] |
||||
|
WindowGroup: typeof import('./src/components/window/WindowGroup.vue')['default'] |
||||
|
WindowInner: typeof import('./src/components/window/WindowInner.vue')['default'] |
||||
|
WindowNode: typeof import('./src/components/window/WindowNode.vue')['default'] |
||||
|
WindowTemplate: typeof import('./src/components/window/WindowTemplate.vue')['default'] |
||||
|
WinInput: typeof import('./src/components/ui/WinInput.vue')['default'] |
||||
|
WinLoading: typeof import('./src/components/ui/WinLoading.vue')['default'] |
||||
|
WinLogo: typeof import('./src/components/ui/WinLogo.vue')['default'] |
||||
|
WinProcess: typeof import('./src/components/ui/WinProcess.vue')['default'] |
||||
|
WinSelect: typeof import('./src/components/ui/WinSelect.vue')['default'] |
||||
|
WinUpButtonGroup: typeof import('./src/components/ui/WinUpButtonGroup.vue')['default'] |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -1,97 +1,97 @@ |
|||||
|
import { fetchGet, getSystemConfig } from "@/system/config"; |
||||
import { defineStore } from "pinia"; |
import { defineStore } from "pinia"; |
||||
import { ref } from "vue"; |
import { ref } from "vue"; |
||||
import { getSystemConfig, fetchGet } from "@/system/config"; |
|
||||
import { useUpgradeStore } from "./upgrade"; |
import { useUpgradeStore } from "./upgrade"; |
||||
export const useNotifyStore = defineStore('notifyStore', () => { |
export const useNotifyStore = defineStore('notifyStore', () => { |
||||
const config = getSystemConfig(); |
const config = getSystemConfig(); |
||||
const upgradeStore = useUpgradeStore() |
const upgradeStore = useUpgradeStore() |
||||
const notifyList: any = ref([]); |
const notifyList: any = ref([]); |
||||
const readList: any = ref([]) |
const readList: any = ref([]) |
||||
const showNews = ref(false) |
const showNews = ref(false) |
||||
const newsDetail = ref({}) |
const newsDetail = ref({}) |
||||
const page = ref({ |
const page = ref({ |
||||
current: 1, |
current: 1, |
||||
size: 10, |
size: 10, |
||||
total: 0, |
total: 0, |
||||
pages: 0, |
pages: 0, |
||||
}) |
}) |
||||
async function getList() { |
async function getList() { |
||||
if (config.userType == 'person') { |
if (config.userType == 'person') { |
||||
return |
return |
||||
} |
|
||||
const complition = await fetchGet(config.userInfo.url + '/news/list?page=' + page.value.current + '&limit=' + page.value.size) |
|
||||
if (!complition.ok) { |
|
||||
return; |
|
||||
} |
|
||||
const data = await complition.json(); |
|
||||
if (data.success) { |
|
||||
page.value.total = data.data.total; |
|
||||
notifyList.value = data.data.list; |
|
||||
page.value.pages = Math.ceil(page.value.total / page.value.size) |
|
||||
checkNotify() |
|
||||
} |
|
||||
|
|
||||
} |
} |
||||
const checkNotify = ()=> { |
const complition = await fetchGet(config.userInfo.url + '/news/list?page=' + page.value.current + '&limit=' + page.value.size) |
||||
const list = notifyList.value.filter((item: any) => { |
if (!complition.ok) { |
||||
return readList.value.indexOf(item.id) < 0 |
return; |
||||
}) |
|
||||
if(list.length < 1)return; |
|
||||
const centerList = list.filter((item: any) => { |
|
||||
return item.position == 'center' |
|
||||
}) |
|
||||
const bottomList = list.filter((item: any) => { |
|
||||
return item.position == 'bottom' |
|
||||
}) |
|
||||
if(centerList.length > 0){ |
|
||||
upgradeStore.hasAd = true |
|
||||
upgradeStore.adList = [...centerList, ...upgradeStore.adList] |
|
||||
} |
|
||||
if(bottomList.length > 0){ |
|
||||
upgradeStore.hasNotice = true |
|
||||
upgradeStore.noticeList = [...bottomList, ...upgradeStore.noticeList] |
|
||||
} |
|
||||
|
|
||||
} |
} |
||||
const addRead = (id: number) => { |
const data = await complition.json(); |
||||
if (readList.value.indexOf(id) < 0) { |
if (data.success) { |
||||
readList.value.push(id) |
page.value.total = data.data.total; |
||||
} |
notifyList.value = data.data.list; |
||||
|
page.value.pages = Math.ceil(page.value.total / page.value.size) |
||||
|
checkNotify() |
||||
} |
} |
||||
const pageClick = async (pageNum: any) => { |
|
||||
//console.log(pageNum)
|
} |
||||
page.value.current = pageNum |
const checkNotify = () => { |
||||
await getList() |
const list = notifyList.value.filter((item: any) => { |
||||
|
return readList.value.indexOf(item.id) < 0 |
||||
|
}) |
||||
|
if (list.length < 1) return; |
||||
|
const centerList = list.filter((item: any) => { |
||||
|
return item.position == 'center' |
||||
|
}) |
||||
|
const bottomList = list.filter((item: any) => { |
||||
|
return item.position == 'bottom' |
||||
|
}) |
||||
|
if (centerList.length > 0) { |
||||
|
upgradeStore.hasAd = true |
||||
|
upgradeStore.adList = [...centerList, ...upgradeStore.adList] |
||||
} |
} |
||||
const viewContent = (item :any) =>{ |
if (bottomList.length > 0) { |
||||
const timestamp = item.add_time * 1000; // 将 10 位时间戳转换为 13 位
|
upgradeStore.hasNotice = true |
||||
const date = new Date(timestamp); |
upgradeStore.noticeList = [...bottomList, ...upgradeStore.noticeList] |
||||
item.showtime = date.toLocaleString(); |
|
||||
newsDetail.value = item |
|
||||
addRead(item.id) |
|
||||
showNews.value = true |
|
||||
} |
} |
||||
return { |
|
||||
notifyList, |
} |
||||
showNews, |
const addRead = (id: number) => { |
||||
newsDetail, |
if (readList.value.indexOf(id) < 0) { |
||||
getList, |
readList.value.push(id) |
||||
addRead, |
|
||||
page, |
|
||||
pageClick, |
|
||||
readList, |
|
||||
viewContent |
|
||||
} |
} |
||||
|
} |
||||
|
const pageClick = async (pageNum: any) => { |
||||
|
//console.log(pageNum)
|
||||
|
page.value.current = pageNum |
||||
|
await getList() |
||||
|
} |
||||
|
const viewContent = (item: any) => { |
||||
|
const timestamp = item.add_time * 1000; // 将 10 位时间戳转换为 13 位
|
||||
|
const date = new Date(timestamp); |
||||
|
item.showtime = date.toLocaleString(); |
||||
|
newsDetail.value = item |
||||
|
addRead(item.id) |
||||
|
showNews.value = true |
||||
|
} |
||||
|
return { |
||||
|
notifyList, |
||||
|
showNews, |
||||
|
newsDetail, |
||||
|
getList, |
||||
|
addRead, |
||||
|
page, |
||||
|
pageClick, |
||||
|
readList, |
||||
|
viewContent |
||||
|
} |
||||
}, { |
}, { |
||||
persist: { |
persist: { |
||||
enabled: true, |
enabled: true, |
||||
strategies: [ |
strategies: [ |
||||
{ |
{ |
||||
storage: localStorage, |
storage: localStorage, |
||||
paths: [ |
paths: [ |
||||
"readList", |
"readList", |
||||
] |
] |
||||
}, // name 字段用localstorage存储
|
}, // name 字段用localstorage存储
|
||||
], |
], |
||||
} |
} |
||||
}) |
}) |
Loading…
Reference in new issue