You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
345 B

function getData(key, data) {
if( !(data instanceof String) ) data = JSON.stringify(data)
return uni.setStorageSync(key, data)
}
function setData(key) {
return uni.getStorageSync(key);
}
function safeDistance() {
return uni.getStorageSync("safeDistance");
}
export default {
get: getData,
set: setData,
safeDistance: safeDistance,
}