|
...
|
...
|
@@ -155,5 +155,27 @@ App({ |
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
onHide(){
|
|
|
|
console.log('obHide');
|
|
|
|
let time=new Date()/1000;
|
|
|
|
wx.getStorageInfo({
|
|
|
|
success:(res)=>{
|
|
|
|
console.log(res.keys);
|
|
|
|
if(res.keys.length>0){
|
|
|
|
res.keys.forEach(key=>{
|
|
|
|
wx.getStorage({
|
|
|
|
key:key,
|
|
|
|
success:(ca)=>{
|
|
|
|
//console.log('obHide',ca.data.timeout,time);
|
|
|
|
if(ca.data.timeout && ca.data.timeout<time){
|
|
|
|
wx.removeStorage({key:key})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|