flat: 压缩图片,添加消息控制
This commit is contained in:
@@ -8,7 +8,9 @@ import {
|
||||
getUserInfo,
|
||||
logout,
|
||||
refreshToken,
|
||||
mobileIsCms
|
||||
mobileIsCms,
|
||||
noticeIsEnable,
|
||||
setNoticeIsEnable
|
||||
} from '@/api/user'
|
||||
import md5 from 'js-md5'
|
||||
import {
|
||||
@@ -71,8 +73,42 @@ const user = {
|
||||
userLocation: null,
|
||||
userIsCms: false,
|
||||
resumeInfo: {},
|
||||
isEnbleNotice: false,
|
||||
},
|
||||
actions: {
|
||||
getNoticeState({
|
||||
commit,
|
||||
dispatch
|
||||
}) {
|
||||
noticeIsEnable().then(res => {
|
||||
if (res.data.code === 200) {
|
||||
const data = res.data.data ? true : false
|
||||
commit('upDateNoticeState', data)
|
||||
}
|
||||
})
|
||||
},
|
||||
setNoticeOpen({
|
||||
commit,
|
||||
dispatch
|
||||
}) {
|
||||
setNoticeIsEnable(1).then(res => {
|
||||
if (res.code === 200) {
|
||||
const data = res.data
|
||||
commit('upDateNoticeState', true)
|
||||
}
|
||||
})
|
||||
},
|
||||
setNoticeClose({
|
||||
commit,
|
||||
dispatch
|
||||
}) {
|
||||
setNoticeIsEnable(0).then(res => {
|
||||
if (res.code === 200) {
|
||||
const data = res.data
|
||||
commit('upDateNoticeState', false)
|
||||
}
|
||||
})
|
||||
},
|
||||
getResumeInfo({
|
||||
commit,
|
||||
dispatch
|
||||
@@ -242,6 +278,9 @@ const user = {
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
upDateNoticeState(state, payload) {
|
||||
state.isEnbleNotice = payload
|
||||
},
|
||||
upDataResumeInfo(state, payload) {
|
||||
state.resumeInfo = payload
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user