当前位置:网站首页>【oops-framework】本地存储
【oops-framework】本地存储
2022-07-21 21:18:00 【dgflash_game】
功能说明
OopsFramework-本地存储模块主要封装了Cocos Crator引擎里sys.localStorage对象的跨平台平地存储功能,同时在此基础上添加了数据加密与不同帐号区分的功能。
使用说明
初始化本地存储加密
oops.storage.init("key", "vi");
注:调试模式下不会触发数据加密,方便明文调试。发布模式自动启动数据加密
初始化本地存储加密
var uid = 10000; // 用户唯一编号数据
oops.storage.setUser(uid);
注:用于区分不同账号本地存储数据,避免同名key的数据被其它账号登录时覆盖
设置指定关键字的数据
oops.storage.set(key, value);
获取指定关键字的数据
var data = oops.storage.get(key);
删除指定关键字的数据
oops.storage.remove(key);
清空整个本地存储
oops.storage.clear();
边栏推荐
- Invasion investigation of HVV blue team
- Interpretation of gaitset source code (III)
- 不谈源码,聊聊位运算的实际应用
- 为什么都说软件测试岗是巨坑?10年测试人告诉你千万别上当
- 【快速上手教程4】疯壳·开源编队无人机-OPENMV 脚本烧写
- Pyqt5 makes an exquisite video player * with source code
- 基于加权朴素贝叶斯的水质数据分类研究
- 【机器学习的数学01】可数集与不可数集
- [mathematics of machine learning 01] countable sets and uncountable sets
- Opencv combines all the pictures in one folder into a video
猜你喜欢
Part 02: distributed load balancing
实操演练 | 使用 Navicat 对 MySQL 表进行分区
Partner cloud Dai Zhikang: how to use low code to improve R & D and it efficiency
Virtual machine dual network card configuration
How to operate the security settings of windows server and what to pay attention to?
FTP服务
FPGA - SPI bus control flash (1) (including code)
Redis distributed lock
FPGA——SPI总线控制flash(1)(含代码)
为什么都说软件测试岗是巨坑?10年测试人告诉你千万别上当
随机推荐
Redis distributed lock
An access scheme based on dynamic allocation of random access opportunity
引入 CloudWeGo 后飞书管理后台平台化改造的演进史
关于目前流行的 Redis 可视化管理工具的详细评测
Framework customization series (10) -- systemui customization status bar statusbar and navigation bar tutorial
基于加权朴素贝叶斯的水质数据分类研究
[hero planet July training leetcode problem solving daily] 21st pile
实操演练 | 使用 Navicat 对 MySQL 表进行分区
An open source template that can generate a free personal blog in only three steps: vdoing template
基于射频指纹的LoRa网络安全方案研究
National technology n32g452 debugging interface multiplexing function JTDI jtdo jntrst
数据库索引对写入操作的影响
一种基于全相位FFT幅值的频率补偿方法
Go language concurrency and channel
News blog publishing system based on jsp+servlet+mysql
Flutter实战-自定义键盘(二)
How to give selenium Chrome write extension intercepts or forwards requests
Opencv combines all the pictures in one folder into a video
C language explanation series -- Explanation of goto sentences and simple exercises of circular sentences
Advantages of vr virtual simulation teaching software for cable fault monitoring