diff --git a/package.json b/package.json index 64d8332..09e004f 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "lodash-es": "^4.17.21", "pinia": "^2.0.35", "qs": "^6.11.1", + "uni-read-pages-vite": "^0.0.5", "vue": "^3.2.47" }, "devDependencies": { @@ -87,6 +88,7 @@ "prettier": "^2.8.8", "sass": "^1.62.1", "typescript": "^5.0.4", + "uni-mini-router": "^0.0.7", "unocss": "^0.46.5", "unocss-preset-weapp": "^0.2.5", "vite": "^4.3.2", diff --git a/src/App.vue b/src/App.vue index 1ae0729..610e6eb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,15 +1,8 @@ diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 6e9a83c..cd7cb61 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -2,7 +2,7 @@ import { ref } from 'vue'; import BasicButton from '@/components/BasicButton/index.vue'; import AppProvider from '@/components/AppProvider/inedx.vue'; -import { useRouter } from '@/hooks/router'; +import { useRouter } from 'uni-mini-router'; import { CURRENT_PLATFORM, PLATFORMS } from '@/enums/platformEnum'; import { judgePlatform } from '@/utils/platform'; import Iconify from '@/components/Iconify/index.vue'; @@ -18,8 +18,7 @@ const isVue3 = judgePlatform(PLATFORMS.VUE3); const router = useRouter(); const handleGetStarted = () => { - router.pushTab('/pages/demo/index'); - // router.push('/pages/log/index?id=4345&title=log'); + router.pushTab({ path: '/pages/demo/index' }); };