zhb 3 veckor sedan
förälder
incheckning
102f869d74
1 ändrade filer med 3 tillägg och 11 borttagningar
  1. 3 11
      pages/customer/dashboard.vue

+ 3 - 11
pages/customer/dashboard.vue

@@ -223,6 +223,8 @@
   import { customApi } from '@/service/custom'
   import { userApi } from '@/api/user'
   import AccountCard from '@/pages/customer/components/AccountCard.vue'
+  import { useWindowWidth } from '@/composables/useWindowWidth'
+  const windowWidth = useWindowWidth(300)
   const { t, locale } = useI18n()
   const loading = ref(false)
   const router = useRouter()
@@ -339,7 +341,6 @@
   }
   // 获取账户信息
   const getDateList = async () => {
-    loading.value = true
     let res = await customApi.CustomDropdown({ platform: "" })
     if (res.code == Code.StatusOK) {
       loginDataOptions.value = res.data.map(item => ({
@@ -566,18 +567,9 @@
   }
   // #endif
   const checkIsMobile = () => {
-    // 适配 uni-app 环境
-    chartShow.value = false
-    const width = window.innerWidth
-    console.log(width,'inner')
-    isMobile.value = width < 991
-    chartShow.value = true
-    // #ifndef H5
     chartShow.value = false
-    const systemInfo = uni.getSystemInfoSync()
-    isMobile.value = systemInfo.windowWidth < 991
+    isMobile.value = windowWidth.value < 991
     chartShow.value = true
-    // #endif
   }
 
   const AccountList = ref([])