|
|
|
@ -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<State, GettersMap> |
|
|
|
|
|
|
|
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 ?? [] |
|
|
|
} |
|
|
|
|