update 用户跳转聊天
This commit is contained in:
parent
f9337ceb25
commit
aff15a3b47
@ -182,6 +182,7 @@ subPackages: [
|
||||
'friendRequest',
|
||||
'groupChitchat',
|
||||
'groupChitchatDetail',
|
||||
'newsSearch',
|
||||
'review',
|
||||
'systemNews',
|
||||
'visitor',
|
||||
|
||||
@ -537,7 +537,7 @@ page {
|
||||
<image src="https://images.ufutx.com/202101/30/e3a22a60849c3910e680d932772432b4.png" v-if="userInfo.base_profile.is_rank" mode="widthFix" class="VIPIcon"></image>
|
||||
<image src="https://images.ufutx.com/202101/30/004a146ad71658aaa2ad0f0263f960b8.png" mode="widthFix" v-else class="VIPIcon"></image>
|
||||
</view>
|
||||
<image :src="userInfo.base_profile.photo" class="_photo flo_r" mode="aspectFill"></image>
|
||||
<image :src="userInfo.base_profile.photo" class="_photo flo_r" mode="aspectFill" @tap="$previewImage(userInfo.base_profile.photo)"></image>
|
||||
<view class="clearfloat"></view>
|
||||
<view class="ui-sex-box">
|
||||
<view class="sexBox">{{userInfo.base_profile.fans_count}} 粉丝</view>
|
||||
@ -596,6 +596,19 @@ page {
|
||||
</view>
|
||||
<view class="font_26 color333 _text">{{ userInfo.other_profile.interest_hobby || 'ta什么也没有留下' }}</view>
|
||||
</view>
|
||||
<!-- 兴趣标签 -->
|
||||
<view class="font_26 color666 ui-pt-20">
|
||||
<view class="_title">
|
||||
<image src="https://images.ufutx.com/202011/26/7645858a1ae55dd7c3ef90ec7a42bfa3.png" mode="aspectFill" class="icon"></image>
|
||||
<span class="font_30 bold color333">兴趣标签</span>
|
||||
</view>
|
||||
<view class="m_idCon f-fc">
|
||||
<block v-for="(item,index) in interestLabel" :key="index">
|
||||
<view class="u_idCon font_26 color333" v-if="item">{{ item }}</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="font_26 color333 _text">{{ userInfo.other_profile.interest_hobby || 'ta什么也没有留下' }}</view>
|
||||
</view>
|
||||
<!-- 期望对方 -->
|
||||
<view class="font_26 color666 ui-pt-20">
|
||||
<view class="_title">
|
||||
@ -1027,7 +1040,7 @@ wepy.page({
|
||||
return
|
||||
}
|
||||
vm.$showLoading('')
|
||||
vm.$post({url: `${service.host}/follow/users/119488`}).then(({code, data}) => {
|
||||
vm.$post({url: `${service.host}/follow/users/${vm.id}`}).then(({code, data}) => {
|
||||
if (code == 0) {
|
||||
if (data.is_followed) {
|
||||
vm.$showToast(`已关注`)
|
||||
@ -1233,7 +1246,7 @@ wepy.page({
|
||||
return
|
||||
}
|
||||
if (type == 'chitchat') {
|
||||
wx.navigateTo({url: `/pages/news/groupChitchat?id=${vm.userInfo.id}&name=${encodeURIComponent(vm.userInfo.nickname)}&pic=${vm.userInfo.photo}&type=${vm.userInfo.type}`})
|
||||
wx.navigateTo({url: `/pages/news/chitchat?id=${vm.id}&name=${encodeURIComponent(vm.userInfo.base_profile.nickname)}&pic=${vm.userInfo.base_profile.photo}&type=${vm.userInfo.base_profile.type}&real=${vm.userInfo.approve_profile.is_real_approved}`})
|
||||
} else if (type == 'vip' && !vm.isIos) {
|
||||
wx.navigateTo({url: `/pages/users/upgradeVIP`})
|
||||
}
|
||||
|
||||
@ -708,6 +708,7 @@ wepy.page({
|
||||
otherUserId: '',
|
||||
otherUserType: '',
|
||||
otherUserName: '',
|
||||
otherUserReal: 0, // 对方是否真人认证
|
||||
|
||||
chatInfoData: {},
|
||||
reportShow: false, // 举报
|
||||
@ -1532,6 +1533,7 @@ wepy.page({
|
||||
vm.otherAvatar = e.pic
|
||||
vm.otherUserId = e.id
|
||||
vm.otherUserType = e.type
|
||||
vm.otherUserReal = e.real
|
||||
vm.otherUserName = decodeURIComponent(e.name)
|
||||
// 获取表情包数据
|
||||
vm.emojiList = vm.emojiCts()
|
||||
|
||||
@ -494,6 +494,7 @@ wepy.page({
|
||||
msg: '',
|
||||
sex: '',
|
||||
id: '',
|
||||
real: 0,
|
||||
userId: '',
|
||||
userType: '',
|
||||
approveTips: false,
|
||||
@ -602,7 +603,7 @@ wepy.page({
|
||||
if (code == 0) {
|
||||
if (e) {
|
||||
vm.$showToast('已添加为好友')
|
||||
let url = `/pages/news/chitchat?id=${vm.userId}&name=${encodeURIComponent(vm.name)}&type=${vm.userType}&icon=${vm.pic}`
|
||||
let url = `/pages/news/chitchat?id=${vm.userId}&name=${encodeURIComponent(vm.name)}&type=${vm.userType}&pic=${vm.pic}&real=${vm.real}`
|
||||
wx.redirectTo({url: url})
|
||||
} else {
|
||||
vm.$showToast('已拒绝')
|
||||
@ -674,6 +675,7 @@ wepy.page({
|
||||
// 好友申请获取申请用户数据
|
||||
vm.msg = e.message
|
||||
vm.id = e.id
|
||||
vm.real = e.user.is_real_approved
|
||||
vm.name = e.user.nickname
|
||||
vm.sex = e.user.sex
|
||||
vm.userId = e.user.id
|
||||
|
||||
@ -4,9 +4,162 @@ page {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.m_search {
|
||||
width: 446rpx;
|
||||
height: 64rpx;
|
||||
background-color: #f8f8f8;
|
||||
border-radius: 100rpx;
|
||||
padding: 0 22rpx;
|
||||
margin-left: 30rpx;
|
||||
|
||||
.m_search_icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.ui-close-search-icon{
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.ui-container{
|
||||
.ui-no-data-box {
|
||||
text-align: center;
|
||||
.ui-no-data-icon {
|
||||
width: 440rpx;
|
||||
height: 300rpx;
|
||||
margin: 200rpx auto -40rpx auto;
|
||||
}
|
||||
}
|
||||
|
||||
.ui-touch-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
padding: 24rpx 0 24rpx 30rpx;
|
||||
}
|
||||
|
||||
.ui-content {
|
||||
width: 100%;
|
||||
margin-right: 0;
|
||||
-webkit-transition: all 0.4s;
|
||||
transition: all 0.4s;
|
||||
-webkit-transform: translateX(90px);
|
||||
transform: translateX(90px);
|
||||
margin-left: -90px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
.ui-messageBox {
|
||||
margin-top: 2rpx;
|
||||
margin-left: 16rpx;
|
||||
|
||||
.ui-is-top{
|
||||
margin-left: 16rpx;
|
||||
padding-left: 8rpx;
|
||||
width: 76rpx;
|
||||
height: 32rpx;
|
||||
background: linear-gradient(90deg, #FFD18D 0%, #FFA564 100%);
|
||||
border-radius: 8rpx;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.ui-name {
|
||||
width: 400rpx;
|
||||
}
|
||||
|
||||
.ui-message {
|
||||
width: 524rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.ui-unreadBox {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 0;
|
||||
overflow: hidden;
|
||||
|
||||
.ui-lastTime {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.ui-no-disturbing {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.ui-unreadNum, .ui-unreadNum_1 {
|
||||
float: right;
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
font-size: 20rpx;
|
||||
background: #f1013D;
|
||||
color: #fff;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.ui-unreadNum_1 {
|
||||
width: 44rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<template>
|
||||
<view class="ui-newsSearch"></view>
|
||||
<view class="cu-custom">
|
||||
<view class="cu-bar fixed" :style="{height: CustomBar + 'px', paddingTop: StatusBar + 'px', background: bgColor, zIndex: 999}">
|
||||
<view class="m_search f-fcl ui-relative">
|
||||
<image class="m_search_icon" src="https://images.ufutx.com/202106/19/c607aaf49440b0df3308d6e048fd9ad7.png" mode="aspectFit" lazy-load="false"></image>
|
||||
<image v-if="inputVal" class="ui-close-search-icon" src="https://image.fulllinkai.com/202307/04/a7f548083c45667843828e7fccef7d8c.png" mode="widthFix" @tap="inputVal = ''"></image>
|
||||
<input v-model="inputVal" type="text" placeholder="搜索昵称">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view :style="{height: navHeight + 'px'}"></view>
|
||||
<view class="ui-newsSearch">
|
||||
<view class="ui-container">
|
||||
<view class="ui-no-data-box" v-if="!inputVal || list.length == 0">
|
||||
<image class="ui-no-data-icon" src="https://image.fulllinkai.com/202410/08/762f5700a058319cefd3e479f9c3a302.png" mode="widthFix"></image>
|
||||
<view class="font_32 color999">暂无搜索结果</view>
|
||||
</view>
|
||||
<block v-else>
|
||||
<view class="ui-touch-item" v-for="(item,index) in list" :key="index" @tap="jumpChatPath(item, 'chat')">
|
||||
<view class="ui-content">
|
||||
<image class="cu-avatar round lg flo_l" :src="item.icon" mode="aspectFit" @tap.stop="jumpChatPath(item, 'user')"></image>
|
||||
<view class="ui-messageBox flo_l">
|
||||
<view class="font_30 color333 ui-name ellipsis_1 f-fcl">
|
||||
{{item.title}}
|
||||
<view v-if="item.is_top == 1" class="ui-is-top font_20 white">已置顶</view>
|
||||
</view>
|
||||
<view class="ui-message ellipsis_1 font_24 color666">
|
||||
<span v-if="item.at_show" class="red">[有人@你]</span>
|
||||
{{item.content}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="ui-unreadBox color999 text-right">
|
||||
<view class="ui-lastTime font_22">{{item.last_time}}</view>
|
||||
<block v-if="item.muteTeam">
|
||||
<image class="ui-no-disturbing" src="https://image.fulllinkai.com/202406/29/c682c95e835831195a5af75c303a9720.png" mode="widthFix"></image>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -20,18 +173,26 @@ wepy.page({
|
||||
mixins: [https, base],
|
||||
|
||||
data: {
|
||||
navHeight: 0,
|
||||
StatusBar: 0,
|
||||
CustomBar: 0,
|
||||
Custom: 0,
|
||||
timer: null,
|
||||
inputVal: '',
|
||||
page: 1,
|
||||
no_more: false,
|
||||
list: [] // 消息列表数据
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
let vm = this
|
||||
let data = {
|
||||
page: vm.page
|
||||
page: vm.page,
|
||||
keyword: vm.inputVal
|
||||
}
|
||||
vm.$showLoading('加载中...')
|
||||
vm.$showLoading('')
|
||||
vm.$get({url: `${service.host}/chat/linkmen`, data}).then(({code, data}) => {
|
||||
if (code === 0) {
|
||||
vm.teamAtList = wx.getStorageSync('teamAtList') || []
|
||||
vm.groupSessionsCount = wx.getStorageSync('teamsSessionsCount') || []
|
||||
let arrList = []
|
||||
if (data.data && data.data.length > 0) {
|
||||
data.data.forEach((item) => {
|
||||
@ -46,8 +207,7 @@ wepy.page({
|
||||
id: item.join_to_id,
|
||||
hidden_profile: 'NONE',
|
||||
msgId: item.id,
|
||||
isTouchMove: false,
|
||||
new_count: wx.getStorageSync('muteNotList') && wx.getStorageSync('muteNotList').length > 0 ? 0 : vm.getGroupCount(item.join_to_id)
|
||||
isTouchMove: false
|
||||
})
|
||||
} else {
|
||||
arrList.push({
|
||||
@ -61,8 +221,7 @@ wepy.page({
|
||||
hidden_profile: '',
|
||||
type: item.other_type,
|
||||
msgId: item.last_id,
|
||||
isTouchMove: false,
|
||||
new_count: item.new_count
|
||||
isTouchMove: false
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -74,11 +233,8 @@ wepy.page({
|
||||
arr.forEach((i) => {
|
||||
vm.list.forEach((j) => {
|
||||
if (j.chat_type == 'group_chat' && i.teamId == j.id && !j.muteState) {
|
||||
j.new_count = 0
|
||||
j.muteTeam = i.muteTeam
|
||||
j.muteState = true
|
||||
} else if (j.chat_type == 'group_chat') {
|
||||
j.new_count = vm.getGroupCount(j.id)
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -88,20 +244,49 @@ wepy.page({
|
||||
vm.no_more = true
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
vm.loading = true
|
||||
}, 500)
|
||||
wx.hideLoading()
|
||||
}).catch(err => {
|
||||
wx.hideLoading()
|
||||
vm.loading = true
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
// 聊天对话
|
||||
jumpChatPath(e, type) {
|
||||
let vm = this
|
||||
// 校验是否完成注册资料
|
||||
if (!vm.$signInVerify()) {
|
||||
vm.loginShow = true
|
||||
return
|
||||
}
|
||||
let url = ``
|
||||
if (type === 'user') {
|
||||
url = `/pages/home/information?id=${e.id}`
|
||||
} else if (e.chat_type === 'group_chat') {
|
||||
url = `/pages/news/groupChitchat?id=${e.id}&name=${encodeURIComponent(e.title)}&pic=${e.icon}`
|
||||
} else {
|
||||
url = `/pages/news/chitchat?id=${e.id}&name=${encodeURIComponent(e.title)}&type=${e.type}&pic=${e.icon}&real=${e.is_real_approved}`
|
||||
}
|
||||
wx.navigateTo({url: url})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
inputVal () {
|
||||
let vm = this
|
||||
clearTimeout(vm.timer)
|
||||
vm.timer = setTimeout(() => {
|
||||
console.log('2222')
|
||||
// vm.page = 1
|
||||
// vm.no_more = false
|
||||
// vm.getList()
|
||||
}, 800)
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
let vm = this
|
||||
vm.getList()
|
||||
vm.navHeight = vm.$app.$options.globalData.navBarHeight
|
||||
vm.StatusBar = vm.$app.$options.globalData.StatusBar
|
||||
vm.CustomBar = vm.$app.$options.globalData.CustomBar
|
||||
vm.Custom = vm.$app.$options.globalData.Custom
|
||||
},
|
||||
onLoad() {}
|
||||
})
|
||||
@ -109,6 +294,7 @@ wepy.page({
|
||||
<config>
|
||||
{
|
||||
navigationBarTitleText: '',
|
||||
navigationStyle: 'custom',
|
||||
enablePullDownRefresh: true,
|
||||
backgroundColorTop: '#ffffff',
|
||||
backgroundColorBottom: '#ffffff',
|
||||
|
||||
@ -359,7 +359,12 @@ page {
|
||||
</view>
|
||||
</view>
|
||||
<view class="f-fbc d_user_data ui-mt-8">
|
||||
<span class="color333 font_28 ellipsis_1">{{ item.year + ' · ' }}{{item.stature + ' · '}}{{ item.degree ? item.degree + ' · ' : '' }}{{ item.industry_sub ? item.industry_sub : '' }}</span>
|
||||
<span class="color333 font_28 ellipsis_1">
|
||||
<block v-if="item.year">{{ item.year }}</block>
|
||||
<block v-if="item.stature">{{ ' · ' + item.stature }}</block>
|
||||
<block v-if="item.degree">{{ ' · ' +item.degree }}</block>
|
||||
<block v-if="item.industry_sub">{{ ' · ' + item.industry_sub }}</block>
|
||||
</span>
|
||||
</view>
|
||||
<view class="f-fbc d_user_data ui-mt-6">
|
||||
<span class="color666 font_28 ellipsis_1" style="width: 80vw;">{{ item.introduction || '介绍:未填写' }}</span>
|
||||
@ -389,7 +394,12 @@ page {
|
||||
</view>
|
||||
</view>
|
||||
<view class="f-fbc d_user_data ui-mt-8">
|
||||
<span class="color333 font_28 ellipsis_1">{{ item.year + ' · ' }}{{item.stature + 'cm · '}}{{ item.degree ? item.degree + ' · ' : '' }}{{ item.industry_sub ? item.industry_sub : '' }}</span>
|
||||
<span class="color333 font_28 ellipsis_1">
|
||||
<block v-if="item.year">{{ item.year }}</block>
|
||||
<block v-if="item.stature">{{ ' · ' + item.stature }}</block>
|
||||
<block v-if="item.degree">{{ ' · ' +item.degree }}</block>
|
||||
<block v-if="item.industry_sub">{{ ' · ' + item.industry_sub }}</block>
|
||||
</span>
|
||||
</view>
|
||||
<view class="f-fbc d_user_data ui-mt-6">
|
||||
<span class="color666 font_28 ellipsis_1" style="width: 80vw;">{{ item.introduction || '介绍:未填写' }}</span>
|
||||
|
||||
@ -149,7 +149,7 @@ page {
|
||||
</style>
|
||||
<template>
|
||||
<view class="ui-news">
|
||||
<cuCustom></cuCustom>
|
||||
<cuCustom @tap="jumpPath({path: '/pages/news/newsSearch'})"></cuCustom>
|
||||
<view class="ui-top-menu-list f-fbc">
|
||||
<view class="text-center ui-top-menu-item ui-relative" v-for="(item,index) in menuList" :key="index" @tap="jumpPath(item)">
|
||||
<image class="ui-top-menu-icon ui-relative" :src="item.icon" mode="aspectFit">
|
||||
@ -164,9 +164,9 @@ page {
|
||||
<view class="font_32 color999">暂无聊天消息</view>
|
||||
</view>
|
||||
<block v-else>
|
||||
<view class="ui-touch-item" :class="{'touch-move-active' : item.isTouchMove}" data-index="{{index}}" bindtouchstart="touchstart" bindtouchmove="touchmove" v-for="(item,index) in list" :key="index" @tap="jumpChatPath(item)">
|
||||
<view class="ui-touch-item" :class="{'touch-move-active' : item.isTouchMove}" data-index="{{index}}" bindtouchstart="touchstart" bindtouchmove="touchmove" v-for="(item,index) in list" :key="index" @tap="jumpChatPath(item, 'chat')">
|
||||
<view class="ui-content">
|
||||
<image class="cu-avatar round lg flo_l" :src="item.icon" mode="aspectFit" @tap.stop="jumpDetailPath(item)"></image>
|
||||
<image class="cu-avatar round lg flo_l" :src="item.icon" mode="aspectFit" @tap.stop="jumpChatPath(item, 'user')"></image>
|
||||
<view class="ui-messageBox flo_l">
|
||||
<view class="font_30 color333 ui-name ellipsis_1 f-fcl">
|
||||
{{item.title}}
|
||||
@ -188,7 +188,7 @@ page {
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.chat_type == 'linkmen'" class="ui-del-box" @tap="quitGroup(item, index)">退出</view>
|
||||
<view v-if="item.chat_type == 'group_chat'" class="ui-del-box" @tap="quitGroup(item, index)">退出</view>
|
||||
<view v-else class="ui-del-box" @tap="deleteList(item, index)">删除</view>
|
||||
</view>
|
||||
</block>
|
||||
@ -445,7 +445,7 @@ wepy.page({
|
||||
},
|
||||
|
||||
// 聊天对话
|
||||
jumpChatPath(e) {
|
||||
jumpChatPath(e, type) {
|
||||
let vm = this
|
||||
// 校验是否完成注册资料
|
||||
if (!vm.$signInVerify()) {
|
||||
@ -453,26 +453,12 @@ wepy.page({
|
||||
return
|
||||
}
|
||||
let url = ``
|
||||
if (e.chat_type === 'group_chat') {
|
||||
url = `/pages/news/groupChitchat?id=${e.id}&name=${encodeURIComponent(e.title)}&pic=${e.icon}`
|
||||
} else {
|
||||
url = `/pages/news/chitchat?id=${e.id}&name=${encodeURIComponent(e.title)}&type=${e.type}&pic=${e.icon}`
|
||||
}
|
||||
wx.navigateTo({url: url})
|
||||
},
|
||||
// 用户详情
|
||||
jumpDetailPath(e) {
|
||||
let vm = this
|
||||
// 校验是否完成注册资料
|
||||
if (!vm.$signInVerify()) {
|
||||
vm.loginShow = true
|
||||
return
|
||||
}
|
||||
let url = ``
|
||||
if (e.chat_type === 'group_chat') {
|
||||
url = `/pages/news/groupChitchat?id=${e.id}&name=${encodeURIComponent(e.title)}&pic=${e.icon}`
|
||||
} else {
|
||||
if (type === 'user') {
|
||||
url = `/pages/home/information?id=${e.id}`
|
||||
} else if (e.chat_type === 'group_chat') {
|
||||
url = `/pages/news/groupChitchat?id=${e.id}&name=${encodeURIComponent(e.title)}&pic=${e.icon}`
|
||||
} else {
|
||||
url = `/pages/news/chitchat?id=${e.id}&name=${encodeURIComponent(e.title)}&type=${e.type}&pic=${e.icon}&real=${e.is_real_approved}`
|
||||
}
|
||||
wx.navigateTo({url: url})
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user