import request from "@/common/request/index.js";
export default{
	namespaced: true,
	state: {
		addressValue:{}
	},
	mutations: {
		increment(state, options) {
			Object.keys(options).forEach(item => state[item] = options[item])
		}
	},
	actions: {
		async requestFunc({commit,state},options){
			var result=await request({method:"get",url:"/customer/address/",data:{default:1}});
			if(result.code==0) commit("increment",{addressValue:result.data[0] || {}});
		}
	}
}