liyongli před 1 rokem
rodič
revize
61d6375760

+ 5 - 4
src/view/allMedia/analysis_detail.vue

@@ -16,15 +16,16 @@
 </template>
 
 <script setup>
+import { useRoute } from 'vue-router';
 import { getDetail } from '@/api/index';
 import { ref } from 'vue';
+
+const route = useRoute();
+
 const raw = ref({});
-const offset = JSON.parse(
-  localStorage.getItem('analysis_detail') || '{offset: ""}'
-).offset;
 getDetail({
   data: {
-    offset,
+    offset: route.query.offset,
   },
 }).then(r => {
   raw.value = r || {};

+ 1 - 4
src/view/allMedia/components/analysis_list.vue

@@ -88,10 +88,7 @@ const toDetail = item => {
   //     },
   //   });
 
-  const url = location.href.split("#")[0] +'#/analysis_detail';
-  localStorage.setItem('analysis_detail',  JSON.stringify({
-    offset: item.offset
-  }));
+  const url = location.href.split("#")[0] +'#/analysis_detail?offset=' + item.offset;
   window.open(url, '_blank');
 };
 const getlist = search => {