export function setToken(token) {
	localStorage.setItem('token', token);
}

export function getToken() {
	return localStorage.getItem('token');
}

export function removeToken() {
	localStorage.removeItem('token');
}

export function setUser(user) {

	localStorage.setItem('user', JSON.stringify(user));
}

export function getUser() {
	return JSON.parse(localStorage.getItem('user'));
}

export function setNumData(numData) {
	localStorage.setItem('num', JSON.stringify(numData));
}
export function getNumData() {
	return JSON.parse(localStorage.getItem('num'));
}

// 导出一个函数，用于设置用户密码
export function setUserPass(userdata) {
	localStorage.setItem('userPass', JSON.stringify(userdata));
}
// 导出一个函数，用于获取用户密码
export function getUserPass() {
	return JSON.parse(localStorage.getItem('userPass'));
}

// 用于设置设备坐标信息 
export function setphoneXYinfo(data) {
	localStorage.setItem('XYinfo', JSON.stringify(data));
}
// 用于获取设备坐标信息
export function getphoneXYinfo() {
	return JSON.parse(localStorage.getItem('XYinfo'));
}