新增邮件发送和管理员功能

This commit is contained in:
eoao
2025-05-29 17:38:50 +08:00
parent de742d31e7
commit 2341d14b2d
364 changed files with 24202 additions and 1079 deletions

View File

@@ -3,5 +3,6 @@
export const useAccountStore = defineStore('account', {
state: () => ({
currentAccountId: 0,
currentAccount: {}
})
})

View File

@@ -5,9 +5,14 @@ export const useEmailStore = defineStore('email', {
deleteIds: 0,
starScroll: null,
emailScroll: null,
readEmail: {},
contentData: {
email: null,
delType: null,
showStar: true
},
sendScroll: null,
}),
persist: {
pick: ['readEmail'],
pick: ['contentData'],
},
})

View File

@@ -0,0 +1,12 @@
import { defineStore } from 'pinia'
export const useRoleStore = defineStore('role', {
state: () => ({
refresh: 0,
}),
actions: {
refreshSelect() {
this.refresh ++
}
}
})

View File

@@ -1,21 +1,13 @@
import { defineStore } from 'pinia'
import { settingQuery} from "@/request/setting.js";
export const useSettingStore = defineStore('setting', {
state: () => ({
domainList: [],
settings: {
title: '-'
r2Domain: ''
}
}),
actions: {
async initSetting() {
if (this.domainList.length === 0) {
const data = await settingQuery()
this.domainList.push(...data.domainList)
delete data.domainList
this.settings = data
}
}
}
})

View File

@@ -3,9 +3,14 @@ import { defineStore } from 'pinia'
export const useUiStore = defineStore('ui', {
state: () => ({
asideShow: window.innerWidth > 991,
loginLoading: false,
accountShow: false,
init: true,
backgroundLoading: true,
writerRef: null,
asideCount: {
email: 0,
send: 0,
sysEmail: 0
}
}),
persist: {
pick: ['accountShow'],

View File

@@ -1,7 +1,15 @@
import { defineStore } from 'pinia'
import {loginUserInfo} from "@/request/my.js";
export const useUserStore = defineStore('user', {
state: () => ({
user: {},
})
}),
actions: {
refreshUserInfo() {
loginUserInfo().then(user => {
this.user = user
})
}
}
})