// import defaultState from './state' const mutations = { RESET_ALL_STATE(state) { Object.assign(state, JSON.parse(JSON.stringify(defaultState))) console.log('重置后的 state:', state); }, setInvitedCode(state, v) { state.InviteCode = v }, setOwnerUnitId(state, v) { state.ownerUnitId = v }, setUser(state, v) { state.user = v }, shopcartOrder(state, v) { state.shopcartOrder = v }, myShopCar(state, v) { state.myShopCar = v }, unionMyShopCar(state, v) { state.unionMyShopCar = v }, nowStore(state, v) { state.nowStore = v }, orderNumber(state, v) { state.orderNumber = v }, orderInternal(state, v) { state.orderInternal = v }, appointmentOrder(state, v) { state.appointmentOrder = v }, couponPrice(state, v) { state.couponPrice = v }, orderTable(state, v) { state.orderTable = v }, canIuse(state, v) { state.canIuse = v }, setIsLoading(state, v) { state.isLoading = v }, refresh(state, v) { state.refresh = v }, payForVip(state, v) { state.payForVip = v }, orderRemark(state, v) { state.orderRemark = v }, setprovinceCode(state, v) { state.provinceCode = v }, setHomeServer(state, v) { state.serverPart = v state.discoveryServerPart = v state.appointServerPart = v }, discoveryServerPart(state, v) { state.discoveryServerPart = v }, setAppointServerPart(state, v) { state.appointServerPart = v }, orderAddress(state, v) { state.orderAddress = v }, severList(state, v) { state.severList = v }, setVisitChannels(state, data) { state.visitChannels = data }, } const defaultState = { user: {}, InviteCode: '', // 被邀请码 shopcartOrder: {}, // 购物车信息 myShopCar: [], // 购物车信息 unionMyShopCar: [], // 工会之家购物车信息 nowStore: {}, // 当前点餐的商家信息 orderNumber: '', // 订单号 orderInternal: '', // 订单内码 appointmentOrder: {}, // 预约信息 couponPrice: '', // 优惠券 orderTable: '', // 扫码点餐桌号 canIuse: false, // 是否需要授权 isLoading: false, // 是否在加载 orderRemark: '', // 订单备注 refresh: false, // 是否刷新, payForVip: false, provinceCode: '', // 用户最近访问门店的省份编码 orderAddress: '', // 商城下单需要选择的配送地址id severList: [], // 当前定位服务区列表 serverPart: '', // 用户首页当前选中的服务区信息 (首页和发现) discoveryServerPart: '', // 用户发现的服务区信息 appointServerPart: '', // 用户预约页面的服务区信息 ownerUnitId: '',// 当前定位业主id visitChannels: '', } export default mutations