import tools from "@/service/tools"; const state = { token: uni.getStorageSync('token') || '', m_id: uni.getStorageSync('m_id') || '' } const mutations = { setToken(state, data) { state.token = data.token state.m_id = data.m_id uni.setStorageSync("token", data.token); uni.setStorageSync("m_id", data.m_id); }, removeToken(state) { state.token = '' state.m_id = '' uni.removeStorageSync("token"); uni.removeStorageSync("m_id"); } } const actions = { async getSignInInfo(context, data) { }, async login(context, data) { } } export default { namespaced: true, state, mutations, actions }