Merge branch 'master' of https://gitea.zianxin.com/zax/Friendship-and-chat-uniapp
This commit is contained in:
commit
f057fac4fb
11 files changed
+406
-259
No files matched your search
+27
-25
@@ -18,12 +18,7 @@
|
||||
{{ userDetail.member?.memberCity ? userDetail.member?.memberCity + ' · ' : '' }}
|
||||
{{ userDetail.distance?.toFixed(2) }}km
|
||||
</view>
|
||||
<uni-icons
|
||||
type="more-filled"
|
||||
size="28"
|
||||
color="#D29E52"
|
||||
@click="actionShow = true"
|
||||
></uni-icons>
|
||||
<uni-icons type="more-filled" size="28" color="#D29E52" @click="actionShow = true" />
|
||||
</view>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
@@ -82,6 +77,7 @@
|
||||
<view class="m-4">
|
||||
<view class="my-2 text-size-base">相册</view>
|
||||
<image
|
||||
v-if="photoListUrls.length"
|
||||
class="size-140rpx rounded-1 mr-2 mb-1"
|
||||
v-for="(item, index) in photoListUrls"
|
||||
:key="index"
|
||||
@@ -89,26 +85,30 @@
|
||||
mode="aspectFill"
|
||||
@click="previewPhoto(index)"
|
||||
/>
|
||||
<view class="text-center c-#949494" v-else>相册暂无照片</view>
|
||||
</view>
|
||||
|
||||
<view class="m-4">
|
||||
<view class="my-2 text-base">评价</view>
|
||||
<view class="my-2 text-base">
|
||||
<text>评价</text>
|
||||
<text class="text-sm ml-1">{{ userDetail.operationTotal?.recentShieldTotal || 0 }}</text>
|
||||
</view>
|
||||
<view class="flex justify-around flex-wrap text-color-theme text-base">
|
||||
<view class="bg-color-dark flex items-center px-2 py-1 mb-2 rounded-2 gap-2">
|
||||
<text>身材</text>
|
||||
<uni-rate v-model="rating.scoreSc" size="18" />
|
||||
<uni-rate v-model="rating.scoreSc" size="18" readonly />
|
||||
</view>
|
||||
<view class="bg-color-dark flex items-center px-2 py-1 mb-2 rounded-2 gap-2">
|
||||
<text>颜值</text>
|
||||
<uni-rate v-model="rating.scoreSk" size="18" />
|
||||
<uni-rate v-model="rating.scoreSk" size="18" readonly />
|
||||
</view>
|
||||
<view class="bg-color-dark flex items-center px-2 py-1 mb-2 rounded-2 gap-2">
|
||||
<text>耐心</text>
|
||||
<uni-rate v-model="rating.scoreNx" size="18" />
|
||||
<uni-rate v-model="rating.scoreNx" size="18" readonly />
|
||||
</view>
|
||||
<view class="bg-color-dark flex items-center px-2 py-1 mb-2 rounded-2 gap-2">
|
||||
<text>有趣</text>
|
||||
<uni-rate v-model="rating.scoreYq" size="18" />
|
||||
<uni-rate v-model="rating.scoreYq" size="18" readonly />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -143,7 +143,7 @@
|
||||
@click="handleLike"
|
||||
>
|
||||
<uni-icons
|
||||
v-if="userDetail.operationStatus?.isLike"
|
||||
v-if="userDetail.userOperationStatus?.isLike"
|
||||
type="heart-filled"
|
||||
size="24"
|
||||
color="#D29E52"
|
||||
@@ -197,10 +197,11 @@
|
||||
scoreYq: 0, // 有趣评分
|
||||
});
|
||||
|
||||
const photoListUrls = computed(() =>
|
||||
userDetail.value.memberPhotoList
|
||||
?.filter((i) => i.resourceType === 'IMAGE')
|
||||
.map((item) => item.address),
|
||||
const photoListUrls = computed(
|
||||
() =>
|
||||
userDetail.value.memberPhotoList
|
||||
?.filter((i) => i.resourceType === 'IMAGE')
|
||||
.map((item) => item.address) || [],
|
||||
);
|
||||
|
||||
onLoad(async (options: any) => {
|
||||
@@ -343,21 +344,22 @@
|
||||
|
||||
// 喜欢
|
||||
const handleLike = async () => {
|
||||
await RecentApi.recentOperate({
|
||||
const { code } = await RecentApi.recentOperate({
|
||||
memberId: userDetail.value.member.memberId,
|
||||
action: 'MEMBER_COLLECT',
|
||||
});
|
||||
if (code !== 0) return;
|
||||
await getDetail();
|
||||
};
|
||||
|
||||
// 评价
|
||||
const rate = async () => {
|
||||
await RecentApi.recentOperate({
|
||||
memberId: userDetail.value.member.memberId,
|
||||
action: 'MEMBER_RATING',
|
||||
...rating,
|
||||
});
|
||||
};
|
||||
// 评分
|
||||
// const rate = async () => {
|
||||
// await RecentApi.recentOperate({
|
||||
// memberId: userDetail.value.member.memberId,
|
||||
// action: 'MEMBER_RATING',
|
||||
// ...rating,
|
||||
// });
|
||||
// };
|
||||
|
||||
onHide(() => {
|
||||
rate();
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
title: '';
|
||||
value: '';
|
||||
title: string;
|
||||
value: string;
|
||||
}>();
|
||||
</script>
|
||||
@@ -120,7 +120,7 @@
|
||||
<view class="mx-8 flex items-center">
|
||||
<s-uploader
|
||||
class="flex-1"
|
||||
v-model:url="girlAuthPic"
|
||||
v-model:url="userinfo.avatar"
|
||||
fileMediatype="image"
|
||||
limit="1"
|
||||
mode="grid"
|
||||
@@ -154,7 +154,7 @@
|
||||
type="text"
|
||||
placeholder="请输入昵称"
|
||||
placeholder-style="color: rgba(255, 255, 255, 0.6)"
|
||||
maxlength="10"
|
||||
:maxlength="10"
|
||||
/>
|
||||
<capsule-cell title="位置权限" :value="'未允许'" />
|
||||
</view>
|
||||
@@ -191,7 +191,7 @@
|
||||
<view class="h-60rpx"></view>
|
||||
<view class="flex-col-center">
|
||||
<s-uploader
|
||||
v-model:url="boyAuthPic"
|
||||
v-model:url="userinfo.avatar"
|
||||
fileMediatype="image"
|
||||
limit="1"
|
||||
mode="grid"
|
||||
@@ -219,15 +219,21 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
// @ts-nocheck
|
||||
import RecentApi from '@/sheep/api/member/recent';
|
||||
import SUploader from '@/sheep/components/s-uploader/s-uploader.vue';
|
||||
import { computed, reactive, ref } from 'vue';
|
||||
// @ts-ignore
|
||||
import sheep from '@/sheep/index';
|
||||
// @ts-ignore
|
||||
import { baseUrl, apiPath, tenantId } from '@/sheep/config';
|
||||
// @ts-ignore
|
||||
import { getAccessToken } from '@/sheep/request';
|
||||
// @ts-ignore
|
||||
import { formatDate } from '@/sheep/helper/utils';
|
||||
import CapsuleCell from './components/capsule-cell.vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
// @ts-ignore
|
||||
import UserApi from '@/sheep/api/member/user';
|
||||
|
||||
const userInfoStore = computed(() => sheep.$store('user').userInfo);
|
||||
|
||||
@@ -249,8 +255,6 @@
|
||||
wechatNum: '',
|
||||
wechatQrCode: '',
|
||||
});
|
||||
const girlAuthPic = ref(''); // 认证图片 女
|
||||
const boyAuthPic = ref(''); // 认证图片 男
|
||||
|
||||
const header = {
|
||||
Accept: '*/*',
|
||||
@@ -258,6 +262,34 @@
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
};
|
||||
|
||||
// 查询用户人脸认证状态
|
||||
const getFaceVerify = async () => {
|
||||
const { code, data } = await RecentApi.getFaceVerify();
|
||||
|
||||
console.log('查询用户人脸认证状态', code, data);
|
||||
|
||||
if (code !== 0) return uni.showToast({ title: '查询用户人脸认证失败', icon: 'none' });
|
||||
switch (data.authStatus) {
|
||||
case '1':
|
||||
// 待认证
|
||||
break;
|
||||
case '2':
|
||||
return uni.showToast({ title: '你的人脸审核中', icon: 'error' });
|
||||
case '3':
|
||||
// 审核通过
|
||||
break;
|
||||
case '4':
|
||||
// 审核失败
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
onLoad(async () => {
|
||||
await getFaceVerify();
|
||||
const { data } = await UserApi.getUserInfo();
|
||||
Object.assign(userinfo, data);
|
||||
});
|
||||
|
||||
// 人脸认证 女
|
||||
const girlFaceVerify = async () => {
|
||||
// #ifndef APP-PLUS
|
||||
@@ -265,25 +297,25 @@
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
if (!girlAuthPic.value) return uni.showToast({ title: '请先上传人脸照片', icon: 'error' });
|
||||
if (!userinfo.avatar) return uni.showToast({ title: '请先上传人脸照片', icon: 'error' });
|
||||
|
||||
const aliyunVerify = uni.requireNativePlugin('AP-FaceDetectModule');
|
||||
const metaInfo = JSON.stringify(aliyunVerify.getMetaInfo());
|
||||
|
||||
// 创建人脸认证
|
||||
// 创建女生人脸认证
|
||||
const { code, data } = await RecentApi.createGirlFaceVerify({
|
||||
memberHeight: userinfo.height,
|
||||
memberWeight: userinfo.weight,
|
||||
memberWechatNumber: wxInfo.wechatNum,
|
||||
memberOcc: userinfo.occ,
|
||||
memberDesc: userinfo.description,
|
||||
authPic: girlAuthPic.value,
|
||||
authPic: userinfo.avatar,
|
||||
metaInfoJson: metaInfo,
|
||||
});
|
||||
console.log('创建人脸认证接口responseData:', code, data);
|
||||
if (code !== 0)
|
||||
return uni.showToast({ title: '请上传包含人脸的头像', icon: 'none', duration: 6000 });
|
||||
verify(data.bizId);
|
||||
verify(data.bizId, data.id);
|
||||
// #endif
|
||||
};
|
||||
|
||||
@@ -294,34 +326,14 @@
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
if (!boyAuthPic.value) return uni.showToast({ title: '请先上传人脸照片', icon: 'error' });
|
||||
if (!userinfo.avatar) return uni.showToast({ title: '请先上传人脸照片', icon: 'error' });
|
||||
|
||||
const aliyunVerify = uni.requireNativePlugin('AP-FaceDetectModule');
|
||||
const metaInfo = JSON.stringify(aliyunVerify.getMetaInfo());
|
||||
|
||||
// 查询用户人脸认证
|
||||
// const { code, data } = await RecentApi.getFaceVerify();
|
||||
// if (code !== 0) return uni.showToast({ title: '查询用户人脸认证失败', icon: 'error' });
|
||||
|
||||
// console.log('查询用户人脸认证', code, data);
|
||||
|
||||
// switch (data.authStatus) {
|
||||
// case '1':
|
||||
// // 待认证
|
||||
// break;
|
||||
// case '2':
|
||||
// return uni.showToast({ title: '你的人脸审核中', icon: 'error' });
|
||||
// case '3':
|
||||
// // 审核通过
|
||||
// break;
|
||||
// case '4':
|
||||
// // 审核失败
|
||||
// break;
|
||||
// }
|
||||
|
||||
// 创建人脸认证
|
||||
// 创建男生人脸认证
|
||||
const { code, data } = await RecentApi.createBoyFaceVerify({
|
||||
authPic: boyAuthPic.value,
|
||||
authPic: userinfo.avatar,
|
||||
metaInfoJson: metaInfo,
|
||||
});
|
||||
console.log('创建人脸认证接口responseData:', code, data);
|
||||
@@ -363,6 +375,8 @@
|
||||
break;
|
||||
case 1000:
|
||||
uni.showToast({ title: '您已认证成功', icon: 'none' });
|
||||
await UserApi.updateUser(userinfo);
|
||||
sheep.$store('user').getInfo();
|
||||
break;
|
||||
case 1001:
|
||||
await RecentApi.cancelFaceVerify({ authId });
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
@refresh="refreshList"
|
||||
@loadMore="listLoadMore"
|
||||
>
|
||||
<moment-card v-for="item in listData" :data="item" :showChat="false" />
|
||||
<moment-card v-for="item in listData" :data="item" :showChat="false" :showLike="false" />
|
||||
</scroll-list>
|
||||
</wd-config-provider>
|
||||
</template>
|
||||
|
||||
+152
-109
@@ -4,8 +4,10 @@
|
||||
<wd-navbar title="我的" safeAreaInsetTop :bordered="false">
|
||||
<template #right>
|
||||
<navigator hover-class="navigator-hover">
|
||||
<view class="flex items-center rounded-full h-44rpx bg-color-theme py-1 px-2 text-black"
|
||||
@click="editUserInfo">
|
||||
<view
|
||||
class="flex items-center rounded-full h-44rpx bg-color-theme py-1 px-2 text-black"
|
||||
@click="editUserInfo"
|
||||
>
|
||||
<uni-icons type="auth" size="20" color="#333"></uni-icons>
|
||||
<text class="text-sm">编辑资料</text>
|
||||
</view>
|
||||
@@ -16,15 +18,21 @@
|
||||
<scroll-view class="h-[calc(100vh-144rpx)]" scroll-y>
|
||||
<!-- 个人信息 -->
|
||||
<view class="flex items-center p-6">
|
||||
<image :src="userInfo.avatar" class="mr-4 size-100px rounded-full bg-#333 border border-amber border-solid"
|
||||
mode="aspectFill" />
|
||||
<image
|
||||
:src="userInfo.avatar"
|
||||
class="mr-4 size-100px rounded-full bg-#333 border border-amber border-solid"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="flex-1">
|
||||
<view class="mb-1 text-base">{{ userInfo.nickname }}</view>
|
||||
<view class="mb-2 text-xs text-#ffffff80 flex items-center">
|
||||
<text>ID: {{ userInfo.id }}</text>
|
||||
<image class="size-24rpx ml-4" :src="userGenderImageSrc" mode="scaleToFill" />
|
||||
</view>
|
||||
<text v-if="userCity?.t" class="bg-#333 text-color-theme-dark text-xs px-2 py-1 rounded-1 truncate">
|
||||
<text
|
||||
v-if="userCity?.t"
|
||||
class="bg-#333 text-color-theme-dark text-xs px-2 py-1 rounded-1 truncate"
|
||||
>
|
||||
{{ userCity?.t || '' }}
|
||||
</text>
|
||||
</view>
|
||||
@@ -33,11 +41,15 @@
|
||||
<!-- 我喜欢和钱包 -->
|
||||
<view class="flex justify-around my-4 text-base">
|
||||
<view class="flex flex-col items-center" @click="goLike(0)">
|
||||
<text class="text-color-theme font-600 text-lg">{{ recentTotal.userLikeItTotal }}</text>
|
||||
<text class="text-color-theme font-600 text-lg">
|
||||
{{ recentTotal.userLikeItTotal || 0 }}
|
||||
</text>
|
||||
<text class="text-color-theme text-sm">我喜欢</text>
|
||||
</view>
|
||||
<view class="flex flex-col items-center" @click="goLike(1)">
|
||||
<text class="text-color-theme font-600 text-lg">{{ recentTotal.userLikeMeTotal }}</text>
|
||||
<text class="text-color-theme font-600 text-lg">
|
||||
{{ recentTotal.userLikeMeTotal || 0 }}
|
||||
</text>
|
||||
<text class="text-color-theme text-sm">喜欢我</text>
|
||||
</view>
|
||||
<navigator url="/pages/profile/recharge" open-type="navigate" hover-class="navigator-hover">
|
||||
@@ -52,11 +64,16 @@
|
||||
|
||||
<!-- 开通vip -->
|
||||
<view
|
||||
class="text-color-theme-dark mx-4 p-4 rounded-2 bg-gradient-to-b from-#111 to-#222 b-4 b-solid b-t-#D29E52/60 b-l-#D29E52/40 b-r-#D29E52/40 b-b-#D29E52/20 flex justify-between">
|
||||
class="text-color-theme-dark mx-4 p-4 rounded-2 bg-gradient-to-b from-#111 to-#222 b-4 b-solid b-t-#D29E52/60 b-l-#D29E52/40 b-r-#D29E52/40 b-b-#D29E52/20 flex justify-between"
|
||||
>
|
||||
<view class="font-900 font-italic text-xl">VIP</view>
|
||||
<view class="flex items-center">
|
||||
<text class="text-xs">尊享vip免费特权</text>
|
||||
<navigator url="/pages/profile/apply-vip" open-type="navigate" hover-class="navigator-hover">
|
||||
<navigator
|
||||
url="/pages/profile/apply-vip"
|
||||
open-type="navigate"
|
||||
hover-class="navigator-hover"
|
||||
>
|
||||
<text class="ml-4 px-4 py-1 rounded-full text-24rpx bg-color-theme text-black">
|
||||
立即开通
|
||||
</text>
|
||||
@@ -69,16 +86,34 @@
|
||||
<!-- 菜单 -->
|
||||
<view class="mt-4 mx-1">
|
||||
<wd-cell-group>
|
||||
<wd-cell v-for="(item, index) in MenuCellList" :key="index" :title="item.title" :value="item.value"
|
||||
icon-size="24" :icon="item.icon" is-link ellipsis :to="item.to" @click="item.click" />
|
||||
<wd-cell
|
||||
v-for="(item, index) in MenuCellList"
|
||||
:key="index"
|
||||
:title="item.title"
|
||||
:value="item.value"
|
||||
icon-size="24"
|
||||
:icon="item.icon"
|
||||
is-link
|
||||
ellipsis
|
||||
:to="item.to"
|
||||
@click="item.onClick"
|
||||
/>
|
||||
</wd-cell-group>
|
||||
</view>
|
||||
<view class="h-100rpx"></view>
|
||||
</scroll-view>
|
||||
|
||||
<wd-popup v-model="myEvaluationShow" custom-style="border-radius:32rpx;" closable :safe-area-inset-bottom="true">
|
||||
<wd-popup
|
||||
v-model="myEvaluationShow"
|
||||
custom-style="border-radius:32rpx;"
|
||||
closable
|
||||
:safe-area-inset-bottom="true"
|
||||
>
|
||||
<view class="w-90vw h-400rpx flex-col-center gap-4 flex-wrap">
|
||||
<view class="text-color-theme text-lg">我的评价{{ myEvaluation.evaluateCount }}</view>
|
||||
<view class="text-color-theme text-lg">
|
||||
<text>我的评价</text>
|
||||
<text class="ml-1 text-sm">{{ myEvaluation.evaluateCount }}</text>
|
||||
</view>
|
||||
<view class="w-90% flex justify-around">
|
||||
<view class="bg-color-theme-dark flex items-center p-1 rounded-1">
|
||||
<text class="mr-2 text-xs">身材</text>
|
||||
@@ -99,115 +134,123 @@
|
||||
<wd-rate v-model="myEvaluation.scoreNx" readonly />
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-color-theme text-lg">综合评分 {{ myEvaluation.avgScore }}</view>
|
||||
<view class="text-color-theme text-lg">
|
||||
综合评分 {{ myEvaluation.avgScore?.toFixed(2) || 0 }}
|
||||
</view>
|
||||
</view>
|
||||
</wd-popup>
|
||||
<wd-curtain v-model="curtainShow"
|
||||
<wd-curtain
|
||||
v-model="curtainShow"
|
||||
src="https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png"
|
||||
close-position="top-right" :width="300" close-on-click-modal show-menu-by-longpress />
|
||||
close-position="top-right"
|
||||
:width="300"
|
||||
close-on-click-modal
|
||||
show-menu-by-longpress
|
||||
/>
|
||||
</wd-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, reactive, ref } from 'vue';
|
||||
import UserAblum from './components/user-ablum.vue';
|
||||
import useAblum from './use-ablum';
|
||||
// @ts-ignore
|
||||
import sheep from '@/sheep';
|
||||
import RecentApi from '@/sheep/api/member/recent';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
// @ts-ignore
|
||||
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
||||
import { computed, reactive, ref } from 'vue';
|
||||
import UserAblum from './components/user-ablum.vue';
|
||||
import useAblum from './use-ablum';
|
||||
// @ts-ignore
|
||||
import sheep from '@/sheep';
|
||||
import RecentApi from '@/sheep/api/member/recent';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
// @ts-ignore
|
||||
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
||||
|
||||
const { ablumList } = useAblum();
|
||||
const { ablumList } = useAblum();
|
||||
|
||||
// 统计信息
|
||||
const recentTotal = ref({
|
||||
memberRecentId: null,
|
||||
bizType: null,
|
||||
likeTotal: 0,
|
||||
likeItTotal: 0,
|
||||
likeMeTotal: 0,
|
||||
reportTotal: 0,
|
||||
shieldTotal: 0,
|
||||
collectTotal: 0,
|
||||
userLikeItTotal: 0,
|
||||
userLikeMeTotal: 0,
|
||||
});
|
||||
|
||||
// 我的评价数据
|
||||
const myEvaluation = reactive({
|
||||
scoreSc: 0,
|
||||
scoreNx: 0,
|
||||
scoreSk: 0,
|
||||
scoreYq: 0,
|
||||
avgScore: 0,
|
||||
evaluateCount: 0,
|
||||
});
|
||||
const myEvaluationShow = ref(false); // 我的评价弹窗
|
||||
const curtainShow = ref(false); // 关注公众号弹窗
|
||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||
const userCity = computed(() => sheep.$store('user').userCity);
|
||||
const userWallet = computed(() => sheep.$store('user').userWallet);
|
||||
const userGenderImageSrc = computed(() => {
|
||||
const sex = userInfo.value.sex;
|
||||
if (sex === 1) return '/static/gender-man.png';
|
||||
if (sex === 2) return '/static/gender-woman.png';
|
||||
return '';
|
||||
});
|
||||
|
||||
onLoad(async () => {
|
||||
const { data: totalData } = await RecentApi.recentTotal();
|
||||
recentTotal.value = totalData ?? {};
|
||||
});
|
||||
|
||||
// 修改用户信息
|
||||
const editUserInfo = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/profile/userinfo',
|
||||
// 统计信息
|
||||
const recentTotal = ref({
|
||||
memberRecentId: null,
|
||||
bizType: null,
|
||||
likeTotal: 0,
|
||||
likeItTotal: 0,
|
||||
likeMeTotal: 0,
|
||||
reportTotal: 0,
|
||||
shieldTotal: 0,
|
||||
collectTotal: 0,
|
||||
userLikeItTotal: 0,
|
||||
userLikeMeTotal: 0,
|
||||
});
|
||||
};
|
||||
|
||||
// type: 0-我喜欢 1-喜欢我
|
||||
const goLike = (type: 0 | 1) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/profile/like?type=${type}`,
|
||||
// 我的评价数据
|
||||
const myEvaluation = reactive({
|
||||
scoreSc: 0,
|
||||
scoreNx: 0,
|
||||
scoreSk: 0,
|
||||
scoreYq: 0,
|
||||
avgScore: 0,
|
||||
evaluateCount: 0,
|
||||
});
|
||||
};
|
||||
const myEvaluationShow = ref(false); // 我的评价弹窗
|
||||
const curtainShow = ref(false); // 关注公众号弹窗
|
||||
|
||||
// 查看我的评价
|
||||
const lookMyEvaluation = async () => {
|
||||
const { data = null } = await RecentApi.myEvaluate();
|
||||
if (data) {
|
||||
Object.assign(myEvaluation, data);
|
||||
myEvaluationShow.value = true;
|
||||
return;
|
||||
}
|
||||
uni.showToast({ title: '查看失败', icon: 'none' });
|
||||
};
|
||||
|
||||
// 关注公众号
|
||||
const subOfficial = () => {
|
||||
curtainShow.value = true;
|
||||
};
|
||||
|
||||
// 问题反馈
|
||||
const goFeedback = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/profile/feedback',
|
||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||
const userCity = computed(() => sheep.$store('user').userCity);
|
||||
const userWallet = computed(() => sheep.$store('user').userWallet);
|
||||
const userGenderImageSrc = computed(() => {
|
||||
const sex = userInfo.value.sex;
|
||||
if (sex === 1) return '/static/gender-man.png';
|
||||
if (sex === 2) return '/static/gender-woman.png';
|
||||
return '';
|
||||
});
|
||||
};
|
||||
|
||||
// cell菜单
|
||||
const MenuCellList = [
|
||||
{ title: '我的收益', value: '', icon: 'wallet', to: '/pages/wechat/index' },
|
||||
{ title: '访客记录', value: '', icon: 'dong', to: '/pages/profile/view-record' },
|
||||
{ title: '认证中心', value: '', icon: 'user', to: '/pages/profile/face-verify' },
|
||||
{ title: '我的动态√', value: '', icon: 'star', to: '/pages/profile/my-moment' },
|
||||
{ title: '我的评价√', value: '', icon: 'view-module', to: '', click: lookMyEvaluation },
|
||||
{ title: '问题反馈√', value: '', icon: 'backtop-rectangle', to: '', click: goFeedback },
|
||||
// { title: '客服助手', value: '', icon: 'service', to: '' },
|
||||
{ title: '关注公众号√', value: '获取最新消息', icon: 'qrcode', to: '', click: subOfficial },
|
||||
{ title: '设置√', value: '', icon: 'setting1', to: '/pages/profile/setting' },
|
||||
];
|
||||
onLoad(async () => {
|
||||
const { data: totalData } = await RecentApi.recentTotal();
|
||||
recentTotal.value = totalData ?? {};
|
||||
});
|
||||
|
||||
// 修改用户信息
|
||||
const editUserInfo = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/profile/userinfo',
|
||||
});
|
||||
};
|
||||
|
||||
// type: 0-我喜欢 1-喜欢我
|
||||
const goLike = (type: 0 | 1) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/profile/like?type=${type}`,
|
||||
});
|
||||
};
|
||||
|
||||
// 查看我的评价
|
||||
const lookMyEvaluation = async () => {
|
||||
const { data = null } = await RecentApi.myEvaluate();
|
||||
if (data) {
|
||||
Object.assign(myEvaluation, data);
|
||||
myEvaluationShow.value = true;
|
||||
return;
|
||||
}
|
||||
uni.showToast({ title: '查看失败', icon: 'none' });
|
||||
};
|
||||
|
||||
// 关注公众号
|
||||
const subOfficial = () => {
|
||||
curtainShow.value = true;
|
||||
};
|
||||
|
||||
// 问题反馈
|
||||
const goFeedback = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/profile/feedback',
|
||||
});
|
||||
};
|
||||
|
||||
// 菜单
|
||||
const MenuCellList = [
|
||||
{ title: '我的收益', value: '', icon: 'wallet', to: '/pages/wechat/index' },
|
||||
{ title: '访客记录', value: '', icon: 'browse', to: '/pages/profile/view-record' },
|
||||
{ title: '认证中心', value: '', icon: 'user', to: '/pages/profile/face-verify' },
|
||||
{ title: '我的动态√', value: '', icon: 'star', to: '/pages/profile/my-moment' },
|
||||
{ title: '我的评价√', value: '', icon: 'view-module', to: '', onClick: lookMyEvaluation },
|
||||
{ title: '问题反馈√', value: '', icon: 'backtop-rectangle', to: '', onClick: goFeedback },
|
||||
// { title: '客服助手', value: '', icon: 'service', to: '' },
|
||||
{ title: '关注公众号√', value: '获取最新消息', icon: 'qrcode', to: '', onClick: subOfficial },
|
||||
{ title: '设置√', value: '', icon: 'setting1', to: '/pages/profile/setting' },
|
||||
];
|
||||
</script>
|
||||
@@ -10,17 +10,29 @@
|
||||
|
||||
<view class="text-base mx-4 my-2">微信号</view>
|
||||
<view class="mx-4 rounded-3">
|
||||
<wd-input
|
||||
<input
|
||||
class="h-100rpx rounded-50rpx bg-color-light px-40rpx text-32rpx text-color-theme"
|
||||
v-model.trim="params.wechatNum"
|
||||
placeholder="填写我的微信号"
|
||||
clearable
|
||||
type="text"
|
||||
placeholder="请输入您的微信号"
|
||||
placeholder-style="color: rgba(255, 255, 255, 0.6)"
|
||||
:maxlength="20"
|
||||
:focus="true"
|
||||
/>
|
||||
</view>
|
||||
<view class="text-base mx-4 my-2">上传我的微信二维码</view>
|
||||
<view class="text-base mx-4 mt-6 mb-4">上传您的微信二维码</view>
|
||||
<view class="px-4">
|
||||
<s-uploader v-model:url="params.wechatQrCode" fileMediatype="image" limit="1" mode="grid" />
|
||||
<s-uploader
|
||||
v-model:url="params.wechatQrCode"
|
||||
fileMediatype="image"
|
||||
limit="1"
|
||||
mode="grid"
|
||||
:imageStyles="{
|
||||
width: '268rpx',
|
||||
height: '268rpx',
|
||||
border: { width: '6rpx', color: '#D29E52', radius: '50rpx' },
|
||||
}"
|
||||
/>
|
||||
</view>
|
||||
<view
|
||||
class="mt-80rpx w-1/3 mx-auto rounded-full bg-color-theme-dark text-base text-center py-2 active:bg-color-theme"
|
||||
|
||||
@@ -29,68 +29,78 @@
|
||||
fileMediatype="image"
|
||||
limit="1"
|
||||
mode="grid"
|
||||
:imageStyles="{ width: '268rpx', height: '268rpx' }"
|
||||
:imageStyles="{
|
||||
width: '268rpx',
|
||||
height: '268rpx',
|
||||
border: { width: '6rpx', color: '#D29E52', radius: '50rpx' },
|
||||
}"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="ml-5 mb-3">语音签名</view>
|
||||
<wd-cell-group>
|
||||
<wd-cell title="单元格" value="去录制" is-link>
|
||||
<template #title>
|
||||
<view class="flex items-center">
|
||||
<uni-icons type="mic" size="30" color="#D29E52"></uni-icons>
|
||||
<text class="truncate">添加语音签名,让你更受关注</text>
|
||||
</view>
|
||||
</template>
|
||||
</wd-cell>
|
||||
</wd-cell-group>
|
||||
<template v-if="false">
|
||||
<view class="ml-5 mb-3">语音签名</view>
|
||||
<view class="px-2">
|
||||
<wd-cell-group>
|
||||
<wd-cell title="单元格" value="去录制" is-link>
|
||||
<template #title>
|
||||
<view class="flex items-center">
|
||||
<uni-icons type="mic" size="30" color="#D29E52"></uni-icons>
|
||||
<text class="truncate">添加语音签名,让你更受关注</text>
|
||||
</view>
|
||||
</template>
|
||||
</wd-cell>
|
||||
</wd-cell-group>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view class="ml-5 my-3">基本资料</view>
|
||||
<wd-cell-group>
|
||||
<wd-cell title="昵称" value="输入">
|
||||
<template #default>
|
||||
<input type="text" v-model="userinfo.nickname" :maxlength="12" />
|
||||
</template>
|
||||
</wd-cell>
|
||||
<wd-datetime-picker
|
||||
v-model="userinfo.birthday"
|
||||
label="生日"
|
||||
title="生日"
|
||||
type="date"
|
||||
align-right
|
||||
:default-value="Date.now()"
|
||||
:min-date="new Date(1980, 1, 1).getTime()"
|
||||
:max-date="Date.now()"
|
||||
/>
|
||||
<wd-picker
|
||||
v-model="userinfo.height"
|
||||
:columns="columnsHeight"
|
||||
label="身高"
|
||||
title="身高"
|
||||
align-right
|
||||
:default-value="180"
|
||||
/>
|
||||
<wd-picker
|
||||
v-model="userinfo.weight"
|
||||
:columns="columnsWeight"
|
||||
label="体重"
|
||||
title="体重"
|
||||
align-right
|
||||
:default-value="60"
|
||||
/>
|
||||
<wd-picker
|
||||
v-model="userinfo.occ"
|
||||
:columns="columnsOcc"
|
||||
label="从事职业"
|
||||
title="从事职业"
|
||||
align-right
|
||||
/>
|
||||
</wd-cell-group>
|
||||
<view class="px-2">
|
||||
<wd-cell-group>
|
||||
<wd-cell title="昵称" value="输入">
|
||||
<template #default>
|
||||
<input type="text" v-model="userinfo.nickname" :maxlength="12" />
|
||||
</template>
|
||||
</wd-cell>
|
||||
<wd-datetime-picker
|
||||
v-model="userinfo.birthday"
|
||||
label="生日"
|
||||
title="生日"
|
||||
type="date"
|
||||
align-right
|
||||
:default-value="Date.now()"
|
||||
:min-date="new Date(1980, 1, 1).getTime()"
|
||||
:max-date="Date.now()"
|
||||
/>
|
||||
<wd-picker
|
||||
v-model="userinfo.height"
|
||||
:columns="columnsHeight"
|
||||
label="身高"
|
||||
title="身高"
|
||||
align-right
|
||||
:default-value="180"
|
||||
/>
|
||||
<wd-picker
|
||||
v-model="userinfo.weight"
|
||||
:columns="columnsWeight"
|
||||
label="体重"
|
||||
title="体重"
|
||||
align-right
|
||||
:default-value="60"
|
||||
/>
|
||||
<wd-picker
|
||||
v-model="userinfo.occ"
|
||||
:columns="columnsOcc"
|
||||
label="从事职业"
|
||||
title="从事职业"
|
||||
align-right
|
||||
/>
|
||||
</wd-cell-group>
|
||||
|
||||
<view class="ml-5 my-3">个人简介</view>
|
||||
<wd-cell-group>
|
||||
<wd-textarea v-model="userinfo.description" :maxlength="50" clearable show-word-limit />
|
||||
</wd-cell-group>
|
||||
<view class="ml-5 my-3">个人简介</view>
|
||||
<wd-cell-group>
|
||||
<wd-textarea v-model="userinfo.description" :maxlength="50" clearable show-word-limit />
|
||||
</wd-cell-group>
|
||||
</view>
|
||||
|
||||
<!-- <view class="mx-5 my-3 flex justify-between">
|
||||
<text>个人相册</text>
|
||||
@@ -147,8 +157,9 @@
|
||||
import SUploader from '@/sheep/components/s-uploader/s-uploader.vue';
|
||||
|
||||
onLoad(async () => {
|
||||
uni.showLoading({ title: '加载中...' });
|
||||
// 获取用户信息
|
||||
const { data } = await UserApi.getUserInfo();
|
||||
const { data } = await UserApi.getUserInfo().finally(() => uni.hideLoading());
|
||||
Object.assign(userinfo, data, {
|
||||
// photo: data.photo?.map((item: { address: string }) => item.address),
|
||||
});
|
||||
|
||||
@@ -10,32 +10,56 @@
|
||||
|
||||
<wd-tabs v-model="activeTab">
|
||||
<wd-tab title="我看过的">
|
||||
<view>1</view>
|
||||
<scroll-list
|
||||
style="height: calc(100dvh - 44px - 42px)"
|
||||
:loadMoreStatus="loadMoreStatus_seenIt"
|
||||
@refresh="refreshList_seenIt"
|
||||
@loadMore="listLoadMore_seenIt"
|
||||
>
|
||||
<moment-card v-if="listData_seenIt.length" v-for="item in 4" :data="item" />
|
||||
<wd-status-tip v-else image="content" tip="暂无内容" />
|
||||
</scroll-list>
|
||||
</wd-tab>
|
||||
|
||||
<wd-tab title="看过我的">
|
||||
<view>2</view>
|
||||
<scroll-list
|
||||
style="height: calc(100dvh - 44px - 42px)"
|
||||
:loadMoreStatus="loadMoreStatus_seenMe"
|
||||
@refresh="refreshList_seenMe"
|
||||
@loadMore="listLoadMore_seenMe"
|
||||
>
|
||||
<moment-card v-if="listData_seenMe.length" v-for="item in 4" :data="item" />
|
||||
<wd-status-tip v-else image="content" tip="暂无内容" />
|
||||
</scroll-list>
|
||||
</wd-tab>
|
||||
</wd-tabs>
|
||||
|
||||
<scroll-list style="height: calc(100dvh - 44px - 42px)" :loadMoreStatus="loadMoreStatus" @refresh="refreshList"
|
||||
@loadMore="listLoadMore">
|
||||
<moment-card v-if="listData.length" v-for="item in 4" :data="item" />
|
||||
<view v-else class="flex px-4 py-4" v-for="index in 4" :key="index">
|
||||
<wd-skeleton :row-col="[{ size: '50px', type: 'circle' }]" animation="flashed" />
|
||||
<wd-skeleton :custom-style="{ width: '100%', marginLeft: '12px' }" animation="flashed" theme="paragraph" />
|
||||
</view>
|
||||
</scroll-list>
|
||||
</wd-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import MomentCard from '@/sheep/components/moment-card/moment-card.vue';
|
||||
import ScrollList from '@/sheep/components/scroll-list/scroll-list.vue';
|
||||
import useScroll from '@/sheep/hooks/use-scroll';
|
||||
import RecentApi from '@/sheep/api/member/recent';
|
||||
import { ref, reactive } from 'vue';
|
||||
import MomentCard from '@/sheep/components/moment-card/moment-card.vue';
|
||||
import ScrollList from '@/sheep/components/scroll-list/scroll-list.vue';
|
||||
import useScroll from '@/sheep/hooks/use-scroll';
|
||||
import RecentApi from '@/sheep/api/member/recent';
|
||||
import { ref } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
|
||||
const activeTab = ref();
|
||||
const params = reactive({});
|
||||
const { listData, loadMoreStatus, refreshList, listLoadMore } = useScroll(RecentApi.xxx, params);
|
||||
const activeTab = ref();
|
||||
const {
|
||||
listData: listData_seenIt,
|
||||
loadMoreStatus: loadMoreStatus_seenIt,
|
||||
refreshList: refreshList_seenIt,
|
||||
listLoadMore: listLoadMore_seenIt,
|
||||
} = useScroll(RecentApi.getSeenIt);
|
||||
const {
|
||||
listData: listData_seenMe,
|
||||
loadMoreStatus: loadMoreStatus_seenMe,
|
||||
refreshList: refreshList_seenMe,
|
||||
listLoadMore: listLoadMore_seenMe,
|
||||
} = useScroll(RecentApi.getSeenMe);
|
||||
|
||||
onLoad(async () => {
|
||||
refreshList_seenIt();
|
||||
refreshList_seenMe();
|
||||
});
|
||||
</script>
|
||||
@@ -146,7 +146,8 @@ const RecentApi = {
|
||||
method: 'GET',
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
showLoading: true,
|
||||
loadingMsg: '加载中',
|
||||
},
|
||||
});
|
||||
},
|
||||
@@ -211,7 +212,7 @@ const RecentApi = {
|
||||
},
|
||||
// 添加朋友圈或用户详情页面的查看和访问记录
|
||||
createViewRecord: (data: {
|
||||
bizType: 'CLASSIFY' | 'RECENT';
|
||||
bizType: 'CLASSIFY' | 'RECENT' | 'USER';
|
||||
viewStartTime: string;
|
||||
viewEndTime: string;
|
||||
}) => {
|
||||
@@ -224,6 +225,30 @@ const RecentApi = {
|
||||
},
|
||||
});
|
||||
},
|
||||
// 查询我看过的
|
||||
getSeenIt: (data: any) => {
|
||||
return request({
|
||||
url: '/member/recent/look/it-page',
|
||||
method: 'POST',
|
||||
data,
|
||||
custom: {
|
||||
showLoading: true,
|
||||
loadingMsg: '加载中',
|
||||
},
|
||||
});
|
||||
},
|
||||
// 查询看过我的
|
||||
getSeenMe: (data: any) => {
|
||||
return request({
|
||||
url: '/member/recent/look/me-page',
|
||||
method: 'POST',
|
||||
data,
|
||||
custom: {
|
||||
showLoading: true,
|
||||
loadingMsg: '加载中',
|
||||
},
|
||||
});
|
||||
},
|
||||
// 获得用户协议或隐私政策文章
|
||||
getPromotionArticle: (params: any) => {
|
||||
return request({
|
||||
|
||||
@@ -56,16 +56,16 @@
|
||||
<text> {{ data.issueCity }} · {{ data.distance?.toFixed(2) || 0 }}km </text>
|
||||
</view>
|
||||
<view class="flex gap-60rpx pl-130rpx text-white">
|
||||
<view class="flex items-center gap-10rpx text-sm">
|
||||
<view v-if="props.showLike" class="flex items-center gap-10rpx text-sm">
|
||||
<uni-icons
|
||||
v-if="isLike || data.operationStatus?.isLike"
|
||||
v-if="isLike || data.recentOperationStatus?.isLike"
|
||||
type="heart-filled"
|
||||
size="22"
|
||||
color="#D29E52"
|
||||
@click="handleunLike"
|
||||
/>
|
||||
<uni-icons v-else type="heart" size="22" color="#B5B4BC" @click="handleLike" />
|
||||
<text>{{ data.operationTotal || 0 }} 喜欢</text>
|
||||
<text>{{ operationTotal?.recentLikeTotal || 0 }} 喜欢</text>
|
||||
</view>
|
||||
<view v-if="props.showChat" class="flex items-center gap-10rpx text-sm" @click="goChat">
|
||||
<uni-icons type="chat" size="22" color="#B5B4BC" />
|
||||
@@ -78,7 +78,7 @@
|
||||
<script setup lang="ts">
|
||||
// @ts-nocheck
|
||||
import RecentApi from '@/sheep/api/member/recent';
|
||||
import { computed, reactive, ref } from 'vue';
|
||||
import { computed, onMounted, reactive, ref } from 'vue';
|
||||
import { formatDate } from '@/sheep/util/index';
|
||||
import { getGender } from '@/sheep/util/index';
|
||||
import useConfigStore from '@/chat-store/configStore.js';
|
||||
@@ -89,9 +89,11 @@
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
data: any;
|
||||
showLike?: boolean;
|
||||
showChat?: boolean;
|
||||
}>(),
|
||||
{
|
||||
showLike: true,
|
||||
showChat: true,
|
||||
},
|
||||
);
|
||||
@@ -109,6 +111,11 @@
|
||||
// RECENT_SHIELD-朋友圈-屏蔽
|
||||
// RECENT_REPORT-朋友圈-举报
|
||||
});
|
||||
const operationTotal = ref({});
|
||||
|
||||
onMounted(() => {
|
||||
operationTotal.value = props.data.operationTotal;
|
||||
});
|
||||
|
||||
// 图片预览
|
||||
const previewImage = (img: string) => {
|
||||
@@ -121,8 +128,16 @@
|
||||
const handleLike = async () => {
|
||||
params.action = 'RECENT_LIKE';
|
||||
const { code } = await RecentApi.recentOperate(params);
|
||||
if (code === 0) {
|
||||
isLike.value = true;
|
||||
if (code !== 0) return;
|
||||
|
||||
isLike.value = true;
|
||||
if (
|
||||
operationTotal.value.recentLikeTotal === undefined ||
|
||||
operationTotal.value.recentLikeTotal === null
|
||||
) {
|
||||
operationTotal.value.recentLikeTotal = 1;
|
||||
} else {
|
||||
operationTotal.value.recentLikeTotal++;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view
|
||||
v-if="items.length"
|
||||
class="flex items-center relative mx-auto border-1 border-solid border-#666 bg-#333 rounded-full overflow-hidden p-1"
|
||||
:style="segmentedWidth"
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user