liyongli 1 年之前
父節點
當前提交
61d6375760
共有 2 個文件被更改,包括 6 次插入8 次删除
  1. 5 4
      src/view/allMedia/analysis_detail.vue
  2. 1 4
      src/view/allMedia/components/analysis_list.vue

+ 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 => {