组件中引入vue-router
import { useRoute, useRouter } from "vue-router"
接收引进来的
const route = useRoute()
const router = useRouter()
使用
if (resp.data.code == 200) {
alert(resp.data.msg)
router.push('/login')
}
组件中引入vue-router
import { useRoute, useRouter } from "vue-router"
接收引进来的
const route = useRoute()
const router = useRouter()
使用
if (resp.data.code == 200) {
alert(resp.data.msg)
router.push('/login')
}