mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
我都笔记组件提取
This commit is contained in:
@@ -11,10 +11,12 @@ const getters = {
|
||||
orgId: state => state.user.orgId,
|
||||
permissions: state => state.user.permissions,
|
||||
identity: state => state.user.identity,
|
||||
intTimeNote: state => state.user.intTimeNote,
|
||||
curIdentity: state => state.user.curIdentity,
|
||||
permission_routes: state => state.permission.routes,
|
||||
sidebarRouters: state => state.permission.sidebarRouters,
|
||||
portalCase: state => state.portal.case,
|
||||
// intTimeNote: state => state.portal.intTimeNote,
|
||||
portalLoginRememberMe: state => state.portal.loginRememberMe,
|
||||
portalBackUrl: state => state.portal.backUrl,
|
||||
resOwnerMap:state => state.resOwner.resOwnerMap,
|
||||
|
||||
@@ -3,7 +3,7 @@ const state = {
|
||||
readProtocol: sessionStorage.getItem("readProtocol") == null ? false : JSON.parse(sessionStorage.getItem("readProtocol"))
|
||||
},
|
||||
loginRememberMe: sessionStorage.getItem("loginRememberMe") == null ? {} : JSON.parse(sessionStorage.getItem("loginRememberMe")),
|
||||
backUrl:''
|
||||
backUrl:'',
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
@@ -18,6 +18,7 @@ const mutations = {
|
||||
SET_BackUrl: (state, u) => {
|
||||
state.backUrl = u;
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
const actions = {
|
||||
|
||||
@@ -15,8 +15,12 @@ const user = {
|
||||
studyTaskCount:0,//学习任务数
|
||||
curIdentity: sessionStorage.getItem("curIdentity") == null ? 1 : sessionStorage.getItem("curIdentity"), // 用户当前选择的身份 1学员 2教师 3管理员
|
||||
permissions: [],
|
||||
intTimeNote:0,
|
||||
},
|
||||
mutations: {
|
||||
SET_IntTimeNote: (state, u) => {
|
||||
state.intTimeNote = u;
|
||||
},
|
||||
SET_Identity: (state, iden) => {
|
||||
state.identity = iden
|
||||
},
|
||||
@@ -41,6 +45,14 @@ const user = {
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
SetIntTimeNote({
|
||||
commit
|
||||
}, iden) {
|
||||
return new Promise((resolve) => {
|
||||
commit('SET_IntTimeNote', iden);
|
||||
resolve();
|
||||
})
|
||||
},
|
||||
refrashMsg({ commit }) {
|
||||
apiMessage.isRead().then(res=>{
|
||||
if(res.status==200){
|
||||
|
||||
Reference in New Issue
Block a user