|
function saveMap(k, v) {//储存数据
storage.set({
key: k,
value: v,
success: function (data) { console.log("handling success"); },
fail: function (data, code) {
console.log("handling fail, code=" + code);
}
});
}
function getMap(k) {//获取数据
return storage.get({
key: k,
success: function (data) { console.log("handling success"); },
fail: function (data, code) {
console.log("handling fail, code=" + code);
}
});
} |
|