hsy 2 zile în urmă
părinte
comite
463036e00b
2 a modificat fișierele cu 6 adăugiri și 4 ștergeri
  1. 5 4
      src/router/index.ts
  2. 1 0
      src/views/promotion/goods.vue

+ 5 - 4
src/router/index.ts

@@ -47,14 +47,15 @@ router.beforeEach((to: ToRouteType, _from, next) => {
   if (to.meta?.title) {
     document.title = to.meta?.title;
   }
+  console.log("before to", to);
   next();
 });
 
 router.afterEach((to) => {
-  if (to.params?.mechanismId) {
-    localStorage.setItem("mechanismId", to.params.mechanismId as string);
-  }
-  console.log("to", to.query);
+  // if (to.params?.mechanismId) {
+  //   localStorage.setItem("mechanismId", to.params.mechanismId as string);
+  // }
+  console.log("after to", to);
 
   if (to.query?.caringMode == "open") {
     handleChangeHtmlFontSize();

+ 1 - 0
src/views/promotion/goods.vue

@@ -141,6 +141,7 @@ const init = async () => {
     getWeChatAuth()
   }
 }
+onMounted(() => init())
 </script>
 
 <style lang="scss" scoped></style>