forked from github/dataease
Merge pull request #4546 from dataease/pr@dev_memory_component
Pr@dev memory component
This commit is contained in:
commit
7bdcf0dea8
@ -7,6 +7,7 @@
|
|||||||
component-name="ThemeSetting"
|
component-name="ThemeSetting"
|
||||||
/>
|
/>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
|
v-if="$route.path !== '/login'"
|
||||||
:visible.sync="showPasswordModifiedDialog"
|
:visible.sync="showPasswordModifiedDialog"
|
||||||
append-to-body
|
append-to-body
|
||||||
:title="$t('user.change_password')"
|
:title="$t('user.change_password')"
|
||||||
@ -35,6 +36,12 @@ export default {
|
|||||||
showPasswordModifiedDialog: false
|
showPasswordModifiedDialog: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
const passwordModified = JSON.parse(localStorage.getItem('passwordModified'))
|
||||||
|
if (typeof passwordModified === 'boolean') {
|
||||||
|
this.$store.commit('user/SET_PASSWORD_MODIFIED', passwordModified)
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
passwordModified: {
|
passwordModified: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
|
@ -83,9 +83,12 @@ const actions = {
|
|||||||
commit('SET_TOKEN', data.token)
|
commit('SET_TOKEN', data.token)
|
||||||
commit('SET_LOGIN_MSG', null)
|
commit('SET_LOGIN_MSG', null)
|
||||||
setToken(data.token)
|
setToken(data.token)
|
||||||
if(data.hasOwnProperty('passwordModified')){
|
let passwordModified = true
|
||||||
commit('SET_PASSWORD_MODIFIED', data.passwordModified)
|
if (data.hasOwnProperty('passwordModified')) {
|
||||||
|
passwordModified = data.passwordModified
|
||||||
}
|
}
|
||||||
|
commit('SET_PASSWORD_MODIFIED', passwordModified)
|
||||||
|
localStorage.setItem('passwordModified', passwordModified)
|
||||||
resolve()
|
resolve()
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
Loading…
Reference in New Issue
Block a user