|
@@ -51,6 +51,7 @@ const store = new Vuex.Store({ |
|
|
refreshToken: lifeData.refreshToken || '', |
|
|
refreshToken: lifeData.refreshToken || '', |
|
|
allOptions: lifeData.allOptions || { |
|
|
allOptions: lifeData.allOptions || { |
|
|
monitorList: [], //摄像头列表 |
|
|
monitorList: [], //摄像头列表 |
|
|
|
|
|
monitorList:[], //楼栋列表 |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
actions: { |
|
|
actions: { |
|
@@ -71,18 +72,20 @@ const store = new Vuex.Store({ |
|
|
name: 'token', |
|
|
name: 'token', |
|
|
value: payload.token |
|
|
value: payload.token |
|
|
}) |
|
|
}) |
|
|
context.commit('$uStore', { |
|
|
|
|
|
name: 'refreshToken', |
|
|
|
|
|
value: payload.refreshToken || '' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
if (payload.refreshToken) { |
|
|
|
|
|
context.commit('$uStore', { |
|
|
|
|
|
name: 'refreshToken', |
|
|
|
|
|
value: payload.refreshToken || '' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
clearToken(context) { |
|
|
clearToken(context) { |
|
|
context.commit('$uStore', { |
|
|
context.commit('$uStore', { |
|
|
name: 'token', |
|
|
name: 'token', |
|
|
value: '' |
|
|
value: '' |
|
|
}) |
|
|
}) |
|
|
context.commit('refreshToken', { |
|
|
|
|
|
name: 'token', |
|
|
|
|
|
|
|
|
context.commit('$uStore', { |
|
|
|
|
|
name: 'refreshToken', |
|
|
value: '' |
|
|
value: '' |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|