[配置]配置router

This commit is contained in:
唐明明
2021-07-23 11:52:32 +08:00
parent 17679fa432
commit 564ed944d4
57 changed files with 10291 additions and 92 deletions

24
store/index.js Normal file
View File

@@ -0,0 +1,24 @@
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)
}
},
modules: {
}
})