Browse Source

使用向导跳转逻辑更改

ZhaoJing 1 year ago
parent
commit
ab944f9289
2 changed files with 13 additions and 2 deletions
  1. 2 2
      src/pages/home/caiji/index.vue
  2. 11 0
      src/pages/syxd/index.vue

+ 2 - 2
src/pages/home/caiji/index.vue

@@ -13,9 +13,9 @@ function routerToSycj() {
     const axa_sycj_zdysyid_v2 = res.data.pre_data?.axa_sycj_zdysyid_v2
     console.log('axa_sycj_zdysyid_v2 : ', axa_sycj_zdysyid_v2)
     if (axa_sycj_zdysyid_v2) {
-      router.push({ name: "caiji-sy-record-id", params: { id: axa_sycj_zdysyid_v2 } })
+      router.push({ path: "/syxd", query: { id: axa_sycj_zdysyid_v2 } })
     } else {
-      router.push({ name: 'syxd' })
+      router.push({ path: '/syxd' })
     }
   })
 }

+ 11 - 0
src/pages/syxd/index.vue

@@ -17,6 +17,9 @@ import img5 from "~/assets/5.png";
 import img6 from "~/assets/6.png";
 let imageList = $ref([img1, img2, img3, img4, img5, img6]);
 const router = useRouter()
+const route= useRoute();
+let id = route.query.id;
+
 function onClickLeft() {
   router.back()
 }
@@ -25,12 +28,20 @@ function handleNext(el){
  if(el!==5){
     swipeRef.value?.next();
  }else{
+  if(!id){
     router.push({ name: 'caiji-sy-read' })
+  }else{
+    router.push({ name: "caiji-sy-record-id", params: { id: id } })
+  }
  }
 }
 function handleChange(index){
  if(index===0){
+  if(!id){
     router.push({ name: 'caiji-sy-read' })
+  }else{
+    router.push({ name: "caiji-sy-record-id", params: { id: id } })
+  }
     // swipeRef.value?.swipeTo(5);
  }
 }