Bläddra i källkod

修改禅道bug

aamin 1 år sedan
förälder
incheckning
6ccea15c60

+ 3 - 1
houtai/src/pages/A6IDUser/IntegralEdit/index.tsx

@@ -17,6 +17,8 @@ import {
 import { IDUserTableType, IDUserType, SaveIDUserScoreType } from "@/types";
 import { MessageFu } from "@/utils/message";
 import { RootState } from "@/store";
+import { Base64 } from "js-base64";
+import encodeStr from "@/utils/pass";
 type Props = {
   currentItem: IDUserTableType;
   closeFu: () => void;
@@ -94,7 +96,7 @@ function IntegralEdit({ currentItem, closeFu }: Props) {
         const res: any = await IDUserScoreSaveAPI({
           description: values.description,
           userId: currentItem.id,
-          score: values.score,
+          score:  encodeStr(Base64.encode(values.score)),
           type: "编辑",
         });
         if (res.code === 0) {

+ 1 - 1
houtai/src/types/api/A6IDUser.d.ts

@@ -25,7 +25,7 @@ export type IDUserType = {
 
 export type SaveIDUserScoreType = {
   description: string;
-  score: number;
+  score: any;
   type: string;
   userId: number;
 };

+ 3 - 1
zhengquan/src/views/Game/gamePage.vue

@@ -35,10 +35,12 @@ onMounted(() => {
 
   window.goBackSceneFu = () => {
     store.isShowGameThumb = false
+    const currentUnit = localStorage.getItem('currentUnit')
+    console.log('刷新后', store.currentUnit.code, JSON.parse(currentUnit!))
     router.replace({
       path: '/scene',
       query: {
-        code: store.currentUnit.code,
+        code: store.currentUnit.code ? store.currentUnit.code : JSON.parse(currentUnit!).code,
         name: store.currentUnit.name == '尾厅' ? '尾厅' : ''
       }
     })

+ 2 - 2
zhengquan/src/views/HomeMo/homePageMo.vue

@@ -15,12 +15,12 @@ declare global {
 onMounted(() => {
   window.goBackSceneFu = () => {
     store.isShowGameThumb = false
+    const currentUnit = localStorage.getItem('currentUnit')
     router.replace({
       path: '/scene',
       query: {
-        code: store.currentUnit.code,
+        code: store.currentUnit.code != '' ? store.currentUnit.code : JSON.parse(currentUnit!),
         name: store.currentUnit.name == '尾厅' ? '尾厅' : ''
-
       }
     })
   }

+ 3 - 0
zhengquan/src/views/Scene/ScenePage.vue

@@ -38,6 +38,7 @@ const pointInfo = ref('')
 
 const changeUnit = (unit: any) => {
   store.currentUnit = unit
+  localStorage.setItem('currentUnit', JSON.stringify(unit))
   currentUnit.value = unit
   animalZhenShuNumber.value = currentUnit.value.xuliezhen[animalStat.value].zhenShu
   duration.value = currentUnit.value.xuliezhen[animalStat.value].duration
@@ -130,6 +131,7 @@ const getAllHotspot = () => {
         }
         currentHotsUnit.value = currentUnit.value
         store.currentUnit = currentUnit.value
+        localStorage.setItem('currentUnit', JSON.stringify(currentUnit.value))
         if (route.query.name == '尾厅') pointInfo.value = '&firstView=pano:42,qua:0.009218044457158925,0.8470543054294898,-0.01469850441003682,0.5312231071060547&qs=1'
       }
     })
@@ -162,6 +164,7 @@ watch(isShowHosList, (newVal: any) => {
 const goHotCamarer = (hot: any) => {
   currentUnit.value = currentHotsUnit.value
   store.currentUnit = currentHotsUnit.value
+  localStorage.setItem('currentUnit', JSON.stringify(currentHotsUnit.value))
   pointInfo.value = ''
   // isShowExperienceGame.value = true
   setTimeout(() => {