|
@@ -8,7 +8,7 @@ import CardMenu from '@/components/card-menu.vue'
|
|
|
import SectionHeading from '@/components/section-heading.vue'
|
|
|
import { designer, settled, treaty, vipBg } from '../../core/libs/pngs'
|
|
|
import { integral, coupon, order, agent, setting, vip, scan } from '../../core/libs/svgs'
|
|
|
-import { getMemberUserInfo, getTasks } from '../../core/libs/requests'
|
|
|
+import { getDesignerInfo, getMemberUserInfo, getTasks } from '../../core/libs/requests'
|
|
|
import { useUserStore } from '../../store'
|
|
|
import { storeToRefs } from 'pinia'
|
|
|
import { isEmpty } from 'radash'
|
|
@@ -23,6 +23,10 @@ const { data, run } = useRequest(getMemberUserInfo)
|
|
|
const { data: taskData, run: getTaskData } = useRequest(() => getTasks({}), {
|
|
|
initialData: { list: [] },
|
|
|
})
|
|
|
+const { data: designerInfo, run: setDesignerInfo } = useRequest(
|
|
|
+ () => getDesignerInfo(userInfo.value.userId),
|
|
|
+ { initialData: {} },
|
|
|
+)
|
|
|
const menus = ref([
|
|
|
{ title: '积分明细', icon: integral, path: '/pages/mine/points/index' },
|
|
|
{ title: '优惠券包', icon: coupon, path: '/pages/mine/coupons/index' },
|
|
@@ -75,7 +79,6 @@ const pieces = ref([
|
|
|
path: '/pages/mine/convention/index',
|
|
|
},
|
|
|
])
|
|
|
-
|
|
|
const avatar = computed(() =>
|
|
|
!isEmpty(userInfo.value.avatar) ? userInfo.value.avatar : 'https://via.placeholder.com/72x72',
|
|
|
)
|
|
@@ -90,6 +93,9 @@ onShow(async () => {
|
|
|
...userInfo.value,
|
|
|
...data.value,
|
|
|
})
|
|
|
+ await setDesignerInfo()
|
|
|
+ await getTaskData()
|
|
|
+ console.log(taskData.value)
|
|
|
}
|
|
|
})
|
|
|
const handleToAuthentication = () => {
|
|
@@ -102,11 +108,7 @@ const handleToHomepage = () => {
|
|
|
const handleMenuClick = (path) => {
|
|
|
path && uni.navigateTo({ url: path })
|
|
|
}
|
|
|
-onMounted(async () => {
|
|
|
- // await run()
|
|
|
- // console.log(data.value)
|
|
|
- await getTaskData()
|
|
|
-})
|
|
|
+onMounted(async () => {})
|
|
|
const navBarProps = ref({ customClass: 'bg-transparent!' })
|
|
|
onPageScroll(({ scrollTop }: { scrollTop: number }) => {
|
|
|
// console.log(scrollTop)
|
|
@@ -169,7 +171,8 @@ onPageScroll(({ scrollTop }: { scrollTop: number }) => {
|
|
|
<div class="px-3.5 flex items-center">
|
|
|
<div class="flex items-center">
|
|
|
<div class="text-white text-base font-normal font-['PingFang_SC'] leading-normal mr-1">
|
|
|
- 0
|
|
|
+ <!-- 0 -->
|
|
|
+ {{ designerInfo?.shareCount }}
|
|
|
</div>
|
|
|
<div
|
|
|
class="text-center text-[#e9e7e4] text-xs font-normal font-['PingFang_SC'] leading-normal"
|
|
@@ -183,6 +186,7 @@ onPageScroll(({ scrollTop }: { scrollTop: number }) => {
|
|
|
<div class="flex items-center">
|
|
|
<div class="text-white text-base font-normal font-['PingFang_SC'] leading-normal mr-1">
|
|
|
0
|
|
|
+ <!-- {{designerInfo.c}} -->
|
|
|
</div>
|
|
|
<div
|
|
|
class="text-center text-[#e9e7e4] text-xs font-normal font-['PingFang_SC'] leading-normal"
|
|
@@ -195,7 +199,8 @@ onPageScroll(({ scrollTop }: { scrollTop: number }) => {
|
|
|
|
|
|
<div class="flex items-center">
|
|
|
<div class="text-white text-base font-normal font-['PingFang_SC'] leading-normal mr-1">
|
|
|
- 0
|
|
|
+ <!-- 0 -->
|
|
|
+ {{ designerInfo?.viewCount }}
|
|
|
</div>
|
|
|
<div
|
|
|
class="text-center text-[#e9e7e4] text-xs font-normal font-['PingFang_SC'] leading-normal"
|