Handy_Cao hai 1 ano
pai
achega
51b7cb803f

+ 2 - 11
src/packages/mobile/views/home/Index.vue

@@ -18,13 +18,12 @@ import { shallowRef, nextTick, watch, onMounted, onActivated, computed } from 'v
 import { Tabbar } from '@mobile/components/base/tabbar/types'
 import { useNavigation } from '@mobile/router/navigation'
 import { useMarketSection } from '@/business/market'
-import { useLoginStore, useFuturesStore, useGlobalStore } from '@/stores'
+import { useLoginStore, useFuturesStore } from '@/stores'
 import { i18n } from '@/stores'
 import { displayname } from "@/filters"
 import AppTabbar from '@mobile/components/base/tabbar/index.vue'
 import AppUpdater from '@mobile/components/base/updater/index.vue'
 import RouterTransition from '@mobile/components/base/router-transition/index.vue'
-import { dialog } from '@/utils/vant'
 
 const { global: { t } } = i18n
 
@@ -35,7 +34,6 @@ defineProps({
 const { route, routerTo } = useNavigation()
 const loginStore = useLoginStore()
 const futuresStore = useFuturesStore()
-const globalStore = useGlobalStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
 const currentTab = shallowRef(0)
 const marketSection = shallowRef() // 当前选中的板块
@@ -182,14 +180,7 @@ onActivated(() => {
   // 页面显示时刷新盘面(待优化)
   if (loginStore.token && futuresStore.goodsList.length) {
     futuresStore.getQuoteDay()
-  }
-
-  // 是否需要弹出提示信息
-  const showLoginAlert = globalStore.getSystemInfo('showLoginAlert')
-  if (showLoginAlert) {
-    dialog({message: t('user.login.tips7'), confirmButtonText: t('operation.confirm')})
-  }
-  
+  }  
 })
 </script>
   

+ 15 - 2
src/packages/mobile/views/report/index.vue

@@ -18,7 +18,8 @@ import { shallowRef } from 'vue'
 import { onBeforeRouteLeave } from 'vue-router'
 import { useNavigation } from '@mobile/router/navigation'
 import { Button } from 'vant'
-import { useLoginStore } from '@/stores'
+import { useLoginStore, useGlobalStore, i18n } from '@/stores'
+import { dialog } from '@/utils/vant'
 import eventBus from '@/services/bus'
 import Report from './components/index.vue'
 
@@ -26,10 +27,22 @@ const { routerBack } = useNavigation()
 const loginStore = useLoginStore()
 const isAgree = shallowRef(false)
 
+const { global: { t } } = i18n
+
+const globalStore = useGlobalStore()
+
 const onSubmit = (status: boolean) => {
     isAgree.value = true
     if (status) {
-        routerBack()
+        // 是否需要弹出提示信息
+        const showLoginAlert = globalStore.getSystemInfo('showLoginAlert')
+        if (showLoginAlert) {
+            dialog({message: t('user.login.tips7'), confirmButtonText: t('operation.confirm')}).then(() => {
+                routerBack()
+            })
+        } else {
+            routerBack()
+        }
     } else {
         loginStore.clearAutoLoginData()
         eventBus.$emit('LogoutNotify')