默认关闭教程

This commit is contained in:
marvzhang
2020-03-01 10:24:31 +08:00
parent 4a91ee62a9
commit 11defc16c2
13 changed files with 45 additions and 16 deletions

View File

@@ -16,6 +16,12 @@ const actions = {
async getSetting ({ commit }) {
const res = await request.get('/setting')
commit('SET_SETTING', res.data.data)
// set default enable_tutorial
const enableTutorial = res.data.data.enable_tutorial
if (localStorage.getItem('enableTutorial') === undefined) {
localStorage.setItem('enableTutorial', enableTutorial ? '1' : '0')
}
}
}