From 1f4a52807c29c8409aea29f46b73e04d57e0e0e6 Mon Sep 17 00:00:00 2001 From: ctw Date: Fri, 21 Nov 2025 10:47:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=88=91=E7=9A=84=E5=8A=A8=E6=80=81?= =?UTF-8?q?=EF=BC=9B=E6=88=91=E7=9A=84=E8=AF=84=E4=BB=B7=EF=BC=9B=E8=AE=BF?= =?UTF-8?q?=E5=AE=A2=E8=AE=B0=E5=BD=95=EF=BC=9B=E6=9C=8B=E5=8F=8B=E5=9C=88?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=EF=BC=9B=E4=B8=8A=E4=BC=A0=E7=9B=B8=E5=86=8C?= =?UTF-8?q?=EF=BC=9B=E6=88=91=E7=9A=84=E7=9B=B8=E5=86=8C=EF=BC=9B=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=92=8C=E5=AF=BC=E8=88=AA=E6=8C=89=E9=92=AE=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=9B=E6=9C=8B=E5=8F=8B=E5=9C=88=E5=8D=A1=E7=89=87?= =?UTF-8?q?=EF=BC=9B=E7=94=A8=E6=88=B7=E5=8D=A1=E7=89=87=EF=BC=9B=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9C=8B=E5=8F=8B=E5=9C=88=E8=AF=A6=E6=83=85=EF=BC=9B?= =?UTF-8?q?=E5=85=B3=E6=B3=A8=E5=85=AC=E4=BC=97=E5=8F=B7=E5=B8=98=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 21 ++ src/pages/home/city.vue | 8 +- src/pages/home/detail.vue | 73 +++---- src/pages/home/home.vue | 110 ++++------ src/pages/messages/messages.vue | 10 +- src/pages/moments/moments.vue | 77 +++---- src/pages/moments/publish.vue | 14 +- src/pages/profile/components/scroll-list.vue | 54 ----- .../profile/components/swiper-scroll.vue | 32 +++ src/pages/profile/components/user-ablum.vue | 43 ++++ src/pages/profile/like.vue | 45 +--- src/pages/profile/my-moment.vue | 49 +++++ src/pages/profile/profile.vue | 155 ++++++++++---- src/pages/profile/upload-album.vue | 58 ++++++ src/pages/profile/use-ablum.ts | 19 ++ src/pages/profile/userinfo.vue | 16 +- src/pages/profile/view-record.vue | 52 +++++ src/sheep/api/member/recent.ts | 58 ++++++ src/sheep/components/countDown/index.vue | 196 ------------------ .../components/moment-card/moment-card.vue | 136 ++++++++++++ src/sheep/components/moment/moment.vue | 117 ----------- .../components/scroll-list/scroll-list.vue | 75 +++++++ src/sheep/components/segmented/segmented.vue | 4 +- src/sheep/components/user-card/user-card.vue | 46 ++++ .../hooks/use-city-index.ts} | 4 +- src/sheep/hooks/use-scroll.ts | 78 ++----- unocss.config.ts | 6 + 27 files changed, 873 insertions(+), 683 deletions(-) delete mode 100644 src/pages/profile/components/scroll-list.vue create mode 100644 src/pages/profile/components/swiper-scroll.vue create mode 100644 src/pages/profile/components/user-ablum.vue create mode 100644 src/pages/profile/my-moment.vue create mode 100644 src/pages/profile/upload-album.vue create mode 100644 src/pages/profile/use-ablum.ts create mode 100644 src/pages/profile/view-record.vue delete mode 100644 src/sheep/components/countDown/index.vue create mode 100644 src/sheep/components/moment-card/moment-card.vue delete mode 100644 src/sheep/components/moment/moment.vue create mode 100644 src/sheep/components/scroll-list/scroll-list.vue create mode 100644 src/sheep/components/user-card/user-card.vue rename src/{pages/home/city-index.ts => sheep/hooks/use-city-index.ts} (99%) diff --git a/src/pages.json b/src/pages.json index e1498f87..2d6145b9 100644 --- a/src/pages.json +++ b/src/pages.json @@ -164,6 +164,27 @@ "navigationBarTitleText": "喜欢", "navigationStyle": "custom" } + }, + { + "path": "my-moment", + "style": { + "navigationBarTitleText": "我的动态", + "navigationStyle": "custom" + } + }, + { + "path": "view-record", + "style": { + "navigationBarTitleText": "访客记录", + "navigationStyle": "custom" + } + }, + { + "path": "upload-album", + "style": { + "navigationBarTitleText": "上传照片", + "navigationStyle": "custom" + } } ] }, diff --git a/src/pages/home/city.vue b/src/pages/home/city.vue index dd2ca882..873fa2ec 100644 --- a/src/pages/home/city.vue +++ b/src/pages/home/city.vue @@ -19,7 +19,7 @@ - + import { getCurrentInstance } from 'vue'; - import cityIndex, { type cityItem } from './city-index'; + import useCityIndex, { type cityItem } from '@/sheep/hooks/use-city-index'; // @ts-ignore import sheep from '@/sheep'; @@ -56,13 +56,13 @@ const selectHot = (v: cityItem) => { sheep.$store('user').setUserCity(v); eventChannel.emit('changeCity'); - uni.navigateBack(); + back(); }; const select = (v: cityItem) => { sheep.$store('user').setUserCity(v); eventChannel.emit('changeCity'); - uni.navigateBack(); + back(); }; function back() { diff --git a/src/pages/home/detail.vue b/src/pages/home/detail.vue index 4bcbca6d..c8f6e4dd 100644 --- a/src/pages/home/detail.vue +++ b/src/pages/home/detail.vue @@ -22,16 +22,11 @@ - @@ -110,26 +105,16 @@ - - - - - + + + + + + @@ -145,21 +130,14 @@ diff --git a/src/pages/messages/messages.vue b/src/pages/messages/messages.vue index 78c48678..23d96412 100644 --- a/src/pages/messages/messages.vue +++ b/src/pages/messages/messages.vue @@ -8,10 +8,12 @@ diff --git a/src/pages/moments/moments.vue b/src/pages/moments/moments.vue index 9713b2fd..c1df0cbf 100644 --- a/src/pages/moments/moments.vue +++ b/src/pages/moments/moments.vue @@ -7,20 +7,17 @@ - - - - - + + + + + diff --git a/src/pages/profile/components/swiper-scroll.vue b/src/pages/profile/components/swiper-scroll.vue new file mode 100644 index 00000000..8d032300 --- /dev/null +++ b/src/pages/profile/components/swiper-scroll.vue @@ -0,0 +1,32 @@ + + + diff --git a/src/pages/profile/components/user-ablum.vue b/src/pages/profile/components/user-ablum.vue new file mode 100644 index 00000000..7015f40d --- /dev/null +++ b/src/pages/profile/components/user-ablum.vue @@ -0,0 +1,43 @@ + + + diff --git a/src/pages/profile/like.vue b/src/pages/profile/like.vue index c34e61dc..6b11f707 100644 --- a/src/pages/profile/like.vue +++ b/src/pages/profile/like.vue @@ -18,45 +18,11 @@ :duration="200" > - + - + @@ -66,8 +32,9 @@ import { onLoad } from '@dcloudio/uni-app'; import { ref } from 'vue'; import segmented from '@/sheep/components/segmented/segmented.vue'; + import UserCard from '@/sheep/components/user-card/user-card.vue'; + import SwiperScroll from './components/swiper-scroll.vue'; import RecentApi from '@/sheep/api/member/recent'; - import scrollList from './components/scroll-list.vue'; const current = ref<0 | 1 | number>(0); const segmentedItems = ['我喜欢', '喜欢我']; @@ -80,7 +47,7 @@ const detail = (user: any) => { uni.navigateTo({ - url: '/pages/home/detail', + url: `/pages/home/detail?memberId=${user.memberId}`, success: function (res) { res.eventChannel.emit('recentDetail', user); }, diff --git a/src/pages/profile/my-moment.vue b/src/pages/profile/my-moment.vue new file mode 100644 index 00000000..8fc04f26 --- /dev/null +++ b/src/pages/profile/my-moment.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/pages/profile/profile.vue b/src/pages/profile/profile.vue index cf91fa3e..b83277a0 100644 --- a/src/pages/profile/profile.vue +++ b/src/pages/profile/profile.vue @@ -3,60 +3,73 @@ - + - {{ userInfo.nickname }} - ID: {{ userInfo.id }} - - {{ 'vip' }} - + {{ userInfo.nickname }} + ID: {{ userInfo.id }} + + {{ userCity?.t || '' }} + + - {{ 1 }} - 我喜欢 + {{ 1 }} + 我喜欢 - {{ 1 }} - 喜欢我 + {{ 2 }} + 喜欢我 - {{ 1 }} - 钱包 + {{ 3 }} + 钱包 + + + - - - - - - - - - + 退 出 登 录 @@ -65,21 +78,70 @@ + + + 我的评价 + + + 身材 + + + + 颜值 + + + + + + 有趣 + + + + 耐心 + + + + 综合评分 1.0 + + + diff --git a/src/pages/profile/upload-album.vue b/src/pages/profile/upload-album.vue new file mode 100644 index 00000000..b29ad3bf --- /dev/null +++ b/src/pages/profile/upload-album.vue @@ -0,0 +1,58 @@ + + + diff --git a/src/pages/profile/use-ablum.ts b/src/pages/profile/use-ablum.ts new file mode 100644 index 00000000..52bb21e8 --- /dev/null +++ b/src/pages/profile/use-ablum.ts @@ -0,0 +1,19 @@ +import { onMounted, ref } from 'vue'; +import { AlbumData } from './components/user-ablum.vue'; +import RecentApi from '@/sheep/api/member/recent'; + +export default function useAblum() { + const ablumList = ref([]); // 用户相册 + + // 获取用户相册 + const getUserAlbum = async () => { + const { data = null } = await RecentApi.getUserAlbum({ pageNo: 1, pageSize: 10 }); + ablumList.value = data.list ?? []; + }; + + onMounted(() => { + getUserAlbum(); + }); + + return { ablumList, getUserAlbum }; +} diff --git a/src/pages/profile/userinfo.vue b/src/pages/profile/userinfo.vue index 2371f2ae..ce4c8a66 100644 --- a/src/pages/profile/userinfo.vue +++ b/src/pages/profile/userinfo.vue @@ -11,12 +11,14 @@ @@ -131,7 +133,7 @@ import { reactive } from 'vue'; // @ts-ignore import UserApi from '@/sheep/api/member/user'; - import sUploader from '@/sheep/components/s-uploader/s-uploader.vue'; + import SUploader from '@/sheep/components/s-uploader/s-uploader.vue'; // @ts-ignore import sheep from '@/sheep'; diff --git a/src/pages/profile/view-record.vue b/src/pages/profile/view-record.vue new file mode 100644 index 00000000..6cfda947 --- /dev/null +++ b/src/pages/profile/view-record.vue @@ -0,0 +1,52 @@ + + + diff --git a/src/sheep/api/member/recent.ts b/src/sheep/api/member/recent.ts index 2bc90c15..03dd9949 100644 --- a/src/sheep/api/member/recent.ts +++ b/src/sheep/api/member/recent.ts @@ -51,6 +51,64 @@ const RecentApi = { }, }); }, + // 查看我的动态 + myMomentList: (data: any) => { + return request({ + url: '/member/recent/xxx/xxx', + method: 'POST', + data, + custom: { + showLoading: true, + loadingMsg: '加载中', + }, + }); + }, + // 查看访客记录 + viewRecord: (data: any) => { + return request({ + url: '/member/recent/xxx/xxx', + method: 'POST', + data, + custom: { + showLoading: true, + loadingMsg: '加载中', + }, + }); + }, + // 查看我的评价 + myEvaluate: () => { + return request({ + url: '/member/recent/xxx/xxx', + method: 'POST', + custom: { + showLoading: true, + loadingMsg: '加载中', + }, + }); + }, + // 用户朋友圈操作 + recentOperate: (data: any) => { + return request({ + url: '/member/recent/operate', + method: 'POST', + data, + custom: { + showLoading: true, + loadingMsg: '操作中', + }, + }); + }, + // 获取用户相册 + getUserAlbum: (params: any) => { + return request({ + url: '/member/photo/page', + method: 'GET', + params, + custom: { + showLoading: false, + }, + }); + }, }; export default RecentApi; diff --git a/src/sheep/components/countDown/index.vue b/src/sheep/components/countDown/index.vue deleted file mode 100644 index d7b88deb..00000000 --- a/src/sheep/components/countDown/index.vue +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - diff --git a/src/sheep/components/moment-card/moment-card.vue b/src/sheep/components/moment-card/moment-card.vue new file mode 100644 index 00000000..8c820c55 --- /dev/null +++ b/src/sheep/components/moment-card/moment-card.vue @@ -0,0 +1,136 @@ + + + diff --git a/src/sheep/components/moment/moment.vue b/src/sheep/components/moment/moment.vue deleted file mode 100644 index c5ecf042..00000000 --- a/src/sheep/components/moment/moment.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - diff --git a/src/sheep/components/scroll-list/scroll-list.vue b/src/sheep/components/scroll-list/scroll-list.vue new file mode 100644 index 00000000..ae7df96a --- /dev/null +++ b/src/sheep/components/scroll-list/scroll-list.vue @@ -0,0 +1,75 @@ + + + diff --git a/src/sheep/components/segmented/segmented.vue b/src/sheep/components/segmented/segmented.vue index b4ac962e..8a31fb2f 100644 --- a/src/sheep/components/segmented/segmented.vue +++ b/src/sheep/components/segmented/segmented.vue @@ -1,6 +1,6 @@