/** * user_applicant --申请者 * user_manager --管理员 */ import tabBar from '../../utils/tabBar.js'; import { getUserProfile } from '@/utils/auth.js'; let type = 'user_applicant'; if (uni.getStorageSync("userInfo")) { const userInfo = JSON.parse(uni.getStorageSync("userInfo")); if (userInfo.salt === "物业人员" || userInfo.salt === '运维人员') { type = 'user_manager'; } else { type = 'user_applicant'; } } const state = { type: 'user_applicant', list: tabBar[type] } const mutations = { changeType(state, payload) { state.type = payload.type; state.list = tabBar[ payload.type]; } } export default { // namespaced: true, state, mutations }