import QuickStorage from '@/plugins/QuickStorage/index'
const Cookie = process.client ? require('js-cookie') : undefined

const mutations = {
	set_status(state, status){
		state.status = status;
	},
	set_corpId(state, id){
		state.corpId = id;
    },
	set_welcomeInfo(state, info){
		state.welcomeInfo = info;
	},
	set_channelInfo(state, info){
		state.channelInfo = info;
	},
	set_menuList(state, list){
		state.menuList = list;
	},
	set_advertTop(state, info){
		state.advertTop = info;
	},
	set_advertMiddle(state, info){
		state.advertMiddle = info;
	},
	set_advertText(state, info){
		state.advertText = info;
	},
	set_playerInfo(state, info){
		state.playerInfo = info;
	},
	set_wechatInfo(state, info){
		state.wechatInfo = info;
	},
	set_userInfo(state, info){
		if(info.status == 2){
			state.status = 401;
		}
		state.userInfo = info;
	},
	set_showRed(state, boll){
    	state.showRed = boll;
    },
    set_showRedInfo(state, obj){
        let info = {
            type: obj.type ? obj.type : '',
            id: obj.id ? obj.id : '',
        };
        state.showRedInfo = info;
        state.showRed = true;
    },
}
export default mutations;