|
@@ -7,7 +7,12 @@
|
|
</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, getUserInfoById } from '../../../core/libs/requests'
|
|
|
|
|
|
+import {
|
|
|
|
+ deleteCircle,
|
|
|
|
+ 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'
|
|
@@ -15,16 +20,21 @@ import PageHelper from '@/components/page-helper.vue'
|
|
import BottomAppBar from '@/components/bottom-app-bar.vue'
|
|
import BottomAppBar from '@/components/bottom-app-bar.vue'
|
|
import { useRouter } from '../../../core/utils/router'
|
|
import { useRouter } from '../../../core/utils/router'
|
|
import NavbarEvo from '@/components/navbar-evo.vue'
|
|
import NavbarEvo from '@/components/navbar-evo.vue'
|
|
|
|
+import { useMessage } from 'wot-design-uni'
|
|
|
|
+import { requestToast } from '../../../core/utils/common'
|
|
|
|
+import { ComponentExposed } from 'vue-component-type-helpers'
|
|
|
|
|
|
|
|
+const { alert, confirm } = useMessage()
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
const { userInfo } = storeToRefs(userStore)
|
|
const { userInfo } = storeToRefs(userStore)
|
|
|
|
+const pageHelperRef = ref<ComponentExposed<typeof PageHelper>>()
|
|
const id = ref()
|
|
const id = ref()
|
|
const tab = ref('2')
|
|
const tab = ref('2')
|
|
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), {
|
|
const { data: memberInfo, run: setMemberInfo } = useRequest(() => getUserInfoById(id.value), {
|
|
initialData: {},
|
|
initialData: {},
|
|
@@ -38,30 +48,22 @@ const skills = computed(() => [
|
|
{ label: '客户', value: designerInfo.value.serviceCustomerCount },
|
|
{ label: '客户', value: designerInfo.value.serviceCustomerCount },
|
|
{ label: '设计费', value: `${designerInfo.value.designFee}元/㎡` },
|
|
{ label: '设计费', value: `${designerInfo.value.designFee}元/㎡` },
|
|
])
|
|
])
|
|
-onMounted(async () => {})
|
|
|
|
-function getVideoListByAccessToken(accessToken, openid) {
|
|
|
|
- const VIDEO_API = 'https://api.weixin.qq.com/wxa/business/getuservideo'
|
|
|
|
-
|
|
|
|
- uni.request({
|
|
|
|
- url: VIDEO_API,
|
|
|
|
- method: 'POST',
|
|
|
|
- header: {
|
|
|
|
- 'Content-Type': 'application/json',
|
|
|
|
- },
|
|
|
|
- data: {
|
|
|
|
- access_token: accessToken,
|
|
|
|
- openid,
|
|
|
|
- // 可以添加其他参数,如offset, limit
|
|
|
|
- },
|
|
|
|
- success: function (res) {
|
|
|
|
- // 获取视频号列表成功
|
|
|
|
- console.log('视频号列表:', res.data)
|
|
|
|
- },
|
|
|
|
- fail: function (error) {
|
|
|
|
- console.log('获取视频号列表失败', error)
|
|
|
|
|
|
+const query = computed(() => ({
|
|
|
|
+ circleType: tab.value,
|
|
|
|
+ stylistId: id.value,
|
|
|
|
+}))
|
|
|
|
+const handleMomentDelete = async (id) => {
|
|
|
|
+ confirm({
|
|
|
|
+ title: '警告',
|
|
|
|
+ msg: '确定要删除吗?',
|
|
|
|
+ beforeConfirm: async ({ resolve }) => {
|
|
|
|
+ await requestToast(() => deleteCircle(id))
|
|
|
|
+ await pageHelperRef.value?.refresh()
|
|
|
|
+ resolve(true)
|
|
},
|
|
},
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+onMounted(async () => {})
|
|
onLoad(async (query: { id: string }) => {
|
|
onLoad(async (query: { id: string }) => {
|
|
if (query.id) {
|
|
if (query.id) {
|
|
id.value = query.id
|
|
id.value = query.id
|
|
@@ -70,10 +72,6 @@ onLoad(async (query: { id: string }) => {
|
|
id.value = userInfo.value.userId
|
|
id.value = userInfo.value.userId
|
|
}
|
|
}
|
|
await setDesignerInfo()
|
|
await setDesignerInfo()
|
|
- // uni.request({
|
|
|
|
- // url: '',
|
|
|
|
- // })
|
|
|
|
- // getVideoListByAccessToken(userInfo.value.accessToken, userInfo.value.openid)
|
|
|
|
})
|
|
})
|
|
onShareAppMessage(() => ({ title: `${userInfo.value.nickname}` }))
|
|
onShareAppMessage(() => ({ title: `${userInfo.value.nickname}` }))
|
|
defineExpose({
|
|
defineExpose({
|
|
@@ -141,29 +139,36 @@ defineExpose({
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
<div class="text-black/80 text-sm font-normal font-['PingFang_SC'] leading-normal">
|
|
<div class="text-black/80 text-sm font-normal font-['PingFang_SC'] leading-normal">
|
|
- “设计没有风格,设计是对生活的一种诠释,不是所谓的造型与装饰!”
|
|
|
|
|
|
+ {{ designerInfo?.personalIdentity }}
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <wd-tabs v-model="tab" custom-class="bg-transparent!">
|
|
|
|
+ <template v-for="({ label, value }, index) in tabs" :key="index">
|
|
|
|
+ <wd-tab :title="label" :name="value"></wd-tab>
|
|
|
|
+ </template>
|
|
|
|
+ </wd-tabs>
|
|
|
|
+ <PageHelper
|
|
|
|
+ ref="pageHelperRef"
|
|
|
|
+ class="flex-grow flex flex-col bg-[#f6f6f6] mx--3.5"
|
|
|
|
+ custom-class=""
|
|
|
|
+ :request="getCircles"
|
|
|
|
+ :query="query"
|
|
|
|
+ >
|
|
|
|
+ <template #default="{ source }">
|
|
|
|
+ <div class="p-3.5 flex flex-col bg-[#f6f6f6] gap-3.5">
|
|
|
|
+ <template v-for="it of source.list" :key="it.id">
|
|
|
|
+ <view class="">
|
|
|
|
+ <MomentItem
|
|
|
|
+ :options="it"
|
|
|
|
+ :is-own="userInfo.userId === it.stylistId"
|
|
|
|
+ @delete="handleMomentDelete"
|
|
|
|
+ ></MomentItem>
|
|
|
|
+ </view>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </PageHelper>
|
|
</div>
|
|
</div>
|
|
- <wd-tabs v-model="tab" custom-class="bg-transparent!">
|
|
|
|
- <template v-for="({ label, value }, index) in tabs" :key="index">
|
|
|
|
- <wd-tab :title="label" :name="value"></wd-tab>
|
|
|
|
- </template>
|
|
|
|
- </wd-tabs>
|
|
|
|
- <PageHelper
|
|
|
|
- class="flex-grow flex flex-col bg-[#f6f6f6] mx--3.5"
|
|
|
|
- custom-class=""
|
|
|
|
- :request="getCircles"
|
|
|
|
- :query="{ circleType: tab, stylistId: id }"
|
|
|
|
- >
|
|
|
|
- <template #default="{ source }">
|
|
|
|
- <div class="p-3.5 flex flex-col bg-[#f6f6f6] gap-3.5">
|
|
|
|
- <template v-for="it of source.list" :key="it.id">
|
|
|
|
- <view class="">
|
|
|
|
- <MomentItem :options="it"></MomentItem>
|
|
|
|
- </view>
|
|
|
|
- </template>
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
- </PageHelper>
|
|
|
|
</div>
|
|
</div>
|
|
<BottomAppBar fixed placeholder>
|
|
<BottomAppBar fixed placeholder>
|
|
<div class="flex gap-7.5">
|
|
<div class="flex gap-7.5">
|