138 Star 554 Fork 332

Fexcoin / exchange-app

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
service.js 516 Bytes
一键复制 编辑 原始数据 按行查看 历史
// 管理账号信息
const USERS_KEY = 'USERS_KEY';
const STATE_KEY = 'STATE_KEY';
const getUsers = function () {
let ret = '';
ret = uni.getStorageSync(USERS_KEY);
if (!ret) {
ret = '[]';
}
return JSON.parse(ret);
}
const addUser = function (userInfo) {
let users = getUsers();
users.push({
account: userInfo.account,
password: userInfo.password
});
uni.setStorageSync(USERS_KEY, JSON.stringify(users));
}
export default {
getUsers,
addUser
}
JavaScript
1
https://gitee.com/koch/exchange-app.git
git@gitee.com:koch/exchange-app.git
koch
exchange-app
exchange-app
master

搜索帮助