提交 5520d488 authored 作者: 邓文彬's avatar 邓文彬

fix(功能走查): 上次登陆时间的存储时间节点。存在疑问

上级 eb4a4e3e
...@@ -62,6 +62,8 @@ export default { ...@@ -62,6 +62,8 @@ export default {
if (now_user.name) { if (now_user.name) {
this.$store.commit("SET_USER", now_user); this.$store.commit("SET_USER", now_user);
} }
this.init();
}, },
onHide: function () { onHide: function () {
// app关闭时将数据存储到本地缓存 // app关闭时将数据存储到本地缓存
...@@ -114,7 +116,7 @@ export default { ...@@ -114,7 +116,7 @@ export default {
.then((res) => { .then((res) => {
// 获取文件数据 // 获取文件数据
let userData = Base64.decode(res); let userData = Base64.decode(res);
// console.log("---读取文件数据", userData); console.log("---读取用户数据", res);
uni.setStorage({ uni.setStorage({
key: "user_data", key: "user_data",
......
...@@ -127,6 +127,7 @@ export default { ...@@ -127,6 +127,7 @@ export default {
// 是否输入账号密码 // 是否输入账号密码
if (this.person.user && this.person.pd) { if (this.person.user && this.person.pd) {
let key = null; let key = null;
console.log("-this.personList--",this.personList)
const obj = this.personList.some((item, index) => { const obj = this.personList.some((item, index) => {
if (item.user == this.person.user) { if (item.user == this.person.user) {
key = index; key = index;
...@@ -152,12 +153,12 @@ export default { ...@@ -152,12 +153,12 @@ export default {
this.$store.commit("SET_USER", userInfo); this.$store.commit("SET_USER", userInfo);
uni.setStorageSync("now_user", userInfo); uni.setStorageSync("now_user", userInfo);
const fileContent = JSON.stringify(Base64.encode(this.personList)); // const fileContent = JSON.stringify(Base64.encode(this.personList));
createFileWithPlusIO( // createFileWithPlusIO(
SYNCHRONIZE_DATA_PAD, // SYNCHRONIZE_DATA_PAD,
USER_FILE_NAME, // USER_FILE_NAME,
fileContent // fileContent
); // );
uni.navigateTo({ uni.navigateTo({
url: "/pages/home/home", url: "/pages/home/home",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论