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
405 B
19 lines
405 B
5 years ago
|
function getFinishLabs() {
|
||
|
const sto = wx.getStorageSync('finishLabs');
|
||
|
if (sto) {
|
||
|
return JSON.parse(sto);
|
||
|
}
|
||
|
return {};
|
||
|
}
|
||
|
|
||
|
function finish(id) {
|
||
|
const current = getFinishLabs();
|
||
|
current[id] = 1;
|
||
|
wx.setStorageSync('finishLabs', JSON.stringify(current));
|
||
|
}
|
||
|
|
||
|
function clear() {
|
||
|
wx.setStorageSync('finishLabs', '');
|
||
|
}
|
||
|
|
||
|
module.exports = { getFinishLabs, finish, clear };
|