|
@@ -27,10 +27,6 @@
|
|
|
<text class="user-detail" v-if="user.location && user.location !== '未填写'">{{ user.location }}</text>
|
|
<text class="user-detail" v-if="user.location && user.location !== '未填写'">{{ user.location }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="online-status" :class="{ online: user.isOnline }">
|
|
|
|
|
- <text class="status-dot"></text>
|
|
|
|
|
- <text class="status-text">{{ user.isOnline ? '在线' : '离线' }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="card-content">
|
|
<view class="card-content">
|
|
@@ -64,10 +60,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="card-actions">
|
|
<view class="card-actions">
|
|
|
- <view class="action-btn pass-btn" @click="handlePass(user, index)">
|
|
|
|
|
- <text class="action-icon">👎</text>
|
|
|
|
|
- <text class="action-text">不感兴趣</text>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+<!-- <view class="action-btn pass-btn" @click="handlePass(user, index)">-->
|
|
|
|
|
+<!-- <text class="action-icon">👎</text>-->
|
|
|
|
|
+<!-- <text class="action-text">不感兴趣</text>-->
|
|
|
|
|
+<!-- </view>-->
|
|
|
<view class="action-btn like-btn" @click="handleLike(user, index)">
|
|
<view class="action-btn like-btn" @click="handleLike(user, index)">
|
|
|
<text class="action-icon">❤️</text>
|
|
<text class="action-icon">❤️</text>
|
|
|
<text class="action-text">喜欢</text>
|
|
<text class="action-text">喜欢</text>
|
|
@@ -200,8 +196,7 @@
|
|
|
hobbies: this.parseHobbies(u.hobby),
|
|
hobbies: this.parseHobbies(u.hobby),
|
|
|
introduction: u.introduction || u.selfIntro || '',
|
|
introduction: u.introduction || u.selfIntro || '',
|
|
|
isVip: u.isVip || false,
|
|
isVip: u.isVip || false,
|
|
|
- isOnline: u.isOnline || false,
|
|
|
|
|
- compatibilityScore: u.compatibilityScore || 0
|
|
|
|
|
|
|
+ compatibilityScore: u.compatibilityScore || 0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -260,7 +255,7 @@
|
|
|
const i = c.indexOf('http')
|
|
const i = c.indexOf('http')
|
|
|
if (i > 0) c = c.slice(i)
|
|
if (i > 0) c = c.slice(i)
|
|
|
if (!c) return DEFAULT_IMAGES.avatar
|
|
if (!c) return DEFAULT_IMAGES.avatar
|
|
|
- if (c.startsWith('/')) return `http://115.190.125.125:9000${c}`
|
|
|
|
|
|
|
+ if (c.startsWith('/')) return `https://api.zhongruanke.cn/minio/${c}`
|
|
|
if (c.startsWith('http://') || c.startsWith('https://')) return c
|
|
if (c.startsWith('http://') || c.startsWith('https://')) return c
|
|
|
return DEFAULT_IMAGES.avatar
|
|
return DEFAULT_IMAGES.avatar
|
|
|
},
|
|
},
|
|
@@ -272,34 +267,34 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 处理不感兴趣
|
|
// 处理不感兴趣
|
|
|
- async handlePass(user, index) {
|
|
|
|
|
- uni.showModal({
|
|
|
|
|
- title: '确认操作',
|
|
|
|
|
- content: `确定对${user.nickname}不感兴趣吗?`,
|
|
|
|
|
- success: async (res) => {
|
|
|
|
|
- if (res.confirm) {
|
|
|
|
|
- try {
|
|
|
|
|
- await api.recommend.feedback({
|
|
|
|
|
- userId: this.currentUserId,
|
|
|
|
|
- targetUserId: user.userId || user.id,
|
|
|
|
|
- type: 'dislike'
|
|
|
|
|
- })
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '已记录您的偏好',
|
|
|
|
|
- icon: 'success'
|
|
|
|
|
- })
|
|
|
|
|
- this.recommendUsers.splice(index, 1)
|
|
|
|
|
- } catch (e) {
|
|
|
|
|
- console.error('失败:', e)
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '操作失败,请重试',
|
|
|
|
|
- icon: 'none'
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // async handlePass(user, index) {
|
|
|
|
|
+ // uni.showModal({
|
|
|
|
|
+ // title: '确认操作',
|
|
|
|
|
+ // content: `确定对${user.nickname}不感兴趣吗?`,
|
|
|
|
|
+ // success: async (res) => {
|
|
|
|
|
+ // if (res.confirm) {
|
|
|
|
|
+ // try {
|
|
|
|
|
+ // await api.recommend.feedback({
|
|
|
|
|
+ // userId: this.currentUserId,
|
|
|
|
|
+ // targetUserId: user.userId || user.id,
|
|
|
|
|
+ // type: 'dislike'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title: '已记录您的偏好',
|
|
|
|
|
+ // icon: 'success'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // this.recommendUsers.splice(index, 1)
|
|
|
|
|
+ // } catch (e) {
|
|
|
|
|
+ // console.error('失败:', e)
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title: '操作失败,请重试',
|
|
|
|
|
+ // icon: 'none'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // },
|
|
|
|
|
|
|
|
// 处理喜欢
|
|
// 处理喜欢
|
|
|
async handleLike(user, index) {
|
|
async handleLike(user, index) {
|