You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
693 B
21 lines
693 B
import { useStore } from '@/store/root'
|
|
import { storeToRefs } from 'pinia'
|
|
import { getStatistics } from '@/http/api/statistics'
|
|
import type { Query, TagType } from '@/http/api/statistics/types'
|
|
|
|
//店铺编码: tag=navigation或shop或brandSearch或时必传
|
|
//industryCode : tag=industry时必传
|
|
export const useStatistics = ({ tag, shopCode, industryCode }: { tag: TagType; shopCode: string; industryCode: string }) => {
|
|
const store = useStore()
|
|
const { currentFloor } = storeToRefs(store)
|
|
|
|
const params: Query = {
|
|
deviceCode: currentFloor.value.deviceCode,
|
|
projectCode: currentFloor.value.projectCode,
|
|
tag,
|
|
shopCode,
|
|
industryCode
|
|
}
|
|
|
|
getStatistics(params)
|
|
}
|
|
|