feat:修改bug

This commit is contained in:
dzc committed 2026-01-06 11:41:57 +08:00
1 parent a9d66d4f4a
commit afd84e06e7
12 files changed
+575 -665

No files matched your search

+5 -2
View File
@@ -50,7 +50,7 @@
<image class="size-44rpx" src="@/static/weixin-black.png" mode="aspectFill" />
</view>
<text class="text-color-theme text-xs">{{ user.member.wechatNum || '*************'
}}</text>
}}</text>
</view>
<view class="flex-col justify-center items-center m-t-15rpx text-color-theme text-xs">
<view>解锁微信只能展示24小时</view>
@@ -101,6 +101,8 @@ const userWechatInfo = reactive({
wechatQrCode: '',
});
const emit = defineEmits(['updateUser'])
onMounted(() => {
lookWechatCount()
})
@@ -137,7 +139,8 @@ const doSubmitUnlockWechat = async () => {
if (code === 0) {
uni.showToast({ title: '解锁成功', icon: 'none' });
Object.assign(userWechatInfo, data);
// getDetail()
lookWechatCount()
emit('updateUser')
}
} catch (error) {
console.log("|执行解锁微信|,意外的错误:error", error);
+78
View File
@@ -0,0 +1,78 @@
<template>
<wd-action-sheet v-model="actionShow" :actions="actions" @select="actionSelect" cancel-text="取消" :z-index="5000" />
</template>
<script setup lang="ts">
import { ref, computed } from 'vue';
import RecentApi from '@/sheep/api/member/recent';
const props = defineProps({
user: {
type: Object,
default: () => ({})
},
hides: {
/**
* user - 查看资料
* report - 举报
* shield - 拉黑
*/
type: Array,
default: () => []
}
})
const actions = computed(() => {
const { hides } = props;
let actions = [{ name: '查看资料', key: "user" }, { name: '拉黑', key: "shield" }, { name: '举报', key: "report" }];
if (hides.includes('user')) {
actions = actions.filter(item => item.key !== 'user');
}
if (hides.includes('report')) {
actions = actions.filter(item => item.key !== 'report');
}
if (hides.includes('shield')) {
actions = actions.filter(item => item.key !== 'shield');
}
return actions;
})
const actionShow = ref(false);
const openActionSheet = () => {
actionShow.value = true;
}
const closeActionSheet = () => {
actionShow.value = false;
}
// 拉黑 举报
async function actionSelect({ item, index }) {
console.log(item, "item");
const key = item.key
switch (key) {
case "user":
uni.navigateTo({ url: '/pages/home/detail?memberId=' + props.user.member.memberId });
break;
case "shield":
const { code } = await RecentApi.recentOperate({
memberId: props.user.member.memberId,
action: 'MEMBER_SHIELD',
});
if (code === 0) {
uni.showToast({ title: '拉黑成功', icon: 'none' });
}
break;
case "report":
uni.navigateTo({ url: '/pages/home/report?memberId=' + props.user.member.memberId });
}
}
defineExpose({
open: openActionSheet,
close: closeActionSheet
})
</script>
+14 -178
View File
@@ -16,7 +16,7 @@
{{ userDetail.member.memberCity ? userDetail.member.memberCity + ' · ' : '' }}
{{ userDetail.distance ? userDetail.distance.toFixed(2) + 'km' : '' }}
</view>
<uni-icons type="more-filled" size="28" color="#D29E52" @click="actionShow = true" />
<uni-icons type="more-filled" size="28" color="#D29E52" @click="userMoreRef.open" />
</view>
</template>
</wd-navbar>
@@ -29,10 +29,12 @@
<image class="text-center size-150rpx rounded-full bg-#333 mb-20rpx" :src="userDetail.member.memberAvatar"
mode="aspectFill" />
<view class="text-base mb-20rpx">{{ userDetail.member?.memberNickname }}</view>
<view v-for="(item, index) in userDetail.memberTagList" :key="index"
class="mb-20rpx inline-flex px-2 py-1 text-xs c-black rounded-1 bg-color-theme-dark">
<wd-icon name="discount-filled" size="16px" color="#000"></wd-icon>
<text>{{ item.tagTitle }}</text>
<view v-for="(item, index) in userDetail.memberTagList" :key="index">
<view v-if="['1'].includes(item.tagBizType)"
class="mb-20rpx inline-flex px-2 py-1 text-xs c-black rounded-1 bg-color-theme-dark">
<wd-icon name="discount-filled" size="16px" color="#000"></wd-icon>
<text>{{ item.tagTitle }}</text>
</view>
</view>
<view class="flex flex-wrap justify-center mb-20rpx">
@@ -62,29 +64,7 @@
</view>
<view class="m-4">
<view class="my-2 text-size-base">查看微信</view>
<view class="bg-color-theme rounded-1 flex justify-between items-center p-2">
<view class="flex-col">
<view class="flex items-center">
<image class="size-44rpx mr-2" src="@/static/weixin-black.png" mode="aspectFill" />
<text class="text-black">{{ userDetail.member.wechatNum || '*************' }}</text>
</view>
<view v-if="!userDetail?.userOperationStatus?.isLookWechat" class="text-xs c-black tracking-0.2">
<text>成为</text>
<text class="text-base font-bold font-italic"> VIP </text>
<text>免费解锁</text>
</view>
<view v-else>
<text class="text-black text-xs">已解锁对方微信</text>
</view>
</view>
<view v-if="!userDetail?.userOperationStatus?.isLookWechat" class="rounded-1 px-4 py-1 bg-#333 active:bg-#222"
@click="doWeChatBtn">
解锁
</view>
<view v-else class="rounded-1 px-4 py-1 bg-#333 active:bg-#222" @click="doWeChatBtn">
查看
</view>
</view>
<UserLookWechat :user="userDetail" @update-user="getDetail" />
</view>
<view class="m-4">
<view class="my-2 text-size-base">相册</view>
@@ -139,53 +119,7 @@
<text>喜欢</text>
</view>
</view>
<wd-action-sheet v-model="actionShow" :actions="[{ name: '拉黑' }, { name: '举报' }]" @select="actionSelect"
cancel-text="取消" :z-index="100" />
<wd-message-box selector="operateMessage" />
<wd-popup custom-class="custom-wechat-popup" :z-index="999" v-model="visibleWechat">
<view class="min-w-70vw w-full overflow-hidden p-y-50rpx">
<view v-if="!userDetail?.userOperationStatus?.isLookWechat" class="flex-col justify-center items-center">
<image class="size-150rpx bg-#333 rounded-full mr-1" :src="userDetail.member?.memberAvatar"
mode="aspectFill" />
<view class="inline-flex items-center justify-center bg-color-theme-dark m-t-30rpx p-x-10 p-y-1 rounded-full">
<image class="size-44rpx mr-2" src="@/static/weixin-black.png" mode="aspectFill" />
<text class="text-black text-xs">{{ userDetail.member.wechatNum || '*************' }}</text>
</view>
<view class="flex justify-center items-center m-t-30rpx text-color-theme">
<text class="iconfont icon-weixin" />
</view>
<text class="text-color-theme text-xs m-t-30rpx">今日vip特权已使用{{ lookWechatDetail.todayCount }}/{{
lookWechatDetail.todayCountTotal }}次</text>
<view class="m-t-30rpx p-x-10 p-y-1.5 bg-color-theme-dark text-xs rounded-full" @tap="doSubmitUnlockWechat">
<text class="text-black text-xs">使用VIP特权免费解锁</text>
</view>
</view>
<view class="flex-col justify-center items-center" v-else>
<view class="inline-flex items-center justify-center">
<view class="size-50rpx bg-color-theme-dark flex justify-center items-center mr-1 rounded-full">
<image class="size-44rpx" src="@/static/weixin-black.png" mode="aspectFill" />
</view>
<text class="text-color-theme text-xs">{{ userDetail.member.wechatNum || '*************' }}</text>
</view>
<view class="flex-col justify-center items-center m-t-15rpx text-color-theme text-xs">
<view>解锁微信只能展示24小时</view>
<view>添加备注"荷塘月色App"会快速通过哟</view>
</view>
<text class="text-color-theme text-xs m-t-30rpx">今日vip特权已使用{{ lookWechatDetail.todayCount }}/{{
lookWechatDetail.todayCountTotal }}次</text>
<view class="m-t-30rpx p-x-10 p-y-1.5 bg-color-theme-dark text-xs rounded-full" @tap="copyWechatNum">
复制微信号
</view>
<view class="m-t-30rpx text-xs" @tap="wechatJb">
<text>搜索不到微信?点击【</text>
<text class="underline underline-1 underline-solid">立即举报</text>
<text>】退还次数</text>
</view>
</view>
</view>
</wd-popup>
<UserMore ref="userMoreRef" :user="userDetail" :hides="['user']" />
</wd-config-provider>
</template>
@@ -195,6 +129,8 @@ import { ref, computed, getCurrentInstance, reactive, onMounted } 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 UserLookWechat from "@/pages/components/user-look-wechat.vue"
import UserMore from "@/pages/components/user-more.vue"
import RecentApi from '@/sheep/api/member/recent';
import { onHide, onUnload, onLoad } from '@dcloudio/uni-app';
import { getGender } from '@/sheep/util/index';
@@ -206,17 +142,16 @@ import request from '@/common/request';
import { formatDate } from '@/sheep/helper/utils';
import { useMessage } from '@/uni_modules/wot-design-uni';
const operateMessage = useMessage('operateMessage');
const userCity = computed(() => sheep.$store('user').userCity);
const userInfo = computed(() => sheep.$store('user').userInfo);
const userMoreRef = ref(null)
const scrollTop = ref(0);
// 用户详情
const userDetail = ref<any>({});
// 解锁微信次数
const lookWechatDetail = ref<any>({});
const actionShow = ref(false);
const visibleWechat = ref(false)
// 朋友圈列表参数
const params = reactive({
@@ -239,11 +174,7 @@ const viewRecord = reactive({
viewStartTime: new Date().getTime(),
viewEndTime: '',
});
// 用户微信信息
const userWechatInfo = reactive({
wechatNum: '',
wechatQrCode: '',
});
const photoListUrls = computed(
() =>
@@ -258,24 +189,14 @@ onLoad(async (options: any) => {
params.memberId = memberId;
viewRecord.bizId = memberId;
await getDetail();
await lookWechatCount()
});
// 获取用户详情
const getDetail = async () => {
const { data = null } = await RecentApi.getRecentDetail({ id: params.memberId });
userDetail.value = data ?? {};
if (data.member && data.member.wechatNum) {
userWechatInfo.wechatNum = data.member.wechatNum;
}
};
// 查询解锁微信次数
const lookWechatCount = async () => {
const { data = null } = await RecentApi.lookWechatCount();
lookWechatDetail.value = data ?? {};
}
onMounted(() => {
refreshList();
});
@@ -314,58 +235,6 @@ function onScroll(e: any) {
scrollTop.value = e.detail.scrollTop;
}
// 解锁微信
const doWeChatBtn = async () => {
if (!params.memberId) return uni.showToast({ title: '用户id不存在', icon: 'none' });
const vip = userInfo.value?.memberVip.vip;
// 如果不是vip
if (!vip) {
operateMessage
.confirm({
title: '获取VIP特权',
msg: '请先开通VIP会员',
confirmButtonText: '获取会员',
zIndex: 9999,
})
.then(() => {
uni.navigateTo({
url: '/pages/profile/apply-vip',
});
})
.catch(() => { });
return;
}
visibleWechat.value = true
};
// 执行解锁微信
const doSubmitUnlockWechat = async () => {
try {
const { code, data } = await RecentApi.unlockWeChat({ memberId: params.memberId });
if (code === 0) {
uni.showToast({ title: '解锁成功', icon: 'none' });
Object.assign(userWechatInfo, data);
getDetail()
}
} catch (error) {
console.log("|执行解锁微信|,意外的错误:error", error);
}
}
// 复制微信号
const copyWechatNum = () => {
console.log("userWechatInfo:", userWechatInfo);
uni.setClipboardData({
data: userWechatInfo.wechatNum,
showToast: false,
success: () => {
uni.showToast({ title: '微信号已复制', icon: 'success' });
visibleWechat.value = false
},
});
};
// 相册预览
const previewPhoto = (current: number) => {
uni.previewImage({
@@ -375,22 +244,6 @@ const previewPhoto = (current: number) => {
});
};
// 找不到微信举报
const wechatJb = async () => {
try {
const { code, data, msg } = await RecentApi.createWecahtErrorAuth({
memberId: params.memberId
})
if (code != 0) {
uni.showToast({ title: msg ?? '举报失败', icon: "none" });
return
}
uni.showToast({ title: '举报成功', icon: "success" });
} catch (error) {
console.log("|找不到微信举报|,意外的错误:error", error);
}
}
// 私聊
const goChat = async () => {
if (!userDetail.value.memberId) return uni.showToast({ title: '用户不存在' });
@@ -440,23 +293,6 @@ const goChat = async () => {
});
};
// 拉黑 举报
async function actionSelect({ item, index }) {
switch (index) {
case 0:
const { code } = await RecentApi.recentOperate({
memberId: userDetail.value.member.memberId,
action: 'MEMBER_SHIELD',
});
if (code === 0) {
uni.showToast({ title: '拉黑成功', icon: 'none' });
}
break;
case 1:
uni.navigateTo({ url: '/pages/home/report?memberId=' + userDetail.value.member.memberId });
}
}
// 喜欢
const handleLike = async () => {
const { code } = await RecentApi.recentOperate({
+43 -9
View File
@@ -1,25 +1,35 @@
<template>
<view class="chat-box" id="chatBox">
<wd-config-provider theme="dark">
<wd-navbar :title="title" fixed safeAreaInsetTop :bordered="false">
<wd-navbar fixed safeAreaInsetTop :bordered="false">
<template #left>
<navigator open-type="navigateBack" hover-class="navigator-hover">
<uni-icons type="back" size="30" color="#D29E52"></uni-icons>
</navigator>
<view class="flex items-center" :style="navUserInfoStyle">
<image class="size-70rpx bg-#333 rounded-full mr-1" :src="avatar" mode="aspectFill" />
<text class="truncate text-sm">{{ title }}</text>
</view>
</template>
<template #right>
<uni-icons type="more-filled" color="#D29E52" size="24" @click="onShowMore" />
<view v-if="!isSystemUser">
<!-- <uni-icons type="more-filled" color="#D29E52" size="24" @click="onShowMore" /> -->
<uni-icons type="more-filled" size="28" color="#D29E52" @click="doUserMoreAction" />
</view>
</template>
</wd-navbar>
</wd-config-provider>
<view class="chat-main-box" :style="{ height: chatMainHeight + 'px' }">
<wd-config-provider theme="dark">
<userMore :user="recentUserInfo" ref="userMoreRef" />
</wd-config-provider>
<WarningCar />
<view class="chat-message" @click="switchChatTabBox('none')">
<scroll-view class="scroll-box" scroll-y="true" upper-threshold="200" @scrolltoupper="onScrollToTop"
@scroll="onScroll" :scroll-into-view="'chat-item-' + scrollMsgIdx" :scroll-top="scrollTop">
<UserInfoCar :user="recentUserInfo" />
<UserInfoCar v-if="!isSystemUser" :user="recentUserInfo" @update-user="getDetail" />
<view v-if="chat" class="chat-wrap">
<view v-for="(msgInfo, idx) in chat.messages" :key="idx">
<chat-message-item :ref="'message' + msgInfo.id" v-if="idx >= showMinIdx" :headImage="headImage(msgInfo)"
@@ -174,11 +184,13 @@ import sheep from '@/sheep';
import WarningCar from "./components/warning-car.vue"
import UserInfoCar from "./components/user-info-car.vue"
import userMore from '../components/user-more.vue';
export default {
components: {
WarningCar,
UserInfoCar
UserInfoCar,
userMore,
},
data() {
return {
@@ -211,6 +223,7 @@ export default {
scrollViewHeight: 0, // 滚动条总长度
maxTmpId: 0, // 最后生成的临时id
userMoreRef: null, // 右上角操作
userId: null,
recentUserInfo: null,
giftShow: false, // 礼物弹窗显示
@@ -218,6 +231,9 @@ export default {
};
},
methods: {
doUserMoreAction() {
this.$refs.userMoreRef.open();
},
onRecorderInput() {
this.showRecord = true;
this.switchChatTabBox('none');
@@ -1101,8 +1117,10 @@ export default {
},
// 获取用户详情
async getDetail() {
const { data = null } = await RecentApi.getRecentDetail({ id: this.userId });
this.recentUserInfo = data ?? {};
if (!this.isSystemUser) {
const { data = null } = await RecentApi.getRecentDetail({ id: this.userId });
this.recentUserInfo = data ?? {};
}
},
// 赠送礼物
giveGift(item) {
@@ -1160,6 +1178,20 @@ export default {
},
},
computed: {
// 是否为`消息通知`用户
isMessageUser() {
if (!this.userId) return false
return this.userId == -100
},
// 是否为`客服`用户
isServiceUser() {
if (!this.userId) return false
return this.userId == -200
},
// 是否为`系统`用户
isSystemUser() {
return this.isMessageUser || this.isServiceUser
},
mine() {
return this.userStore.userInfo;
},
@@ -1167,9 +1199,7 @@ export default {
return this.friendStore.findFriend(this.userInfo.id);
},
title() {
if (!this.chat) {
return '';
}
if (!this.chat) return '';
let title = this.chat.showName;
if (this.isGroup) {
let size = this.groupMembers.filter((m) => !m.quit).length;
@@ -1177,6 +1207,10 @@ export default {
}
return title;
},
avatar() {
if (!this.chat) return '';
return this.chat.headImage;
},
messageAction() {
return `/message/${this.chat.type.toLowerCase()}/send`;
},
+16 -2
View File
@@ -19,10 +19,14 @@
</view>
<view class="flex items-center">
<text class="iconfont icon-anquan color-#D29E52 w-40rpx"></text>
<view class="flex justify-center items-center bg-blue color-black rounded-full p-x-1 m-l-5rpx">
<view v-if="truePersonAuth"
class="flex justify-center items-center bg-blue color-black rounded-full p-x-1 m-l-5rpx">
<text class="iconfont icon-a-ziyuan592 font-size-20rpx"></text>
<text class="font-size-16rpx m-l-5rpx">已认证</text>
</view>
<view v-else class="flex justify-center items-center bg-red color-black rounded-full p-x-1 m-l-5rpx">
<text class="font-size-16rpx m-l-5rpx">未认证</text>
</view>
</view>
<view v-if="photoListUrls.length" class="flex items-start m-t-5rpx">
<text class="iconfont icon-tupian color-#D29E52 w-40rpx"></text>
@@ -37,7 +41,7 @@
</view>
</view>
<view class="m-t-20rpx">
<UserLookWechat :user="user" />
<UserLookWechat :user="user" @update-user="updateUser" />
</view>
</view>
</template>
@@ -47,6 +51,8 @@ import { computed } from 'vue';
import UserLookWechat from '@/pages/components/user-look-wechat.vue'
const emit = defineEmits(['updateUser'])
const props = defineProps({
user: {
type: Object,
@@ -54,6 +60,10 @@ const props = defineProps({
}
})
const truePersonAuth = computed(() => {
return props.user?.memberTagList?.some((i) => i.tagBizType === '1') ?? false
})
const photoListUrls = computed(
() =>
props.user?.memberPhotoList
@@ -70,6 +80,10 @@ const previewPhoto = (current: number) => {
});
};
const updateUser = () => {
emit('updateUser')
}
</script>
<style lang="scss" scoped>
+117 -139
View File
@@ -1,48 +1,26 @@
<template>
<scroll-list
class="h-full"
:loadMoreStatus="loadMoreStatus"
@refresh="refreshList"
@loadMore="listLoadMore"
:scroll-top="scrollTop"
>
<scroll-list class="h-full" :loadMoreStatus="loadMoreStatus" @refresh="refreshList" @loadMore="listLoadMore"
:scroll-top="scrollTop">
<view v-if="isRefreshing" class="py-2 px-4" v-for="index in 4" :key="index">
<view class="flex">
<wd-skeleton :row-col="[{ size: '100px', type: 'rect' }]" animation="gradient" />
<wd-skeleton
:custom-style="{ width: '100%', marginLeft: '12px' }"
:row-col="[{ width: '100%' }, { width: '100%' }]"
animation="gradient"
/>
<wd-skeleton :custom-style="{ width: '100%', marginLeft: '12px' }"
:row-col="[{ width: '100%' }, { width: '100%' }]" animation="gradient" />
</view>
<view class="flex -mt-50px">
<wd-skeleton :row-col="[{ size: '100px', type: 'rect' }]" animation="gradient" />
<wd-skeleton
:custom-style="{ width: '100%', marginLeft: '12px' }"
:row-col="[{ width: '100%' }, { width: '50%' }]"
animation="gradient"
/>
<wd-skeleton :custom-style="{ width: '100%', marginLeft: '12px' }"
:row-col="[{ width: '100%' }, { width: '50%' }]" animation="gradient" />
</view>
</view>
<user-card
v-else-if="listData.length"
v-for="user in listData"
:key="user.id"
:data="user"
:backdropFilter="backdropFilter"
@click="detail(user)"
/>
<user-card v-else-if="listData.length" v-for="user in listData" :key="user.id" :data="user"
:backdropFilter="backdropFilter" @click="detail(user)" />
<wd-status-tip v-else image="content" tip="暂无内容" />
</scroll-list>
<wd-config-provider theme="dark">
<wd-message-box />
<wd-popup
v-model="authShow"
custom-style="border-radius:32rpx;"
closable
:safe-area-inset-bottom="true"
>
<wd-popup v-model="authShow" custom-style="border-radius:32rpx;" closable :safe-area-inset-bottom="true">
<view class="w-80vw py-3 text-center">
<view class="text-lg text-color-theme">魅力女生认证</view>
<image class="size-400rpx" src="@/static/auth-message-box-bg.png" mode="aspectFill" />
@@ -70,127 +48,127 @@
</template>
<script setup lang="ts">
import { computed, onMounted, reactive, ref, watch } from 'vue';
// @ts-ignore
import sheep from '@/sheep';
import ScrollList from '@/sheep/components/scroll-list/scroll-list.vue';
import UserCard from '@/sheep/components/user-card/user-card.vue';
import useScroll from '@/sheep/hooks/use-scroll';
import RecentApi from '@/sheep/api/member/recent';
import { useMessage } from '@/uni_modules/wot-design-uni';
import { computed, onMounted, reactive, ref, watch } from 'vue';
// @ts-ignore
import sheep from '@/sheep';
import ScrollList from '@/sheep/components/scroll-list/scroll-list.vue';
import UserCard from '@/sheep/components/user-card/user-card.vue';
import useScroll from '@/sheep/hooks/use-scroll';
import RecentApi from '@/sheep/api/member/recent';
import { useMessage } from '@/uni_modules/wot-design-uni';
const message = useMessage();
const message = useMessage();
const props = defineProps<{
scene: string;
}>();
const props = defineProps<{
scene: string;
}>();
const userCity = computed(() => sheep.$store('user').userCity);
const userInfo = computed(() => sheep.$store('user').userInfo);
const backdropFilter = computed(() => {
const vip = userInfo.value?.memberVip.vip;
return (props.scene === 'SQUARE_NEW_PERSON' || props.scene === 'SQUARE_FEMALE') && !vip;
const userCity = computed(() => sheep.$store('user').userCity);
const userInfo = computed(() => sheep.$store('user').userInfo);
const backdropFilter = computed(() => {
const vip = userInfo.value?.memberVip.vip;
return (props.scene === 'SQUARE_NEW_PERSON' || props.scene === 'SQUARE_FEMALE') && !vip;
});
const scrollTop = ref(1);
const authShow = ref(false);
const params = reactive({
scene: props.scene,
province: '',
city: userCity.value.t,
memberId: '',
});
const { isRefreshing, listData, loadMoreStatus, refreshList, listLoadMore } = useScroll(
RecentApi.quickPage,
params,
);
onMounted(() => {
refreshList();
});
watch(
() => userCity.value,
async (city) => {
params.city = city.t;
await refreshList();
scrollTop.value = 0;
},
);
const goAuth = () => {
uni.navigateTo({
url: '/pages/profile/verify-status',
});
};
const scrollTop = ref(1);
const authShow = ref(false);
const params = reactive({
scene: props.scene,
province: '',
city: userCity.value.t,
memberId: '',
});
const { isRefreshing, listData, loadMoreStatus, refreshList, listLoadMore } = useScroll(
RecentApi.quickPage,
params,
);
// 判断查看用户详情时有无权限
const judgeGetByUserRole = async (user: any) => {
const { code } = await RecentApi.judgeGetByUserRole({ id: user.memberId });
if (code === 2001000007) {
authShow.value = true;
return;
}
onMounted(() => {
refreshList();
});
if (code === 2001000008) {
message
.confirm({
title: '获取VIP特权',
msg: '请先开通VIP会员',
confirmButtonText: '获取会员',
zIndex: 9999,
})
.then(() => {
uni.navigateTo({
url: '/pages/profile/apply-vip',
});
});
return;
}
watch(
() => userCity.value,
async (city) => {
params.city = city.t;
await refreshList();
scrollTop.value = 0;
uni.navigateTo({
url: `/pages/home/detail?memberId=${user.memberId}`,
success: function (res) {
res.eventChannel.emit('viewRecordType', 'USER');
},
);
});
};
const goAuth = () => {
uni.navigateTo({
url: '/pages/profile/verify-status',
});
};
// 判断查看用户详情时有无权限
const judgeGetByUserRole = async (user: any) => {
const { code } = await RecentApi.judgeGetByUserRole({ id: user.memberId });
if (code === 2001000007) {
authShow.value = true;
return;
}
if (code === 2001000008) {
message
.confirm({
title: '获取VIP特权',
msg: '请先开通VIP会员',
confirmButtonText: '获取会员',
zIndex: 9999,
})
.then(() => {
uni.navigateTo({
url: '/pages/profile/apply-vip',
});
const detail = async (user: any) => {
// 如果男生 查看‘新人’分类-SQUARE_NEW_PERSON 且 未开通会员
if (props.scene === 'SQUARE_NEW_PERSON' && backdropFilter.value) {
message
.confirm({
title: '获取VIP特权',
msg: '请先开通VIP会员',
confirmButtonText: '获取会员',
zIndex: 9999,
})
.then(() => {
uni.navigateTo({
url: '/pages/profile/apply-vip',
});
return;
}
});
return;
}
uni.navigateTo({
url: `/pages/home/detail?memberId=${user.memberId}`,
success: function (res) {
res.eventChannel.emit('viewRecordType', 'USER');
},
});
};
// 如果女生 查看‘vip男士’分类-SQUARE_VIP_MALE 或 ‘女生’分类-SQUARE_FEMALE
if (props.scene === 'SQUARE_VIP_MALE' || props.scene === 'SQUARE_FEMALE') {
await judgeGetByUserRole(user);
return;
}
const detail = async (user: any) => {
// 如果男生 查看‘新人’分类-SQUARE_NEW_PERSON 且 未开通会员
if (props.scene === 'SQUARE_NEW_PERSON' && backdropFilter.value) {
message
.confirm({
title: '获取VIP特权',
msg: '请先开通VIP会员',
confirmButtonText: '获取会员',
zIndex: 9999,
})
.then(() => {
uni.navigateTo({
url: '/pages/profile/apply-vip',
});
});
return;
}
// 如果女生 查看‘vip男士’分类-SQUARE_VIP_MALE 或 ‘女生’分类-SQUARE_FEMALE
if (props.scene === 'SQUARE_VIP_MALE' || props.scene === 'SQUARE_FEMALE') {
await judgeGetByUserRole(user);
return;
}
uni.navigateTo({
url: `/pages/home/detail?memberId=${user.memberId}`,
success: function (res) {
res.eventChannel.emit('viewRecordType', 'USER');
},
});
};
uni.navigateTo({
url: `/pages/home/detail?memberId=${user.memberId}`,
success: function (res) {
res.eventChannel.emit('viewRecordType', 'USER');
},
});
};
</script>
<style>
.icon-bg-clip {
clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
}
.icon-bg-clip {
clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
}
</style>
+3 -3
View File
@@ -36,9 +36,9 @@
<scroll-view class="scroll-bar" v-else scroll-with-animation="true" scroll-y="true">
<view v-for="(chat, index) in chatStore.chats" :key="index">
<long-press-menu v-if="isShowChat(chat)" :items="menu.items" @select="onSelectMenu($event, index)">
<chat-item :chat="chat" :index="index" :active="menu.chatIdx == index"></chat-item>
</long-press-menu>
<!-- <long-press-menu v-if="isShowChat(chat)" :items="menu.items" @select="onSelectMenu($event, index)"> -->
<chat-item :user-id="chat.targetId" :chat="chat" :index="index" :active="menu.chatIdx == index"></chat-item>
<!-- </long-press-menu> -->
</view>
</scroll-view>
</wd-config-provider>