This commit is contained in:
aihe 2024-02-23 13:37:05 +08:00
parent 2abc8ffd30
commit 32bf71d7fe
2 changed files with 5 additions and 36 deletions

View File

@ -1,3 +1,5 @@
import user from "./modules/user"
// #ifndef VUE3
import Vue from 'vue'
import Vuex from 'vuex'
@ -9,6 +11,9 @@ const store = new Vuex.Store({
import { createStore } from 'vuex'
const store = createStore({
// #endif
modules: {
user
},
state: {
hasLogin: false,
isUniverifyLogin: false,

View File

@ -1,36 +0,0 @@
export default {
state: {
user: {
info: {},
token: '',
}
},
mutations: {
userLogin(state, provider) {
state.user.token = '';
state.user.info = {}
},
userLogout(state) {
state.user.token = '';
state.user.info = {}
},
},
getters: {
getUserInfo(state) {
return state.user
}
},
actions: {
getUserOpenId: async function({
commit,
state
}, options) {
},
getPhoneNumber: function({
commit
}, options) {
}
}
}