Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

glsx / gl_tape

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 3
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • gl_tape
  • utils
  • storages
  • storage.js
  • 前端's avatar
    oss · 6770f387
    前端 committed Apr 08, 2024
    6770f387
storage.js 334 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
export default {
  // 设置永久缓存
  set(key, value) {
    uni.setStorageSync(key, value);
  },
  // 获取永久缓存
  get(key) {
    return uni.getStorageSync(key);
  },
  // 移除永久缓存
  remove(key) {
    uni.removeStorageSync(key);
  },
  // 移除全部永久缓存
  clear() {
    uni.clearStorageSync();
  },
};