22285461@qq.com 3 mēneši atpakaļ
vecāks
revīzija
81a9d7ee93

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/assets/index-CZwqv-Q5.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/assets/index-YjwAygK8.js


+ 2 - 2
dist/index.html

@@ -5,8 +5,8 @@
     <link rel="icon" type="image/svg+xml" href="/vite.svg"/>
     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
     <title>桢禧文化</title>
-  <script type="module" crossorigin src="/assets/index-Dw3TePmX.js"></script>
-  <link rel="stylesheet" crossorigin href="/assets/index-TJPQTzOJ.css">
+  <script type="module" crossorigin src="/assets/index-YjwAygK8.js"></script>
+  <link rel="stylesheet" crossorigin href="/assets/index-CZwqv-Q5.css">
 </head>
 <body>
 <div id="app"></div>

+ 5 - 2
src/DataCenter.ts

@@ -14,6 +14,7 @@ import {
 import {ref} from "vue";
 import {QuShiLogic} from "./customer/QuShiLogic.ts";
 import {RiYunShiLogic} from "./customer/RiYunShiLogic.ts";
+import {Tools} from "./Tools.ts";
 
 export namespace DataCenter {
 
@@ -61,14 +62,16 @@ export namespace DataCenter {
 
     export let lastKeyInGeJu = ref(null)
 
-    export let owernId = 99
-
     export let ownerUsers = ref<UserInfo[]>([])
 
     export let historyUser = ref<UserInfo[]>([])
 
     export let historyBaZi = ref<BaZi[]>([])
 
+    export function getOwnerId() {
+        return Tools.getCookie("yx_uid")
+    }
+
     export function addAreaData(data: LocalModels.Area) {
         let key1 = data.sheng
         if (!shengShi.has(key1)) {

+ 20 - 1
src/components/customer/BaseInfo.vue

@@ -184,7 +184,7 @@ function createUserInfo() {
   info.name = userName.value.trim()
   info.dateMode = dateMode.value
   info.extra = extraInfo.value.trim()
-  info.owner_id = DataCenter.owernId
+  info.owner_id = DataCenter.getOwnerId()
   info.fillData(DataCenter.bazi.value)
   return info
 }
@@ -226,6 +226,25 @@ function onSelectLastUser() {
 function loginOut() {
   Tools.removeCookie("yx_uname")
   Tools.removeCookie("yx_token")
+  DataCenter.bazi.value = null
+  DataCenter.historyBaZi.value = []
+  DataCenter.historyUser.value = []
+  DataCenter.ownerUsers.value = []
+  DataCenter.lastKeyInGeJu.value = null
+  DataCenter.selectedLiuNianInGeJu.value = null
+  DataCenter.selectedDaYunInGeJu.value = null
+  DataCenter.includeDaYunInGeJu.value = false
+  DataCenter.includeLiuNianInGeJu.value = false
+  DataCenter.powerMode.value = 1
+  DataCenter.dayunIndex.value = null
+  DataCenter.curDaYun.value = null
+  DataCenter.liunianIndex.value = null
+  DataCenter.curLiuNianList.value = []
+  DataCenter.curLiuNian.value = null
+  DataCenter.liuyueIndex.value = null
+  DataCenter.curLiuYue.value = null
+  DataCenter.liuriIndex.value = null
+  DataCenter.curLiuRi.value = null
   router.push({name: "login"})
 }
 </script>

+ 3 - 4
src/components/customer/zhen_duan/GaoNengZhenDuan.vue

@@ -5,11 +5,10 @@ import {DataCenter} from "../../../DataCenter.ts";
 let getGaoNengTexts = computed(function () {
   let result = []
   if (DataCenter.bazi.value != null) {
-    let ks = DataCenter.bazi.value.zhenduan.gaoneng.keys()
-    let key = null
-    while ((key = ks.next()) != null) {
+    //@ts-ignore
+    DataCenter.bazi.value.zhenduan.gaoneng.forEach(function (value, key) {
       result.push(key)
-    }
+    })
   }
   return result
 })

+ 2 - 2
src/customer/APICenter.ts

@@ -202,7 +202,7 @@ export namespace APICenter {
 
     export function loadUsers(cb: () => void) {
         let request = new LoadUserRequest()
-        request.owner_id = DataCenter.owernId
+        request.owner_id = DataCenter.getOwnerId()
         post(getServerUrl() + "loadUser", beanToObject(request), function (response: string) {
             try {
                 let obj = JSON.parse(response)
@@ -224,7 +224,7 @@ export namespace APICenter {
 
     export function deleteUser(id: number) {
         let request = new DeleteUserRequest()
-        request.owner_id = DataCenter.owernId
+        request.owner_id = DataCenter.getOwnerId()
         request.user_id = id
         post(getServerUrl() + "deleteUser", beanToObject(request), function (response: string) {
             try {

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels