|
|
|
|
@ -67,14 +67,14 @@ export const useStore = defineStore('counter', {
|
|
|
|
|
uni.setStorageSync('USER', JSON.stringify(user));
|
|
|
|
|
},
|
|
|
|
|
getUser() {
|
|
|
|
|
return JSON.parse(uni.getStorageSync('USER')) || this.user;
|
|
|
|
|
return JSON.parse(uni.getStorageSync('USER') || '{}') || this.user;
|
|
|
|
|
},
|
|
|
|
|
setGroupInfo(info) {
|
|
|
|
|
this.groupInfo = info;
|
|
|
|
|
uni.setStorageSync('GROUP_INFO', JSON.stringify(info));
|
|
|
|
|
},
|
|
|
|
|
getGroupInfo() {
|
|
|
|
|
return JSON.parse(uni.getStorageSync('GROUP_INFO')) || this.groupInfo;
|
|
|
|
|
return JSON.parse(uni.getStorageSync('GROUP_INFO') || '{}') || this.groupInfo;
|
|
|
|
|
},
|
|
|
|
|
resetSaveInfo() {
|
|
|
|
|
this.save = {
|
|
|
|
|
|