li.shaoyi 2 năm trước cách đây
mục cha
commit
f88da845e5

+ 1 - 7
src/packages/mobile/App.vue

@@ -1,9 +1,8 @@
 <template>
-  <router-view v-if="isRouterAlive" />
+  <router-view />
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, nextTick } from 'vue'
 import { useNavigation } from '@/hooks/navigation'
 import { dialog } from '@/utils/vant'
 import { useLogin } from '@/business/login'
@@ -11,14 +10,9 @@ import eventBus from '@/services/bus'
 
 const { userLogout } = useLogin()
 const { backHomePage } = useNavigation()
-const isRouterAlive = shallowRef(true) // 用于页面重新渲染
 
 const quit = (showLogin = false) => {
-  isRouterAlive.value = false
   backHomePage({ tabName: 'home', showLogin })
-  nextTick(() => {
-    isRouterAlive.value = true
-  })
 }
 
 // 接收用户登出通知

+ 0 - 25
src/packages/mobile/components/modules/quick-login/index.vue

@@ -1,25 +0,0 @@
-<template>
-    <app-modal direction="right" height="100%" v-model:show="showModal">
-        <app-login />
-    </app-modal>
-</template>
-
-<script lang="ts" setup>
-import { computed } from 'vue'
-import AppModal from '@/components/base/modal/index.vue'
-import AppLogin from '@mobile/views/user/login/index.vue'
-
-const props = defineProps({
-    show: {
-        type: Boolean,
-        default: false
-    }
-})
-
-const emit = defineEmits(['update:show'])
-
-const showModal = computed({
-    get: () => props.show,
-    set: (val) => emit('update:show', val)
-})
-</script>