diff --git a/src/composables/useHandleScreen.ts b/src/composables/useHandleScreen.ts index e67d21b..d19bdef 100644 --- a/src/composables/useHandleScreen.ts +++ b/src/composables/useHandleScreen.ts @@ -54,8 +54,7 @@ export const useHandleScreen = (callback: () => void) => { //跳转屏保挂载到全局 供app使用 window.sleepToWallpaper = async () => { - await sleepToWallpaper() - nativeMethods.value?.goScreenSave() + await checkHandleScreen() } async function checkHandleScreen() { @@ -93,8 +92,7 @@ export const useHandleScreen = (callback: () => void) => { if (!nativeMethods.value?.hasProgram()) { return } - await sleepToWallpaper() - nativeMethods.value?.goScreenSave() + await checkHandleScreen() } }) diff --git a/src/store/root/getters.ts b/src/store/root/getters.ts index 44386d5..aa367e2 100644 --- a/src/store/root/getters.ts +++ b/src/store/root/getters.ts @@ -1,3 +1,4 @@ +import { DEVICE } from '@/enums' import type { State } from './state' import type { CreateGetters } from '../types' import type { PickRecommendShop } from '@/http/api/brand/types' @@ -14,22 +15,26 @@ export type GenGetters = CreateGetters export const getters: GenGetters = { nativeMethods() { - if (this.device.label === 'android') { + if (this.device.label === DEVICE.ANDROID) { return window.android } return window.chrome?.webview?.hostObjects?.sync?.csobj }, + //当前设备所处楼栋的楼层列表 currentBuildingFloorsList() { const currentBuilding = this.buildingList.find(building => building.buildingCode === this.device.buildingCode) return currentBuilding?.floorList ?? [] }, + //推荐店铺列表 recommendList() { return this.BrandInfo.recommendList ?? [] }, + //品牌模块的楼层列表 brandFloorList() { const currentBuilding = this.BrandInfo.buildingList?.find(item => item.buildingCode === this.device.buildingCode) return currentBuilding?.floorList ?? [] }, + //业态列表 industryList() { return this.BrandInfo.industryFatherList ?? [] }