// 存储值:
wx.setStorage({
key: "key", // 存储的key值
data: data // 需要存储的值
})
// 获取值:
wx.getStorage({
key: "key", // 和存储的key值一致;
success: function(res){
console.log(res.data) // 在这里打印出存储的值;
}
})
// 存储值:
wx.setStorage({
key: "key", // 存储的key值
data: data // 需要存储的值
})
// 获取值:
wx.getStorage({
key: "key", // 和存储的key值一致;
success: function(res){
console.log(res.data) // 在这里打印出存储的值;
}
})