钉钉小程序 登录记住密码
钉钉小程序 登录记住密码
1、在登录成功后添加缓存
dd.setStorage({ key: 'username', data: "账号", }); dd.setStorage({ key: 'password', data: "密码", });
2、在onLoad加载事件里面读取缓存
const zh = dd.getStorageSync({ key: 'username' }); const mm = dd.getStorageSync({ key: 'password' }); this.setData({ username:zh.data, password: mm.data })
微信缓存:https://www.jb51.net/article/273265.htm