|
@@ -12,6 +12,8 @@ import {
|
|
|
getPointsCounts,
|
|
|
getUserInfoById,
|
|
|
getPointsOrders,
|
|
|
+ getBrowseRecordCount,
|
|
|
+ getBrowseRecords,
|
|
|
} from '@/core/libs/agent-requests'
|
|
|
import {
|
|
|
desinTopBg,
|
|
@@ -26,7 +28,6 @@ import {
|
|
|
import PageHelperEvo from '@/components/page-helper-evo.vue'
|
|
|
import { dayjs } from 'wot-design-uni'
|
|
|
import { toHomePage } from '@/core/libs/actions'
|
|
|
-import arcBottom from '@designer-hub/assets/src/libs/assets/arcBottom'
|
|
|
import arcBottomBlue from '@designer-hub/assets/src/libs/assets/arcBottomBlue'
|
|
|
import { useMemberLevelsStore } from '@/store/member-levles'
|
|
|
import { getDesignerPointsActivities } from '@/core/libs/requests'
|
|
@@ -50,6 +51,55 @@ const tabs = ref([
|
|
|
])
|
|
|
const status = ref({ '0': '已报名', '1': '已完成', '2': '未核销', '3': '已取消', '4': '待交付' })
|
|
|
const followUpQuery = ref({})
|
|
|
+const { data: browseRecordCount, run: setBrowseRecordCount } = useRequest(() =>
|
|
|
+ getBrowseRecordCount(id.value),
|
|
|
+)
|
|
|
+const browseRecordCountItems = computed(() => [
|
|
|
+ {
|
|
|
+ title: '打开次数',
|
|
|
+ subTitle: '最近',
|
|
|
+ value: browseRecordCount.value?.openNumber ?? 0,
|
|
|
+ subValue: browseRecordCount.value?.openTime
|
|
|
+ ? dayjs(browseRecordCount.value.openTime).format('YY/MM/DD')
|
|
|
+ : '暂无',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '浏览时长',
|
|
|
+ subTitle: '本年',
|
|
|
+ value: browseRecordCount.value?.duration ?? 0,
|
|
|
+ subValue: browseRecordCount.value?.durationYear ?? 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '发圈次数',
|
|
|
+ subTitle: '本年',
|
|
|
+ value: browseRecordCount.value?.circleNumber ?? 0,
|
|
|
+ subValue: browseRecordCount.value?.circleNumberYear ?? 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '主页分享数',
|
|
|
+ subTitle: '本年',
|
|
|
+ value: browseRecordCount.value?.homeShareNumber ?? 0,
|
|
|
+ subValue: browseRecordCount.value?.homeShareNumberYear ?? 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '分享浏览数',
|
|
|
+ subTitle: '本年',
|
|
|
+ value: browseRecordCount.value?.shareViewNumber ?? 0,
|
|
|
+ subValue: browseRecordCount.value?.shareViewNumberYear ?? 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '分享获客数',
|
|
|
+ subTitle: '本年',
|
|
|
+ value: browseRecordCount.value?.customersAcquired ?? 0,
|
|
|
+ subValue: browseRecordCount.value?.customersAcquiredYear ?? 0,
|
|
|
+ },
|
|
|
+])
|
|
|
+const recentActivities = computed(() => [
|
|
|
+ { label: '最近浏览品牌', value: '' },
|
|
|
+ { label: '最近到店品牌', value: '' },
|
|
|
+ { label: '最近浏览游学', value: '' },
|
|
|
+ { label: '最近浏览活动', value: '' },
|
|
|
+])
|
|
|
const pointsActivitiesQuery = computed(() => ({ stylistId: id.value }))
|
|
|
const toPointsDetails = () => {
|
|
|
uni.navigateTo({ url: `/pages/agent/designer/points/index?id=${id.value}` })
|
|
@@ -60,9 +110,10 @@ const toOrderDetails = (it: any) => {
|
|
|
const toArchives = () => {
|
|
|
uni.navigateTo({ url: '/pages/agent/designer/archives/index?id=' + id.value })
|
|
|
}
|
|
|
-onLoad((query) => {
|
|
|
+onLoad(async (query) => {
|
|
|
id.value = query?.id
|
|
|
- setData()
|
|
|
+ await setData()
|
|
|
+ await Promise.all([setBrowseRecordCount()])
|
|
|
})
|
|
|
</script>
|
|
|
|
|
@@ -185,37 +236,37 @@ onLoad((query) => {
|
|
|
使用动态
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="mt-3 grid grid-cols-3 gap-2.5">
|
|
|
- <template
|
|
|
- v-for="{ name, value } of [
|
|
|
- { name: '打开次数', des: '最近', value: 220 },
|
|
|
- { name: '浏览时长', des: '本年', value: 220 },
|
|
|
- { name: '发圈次数', des: '本年', value: 220 },
|
|
|
- { name: '主页分享数', des: '本年', value: 220 },
|
|
|
- { name: '分享浏览数', des: '本年', value: 220 },
|
|
|
- { name: '分享获客数', des: '本年', value: 220 },
|
|
|
- ]"
|
|
|
- :key="name"
|
|
|
+ <div class="mt-3">
|
|
|
+ <ListHelperEvo
|
|
|
+ :content-class="`grid grid-cols-3 gap-2.5`"
|
|
|
+ :items="browseRecordCountItems"
|
|
|
+ custom-class="grid grid-cols-3 gap-2.5"
|
|
|
>
|
|
|
- <div class="rounded-lg aspect-[1/1] flex flex-col justify-around p-2.5">
|
|
|
- <div class="text-black/60 text-xs font-normal font-['PingFang_SC'] leading-none">
|
|
|
- {{ name }}
|
|
|
- </div>
|
|
|
- <div class="text-black/90 text-lg font-bold font-['D-DIN Exp'] leading-normal">
|
|
|
- {{ value }}
|
|
|
- </div>
|
|
|
- <div class="flex items-center gap-1">
|
|
|
+ <template #default="{ item }">
|
|
|
+ <div class="rounded-lg aspect-[1/1] flex flex-col justify-around p-2.5">
|
|
|
<div
|
|
|
- class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-none"
|
|
|
+ class="text-black/60 text-xs font-normal font-['PingFang_SC'] leading-none"
|
|
|
>
|
|
|
- 年新增
|
|
|
+ {{ item.title }}
|
|
|
</div>
|
|
|
- <div class="text-black/90 text-xs font-normal font-['D-DIN Exp'] leading-norma">
|
|
|
- 20
|
|
|
+ <div class="text-black/90 text-lg font-bold font-['D-DIN Exp'] leading-normal">
|
|
|
+ {{ item.value }}
|
|
|
+ </div>
|
|
|
+ <div class="flex items-center gap-1">
|
|
|
+ <div
|
|
|
+ class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-none"
|
|
|
+ >
|
|
|
+ {{ item.subTitle }}
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="text-black/90 text-xs font-normal font-['D-DIN Exp'] leading-norma"
|
|
|
+ >
|
|
|
+ {{ item.subValue }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+ </template>
|
|
|
+ </ListHelperEvo>
|
|
|
</div>
|
|
|
</Card>
|
|
|
|
|
@@ -229,18 +280,18 @@ onLoad((query) => {
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="w-full h-.25 bg-[#f9f9f9]"></div>
|
|
|
- <div class="flex flex-col gap-6 py-5">
|
|
|
- <template v-for="(it, index) in [1, 2, 3]" :key="index">
|
|
|
- <div class="h-4 relative">
|
|
|
+ <ListHelperEvo :items="recentActivities" custom-class="flex flex-col gap-6">
|
|
|
+ <template #default="{ item }">
|
|
|
+ <div class="mx-2 flex items-center gap-1 my-6">
|
|
|
+ <div class="w-1 h-1 bg-[#2357e9] rounded-full"></div>
|
|
|
<div
|
|
|
- class="left-[11px] top-0 absolute text-black/60 text-sm font-normal font-['PingFang_SC'] leading-none"
|
|
|
+ class="text-black/60 text-sm font-normal font-['PingFang_SC'] leading-none"
|
|
|
>
|
|
|
- 最近浏览品牌:Imola
|
|
|
+ {{ item.label + ':' + item.value }}
|
|
|
</div>
|
|
|
- <div class="w-1 h-1 left-0 top-[6px] absolute bg-[#2357e9] rounded-full"></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- </div>
|
|
|
+ </ListHelperEvo>
|
|
|
</Card>
|
|
|
</div>
|
|
|
|