|
@@ -7,7 +7,7 @@
|
|
</route>
|
|
</route>
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import MomentItem from '@/components/moment-item.vue'
|
|
import MomentItem from '@/components/moment-item.vue'
|
|
-import { getCircles, getDesignerInfo } from '../../../core/libs/requests'
|
|
|
|
|
|
+import { getCircles, getDesignerInfo, getUserInfoById } from '../../../core/libs/requests'
|
|
import { useUserStore } from '../../../store'
|
|
import { useUserStore } from '../../../store'
|
|
import { storeToRefs } from 'pinia'
|
|
import { storeToRefs } from 'pinia'
|
|
import { NetImages } from '../../../core/libs/net-images'
|
|
import { NetImages } from '../../../core/libs/net-images'
|
|
@@ -21,15 +21,23 @@ const userStore = useUserStore()
|
|
const { userInfo } = storeToRefs(userStore)
|
|
const { userInfo } = storeToRefs(userStore)
|
|
const id = ref()
|
|
const id = ref()
|
|
const tab = ref('2')
|
|
const tab = ref('2')
|
|
-const circlesData = ref({ list: [] })
|
|
|
|
const tabs = ref([
|
|
const tabs = ref([
|
|
{ label: '案例', value: '2' },
|
|
{ label: '案例', value: '2' },
|
|
{ label: '动态', value: '1' },
|
|
{ label: '动态', value: '1' },
|
|
{ label: '视频', value: '0' },
|
|
{ label: '视频', value: '0' },
|
|
])
|
|
])
|
|
|
|
+const { data: memberInfo, run: setMemberInfo } = useRequest(() => getUserInfoById(id.value), {
|
|
|
|
+ initialData: {},
|
|
|
|
+})
|
|
const { data: designerInfo, run: setDesignerInfo } = useRequest(() => getDesignerInfo(id.value), {
|
|
const { data: designerInfo, run: setDesignerInfo } = useRequest(() => getDesignerInfo(id.value), {
|
|
initialData: {},
|
|
initialData: {},
|
|
})
|
|
})
|
|
|
|
+const isOwn = computed(() => userInfo.value?.userId === id.value)
|
|
|
|
+const skills = computed(() => [
|
|
|
|
+ { label: '从业年限', value: designerInfo.value.serviceYears },
|
|
|
|
+ { label: '客户', value: designerInfo.value.serviceCustomerCount },
|
|
|
|
+ { label: '设计费', value: `${designerInfo.value.designFee}元/㎡` },
|
|
|
|
+])
|
|
onMounted(async () => {})
|
|
onMounted(async () => {})
|
|
function getVideoListByAccessToken(accessToken, openid) {
|
|
function getVideoListByAccessToken(accessToken, openid) {
|
|
const VIDEO_API = 'https://api.weixin.qq.com/wxa/business/getuservideo'
|
|
const VIDEO_API = 'https://api.weixin.qq.com/wxa/business/getuservideo'
|
|
@@ -57,6 +65,7 @@ function getVideoListByAccessToken(accessToken, openid) {
|
|
onLoad(async (query: { id: string }) => {
|
|
onLoad(async (query: { id: string }) => {
|
|
if (query.id) {
|
|
if (query.id) {
|
|
id.value = query.id
|
|
id.value = query.id
|
|
|
|
+ await setMemberInfo()
|
|
} else {
|
|
} else {
|
|
id.value = userInfo.value.userId
|
|
id.value = userInfo.value.userId
|
|
}
|
|
}
|
|
@@ -77,8 +86,8 @@ defineExpose({
|
|
<div class="relative">
|
|
<div class="relative">
|
|
<wd-img
|
|
<wd-img
|
|
width="100%"
|
|
width="100%"
|
|
- :src="NetImages.DesigerHomepageDefaultBg"
|
|
|
|
- mode="widthFix"
|
|
|
|
|
|
+ :src="designerInfo?.homePageUrl || NetImages.DesigerHomepageDefaultBg"
|
|
|
|
+ mode="aspectFill"
|
|
custom-class="aspect-[1.14/1]"
|
|
custom-class="aspect-[1.14/1]"
|
|
/>
|
|
/>
|
|
<div class="absolute bottom-0 left-0 right-0">
|
|
<div class="absolute bottom-0 left-0 right-0">
|
|
@@ -90,12 +99,12 @@ defineExpose({
|
|
<wd-img
|
|
<wd-img
|
|
width="100%"
|
|
width="100%"
|
|
height="100%"
|
|
height="100%"
|
|
- :src="designerInfo?.headImgUrl || userInfo?.avatar"
|
|
|
|
|
|
+ :src="isOwn ? userInfo?.avatar : memberInfo?.avatar"
|
|
></wd-img>
|
|
></wd-img>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<div class="text-white text-2xl font-normal font-['PingFang_SC'] leading-normal">
|
|
<div class="text-white text-2xl font-normal font-['PingFang_SC'] leading-normal">
|
|
- {{ designerInfo?.brokerName || userInfo?.nickname }}
|
|
|
|
|
|
+ {{ designerInfo?.brokerName }}
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<div
|
|
<div
|
|
@@ -113,14 +122,34 @@ defineExpose({
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="flex-grow flex flex-col bg-white rounded-t-2xl relative bottom-4">
|
|
|
|
|
|
+ <div class="flex-grow flex flex-col bg-white rounded-t-2xl relative bottom-4 gap-5 px-3.5 pt-5">
|
|
|
|
+ <div class="flex gap-4">
|
|
|
|
+ <template v-for="(it, i) in skills" :key="i">
|
|
|
|
+ <div>
|
|
|
|
+ <span
|
|
|
|
+ class="mr-0.575 text-black/90 text-base font-normal font-['PingFang_SC'] leading-[26.98px]"
|
|
|
|
+ >
|
|
|
|
+ {{ it.value }}
|
|
|
|
+ </span>
|
|
|
|
+ <span
|
|
|
|
+ class="text-center text-black/40 text-sm font-normal font-['PingFang_SC'] leading-[26.98px]"
|
|
|
|
+ >
|
|
|
|
+ {{ it.label }}
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="i < skills?.length - 1" class="leading-[26.98px] text-black/60">|</div>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="text-black/80 text-sm font-normal font-['PingFang_SC'] leading-normal">
|
|
|
|
+ “设计没有风格,设计是对生活的一种诠释,不是所谓的造型与装饰!”
|
|
|
|
+ </div>
|
|
<wd-tabs v-model="tab" custom-class="bg-transparent!">
|
|
<wd-tabs v-model="tab" custom-class="bg-transparent!">
|
|
<template v-for="({ label, value }, index) in tabs" :key="index">
|
|
<template v-for="({ label, value }, index) in tabs" :key="index">
|
|
<wd-tab :title="label" :name="value"></wd-tab>
|
|
<wd-tab :title="label" :name="value"></wd-tab>
|
|
</template>
|
|
</template>
|
|
</wd-tabs>
|
|
</wd-tabs>
|
|
<PageHelper
|
|
<PageHelper
|
|
- class="flex-grow flex flex-col bg-[#f6f6f6]"
|
|
|
|
|
|
+ class="flex-grow flex flex-col bg-[#f6f6f6] mx--3.5"
|
|
custom-class=""
|
|
custom-class=""
|
|
:request="getCircles"
|
|
:request="getCircles"
|
|
:query="{ circleType: tab, stylistId: id }"
|
|
:query="{ circleType: tab, stylistId: id }"
|