|
|
@@ -3,6 +3,7 @@ import ls from "@/utils/store2";
|
|
|
import { ref } from "vue";
|
|
|
import { userToken } from "../composables/config";
|
|
|
import crypt from "../composables/crypt";
|
|
|
+import useGlobalStore from "./use-global-store";
|
|
|
|
|
|
export interface UserInfo {
|
|
|
id?: string;
|
|
|
@@ -67,8 +68,7 @@ const useUserStore = defineStore("userStore", () => {
|
|
|
if (encryptedInfo) {
|
|
|
const decryptedInfo = crypt.decrypt(encryptedInfo);
|
|
|
if (decryptedInfo) {
|
|
|
- userInfo.value = JSON.parse(decryptedInfo);
|
|
|
- isLoggedIn.value = true;
|
|
|
+ appVersion.value = JSON.parse(decryptedInfo);
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -78,7 +78,6 @@ const useUserStore = defineStore("userStore", () => {
|
|
|
const decryptedInfo = crypt.decrypt(encryptedInfo);
|
|
|
if (decryptedInfo) {
|
|
|
loginOptions.value = JSON.parse(decryptedInfo);
|
|
|
- isLoggedIn.value = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -88,7 +87,6 @@ const useUserStore = defineStore("userStore", () => {
|
|
|
const decryptedInfo = crypt.decrypt(encryptedInfo);
|
|
|
if (decryptedInfo) {
|
|
|
problemDetails.value = JSON.parse(decryptedInfo);
|
|
|
- isLoggedIn.value = true;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -98,7 +96,6 @@ const useUserStore = defineStore("userStore", () => {
|
|
|
const decryptedInfo = crypt.decrypt(encryptedInfo);
|
|
|
if (decryptedInfo) {
|
|
|
reasonsOptions.value = JSON.parse(decryptedInfo);
|
|
|
- isLoggedIn.value = true;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -170,6 +167,8 @@ const useUserStore = defineStore("userStore", () => {
|
|
|
ls.remove(ID_TYPE_OPTIONS_KEY);
|
|
|
ls.remove(ACCOUNT_INFO_KEY);
|
|
|
|
|
|
+ const globalStore = useGlobalStore();
|
|
|
+ globalStore.setMode('customer');
|
|
|
};
|
|
|
|
|
|
initReasonsOptions();
|