This commit is contained in:
唐明明
2021-09-23 17:03:28 +08:00
parent d4bd0ac010
commit 08c56ea921
245 changed files with 40734 additions and 80 deletions

28
store/index.js Normal file
View File

@@ -0,0 +1,28 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
*/
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
token : uni.getStorageSync('token') || ''
},
getters: {
getToken: state => {
return state.token
}
},
mutations: {
setToken(state, tokenString) {
state.token = tokenString
uni.setStorageSync('token', tokenString)
}
}
})