27 changed files with 129 additions and 67 deletions
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 920 B |
|
After Width: | Height: | Size: 906 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
@ -1,6 +1,21 @@ |
|||||
|
import { useStore } from '@/store/root' |
||||
|
import { storeToRefs } from 'pinia' |
||||
import { getStatistics } from '@/http/api/statistics' |
import { getStatistics } from '@/http/api/statistics' |
||||
import type { Query } from '@/http/api/statistics/types' |
|
||||
|
import type { Query, TagType } from '@/http/api/statistics/types' |
||||
|
|
||||
export const useStatistics = (data: Query) => { |
|
||||
getStatistics(data) |
|
||||
|
//店铺编码: 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) |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,4 @@ |
|||||
|
import { request } from '@/http/http' |
||||
|
|
||||
|
export const getListByFloor = () => |
||||
|
request<{ list: Array<{ name: string; shopList: Shop[] }> }>({ url: `/JSON/getBrandShopListByFloor.json` }) |
||||
@ -1,10 +1,10 @@ |
|||||
|
//类型,设备点击量:device,导航使用次数:navigation,节目播放次数:program,店铺点击次数:shop,业态点击次数:industry,品牌店铺搜索:brandSearch
|
||||
|
export type TagType = 'navigation' | 'shop' | 'brandSearch' | 'device' | 'program' | 'industry' |
||||
|
|
||||
export type Query = { |
export type Query = { |
||||
deviceCode: string //设备编码
|
deviceCode: string //设备编码
|
||||
projectCode: string //项目编码
|
projectCode: string //项目编码
|
||||
//类型,设备点击量:device,导航使用次数:navigation,节目播放次数:program,店铺点击次数:shop,业态点击次数:industry,品牌店铺搜索:brandSearch
|
|
||||
tag: 'navigation' | 'shop' | 'brandSearch' | 'device' | 'program' | 'industry' |
|
||||
shopCode?: string //店铺编码,tag=navigation或shop或brandSearch或时必传
|
|
||||
programId?: number // 节目id,tag=program时必传
|
|
||||
proType?: number //1节目,2插播,信发用
|
|
||||
|
tag: TagType |
||||
|
shopCode?: string |
||||
industryCode?: string //tag=industry时必传
|
industryCode?: string //tag=industry时必传
|
||||
} |
} |
||||
|
|||||
@ -0,0 +1,10 @@ |
|||||
|
interface Options { |
||||
|
init({ sliceList, callback }: { sliceList: number; callback: (i: number) => void }): void |
||||
|
next(): void |
||||
|
sliceQueue({ sliceList, callback }: { sliceList: number; callback: (i: number) => void }): void |
||||
|
} |
||||
|
|
||||
|
declare module 'task-slice' { |
||||
|
const TaskSlice: Options |
||||
|
export default TaskSlice |
||||
|
} |
||||
Loading…
Reference in new issue