新增邮件发送和管理员功能
This commit is contained in:
@@ -3,5 +3,6 @@
|
||||
export const useAccountStore = defineStore('account', {
|
||||
state: () => ({
|
||||
currentAccountId: 0,
|
||||
currentAccount: {}
|
||||
})
|
||||
})
|
||||
@@ -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'],
|
||||
},
|
||||
})
|
||||
|
||||
12
mail-vue/src/store/role.js
Normal file
12
mail-vue/src/store/role.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useRoleStore = defineStore('role', {
|
||||
state: () => ({
|
||||
refresh: 0,
|
||||
}),
|
||||
actions: {
|
||||
refreshSelect() {
|
||||
this.refresh ++
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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'],
|
||||
|
||||
@@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user