群UI需要调整
This commit is contained in:
403
pages/adduser/details.vue
Normal file
403
pages/adduser/details.vue
Normal file
@@ -0,0 +1,403 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import TUIChatEngine, {
|
||||
TUIConversationService,
|
||||
TUIFriendService,
|
||||
TUIUserService
|
||||
} from '@tencentcloud/chat-uikit-engine-lite'
|
||||
import { useUI } from '../../utils/use-ui'
|
||||
import { navigateBack, navigateTo, reLaunch } from '@/utils/router'
|
||||
import { TUIGlobal } from '@tencentcloud/universal-api'
|
||||
import PopupBox from '../my-index/components/popup-box.vue'
|
||||
import SwitchBar from '../../TUIKit/components/common/SwitchBar/index.vue'
|
||||
|
||||
const { showLoading, hideLoading, showToast, showDialog } = useUI()
|
||||
|
||||
const loading = ref(true)
|
||||
/** 验证信息输入 */
|
||||
const verificationInfo = ref('')
|
||||
/** 备注名 */
|
||||
const remark = ref('')
|
||||
/** 确认备注信息 */
|
||||
const confirmRemark = ref('')
|
||||
/** 用户 id */
|
||||
const userId = ref('')
|
||||
/** 好友信息 */
|
||||
const friendInfo = ref({})
|
||||
/** 详情页状态 */
|
||||
const isDetail = ref(false)
|
||||
/** 黑名单状态 */
|
||||
const isBlack = ref(false)
|
||||
/** 点击备注弹框 */
|
||||
const showRemark = ref(false)
|
||||
/** 点击查看头像 */
|
||||
const onViewAvatar = url => {
|
||||
uni.previewImage({
|
||||
urls: [url] // 图片路径数组(本地或网络)
|
||||
})
|
||||
}
|
||||
|
||||
/** 获取好友信息 */
|
||||
const getFriendInfo = async () => {
|
||||
loading.value = true
|
||||
showLoading()
|
||||
if (isDetail.value) {
|
||||
TUIFriendService.getFriendProfile({
|
||||
userIDList: [userId.value]
|
||||
})
|
||||
.then(res => {
|
||||
const data = res.data.friendList[0]
|
||||
friendInfo.value = data.profile
|
||||
confirmRemark.value = data.remark
|
||||
remark.value = data.remark
|
||||
console.log('好友信息==', data)
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
hideLoading()
|
||||
})
|
||||
} else {
|
||||
TUIUserService.getUserProfile({
|
||||
userIDList: [userId.value]
|
||||
})
|
||||
.then(res => {
|
||||
friendInfo.value = res.data[0]
|
||||
console.log('获取好友信息成功', friendInfo.value)
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
hideLoading()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const submit = async () => {
|
||||
// 在这里可以添加提交验证信息的逻辑
|
||||
let source = 'AddSource_Type_Web' // 来源渠道
|
||||
// #ifdef H5
|
||||
source = 'AddSource_Type_H5'
|
||||
// #endif
|
||||
|
||||
// 判断是否为 App(5+ App)
|
||||
// #ifdef APP-PLUS
|
||||
source = 'AddSource_Type_App'
|
||||
// #endif
|
||||
showLoading()
|
||||
try {
|
||||
await TUIFriendService.addFriend({
|
||||
to: userId.value,
|
||||
source,
|
||||
remark: remark.value || '',
|
||||
wording: verificationInfo.value,
|
||||
type: TUIChatEngine.TYPES.SNS_ADD_TYPE_BOTH
|
||||
})
|
||||
hideLoading()
|
||||
await showToast('好友请求已发送', 'success')
|
||||
navigateBack()
|
||||
} catch (error) {
|
||||
if (error.code === 30515) {
|
||||
hideLoading()
|
||||
const show = await showDialog(
|
||||
'提示',
|
||||
'该用户在黑名单中,不允许加好友'
|
||||
)
|
||||
if (show) {
|
||||
navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 加入黑名单 */
|
||||
const switchChange = async () => {
|
||||
const show = await showDialog(
|
||||
'提示',
|
||||
`确定要${isBlack.value ? '移除' : '添加'}黑名单吗?`
|
||||
)
|
||||
if (!show) {
|
||||
return
|
||||
}
|
||||
showLoading()
|
||||
if (isBlack.value) {
|
||||
TUIUserService.removeFromBlacklist({
|
||||
userIDList: [friendInfo.value.userID]
|
||||
})
|
||||
.then(async () => {
|
||||
await showToast('移除黑名单成功', 'success')
|
||||
isBlack.value = false
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoading()
|
||||
})
|
||||
} else {
|
||||
TUIUserService.addToBlacklist({
|
||||
userIDList: [friendInfo.value.userID]
|
||||
})
|
||||
.then(async () => {
|
||||
await showToast('添加黑名单成功', 'success')
|
||||
reLaunch('/TUIKit/components/TUIContact/index')
|
||||
isBlack.value = true
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoading()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/** 备注确认修改 */
|
||||
const onRemark = () => {
|
||||
if (remark.value === confirmRemark.value) {
|
||||
showToast('备注名相同,无法修改')
|
||||
return
|
||||
}
|
||||
showLoading()
|
||||
TUIFriendService.updateFriend({
|
||||
userID: friendInfo.value.userID,
|
||||
remark: remark.value
|
||||
})
|
||||
.then(async res => {
|
||||
await showToast('修改备名成功', 'success')
|
||||
remark.value = res.data.remark
|
||||
confirmRemark.value = res.data.remark
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoading()
|
||||
})
|
||||
}
|
||||
|
||||
/** 删除好友 */
|
||||
const onDeleteFriend = async () => {
|
||||
const show = await showDialog('提示', '确定要删除好友吗?')
|
||||
if (!show) {
|
||||
return
|
||||
}
|
||||
showLoading()
|
||||
TUIFriendService.deleteFriend({
|
||||
userIDList: [friendInfo.value.userID],
|
||||
type: TUIChatEngine.TYPES.SNS_DELETE_TYPE_BOTH
|
||||
})
|
||||
.then(async res => {
|
||||
hideLoading()
|
||||
const { successUserIDList } = res.data
|
||||
if (successUserIDList[0].userID === friendInfo.value.userID) {
|
||||
await showToast('删除好友成功', 'success')
|
||||
reLaunch('/TUIKit/components/TUIContact/index')
|
||||
} else {
|
||||
await showToast('删除好友失败', 'error')
|
||||
}
|
||||
})
|
||||
.catch(async () => {
|
||||
hideLoading()
|
||||
await showToast('删除好友失败', 'error')
|
||||
})
|
||||
}
|
||||
|
||||
/** 发送消息 */
|
||||
const onSendMessage = () => {
|
||||
TUIConversationService.switchConversation(
|
||||
`C2C${friendInfo.value.userID}`
|
||||
).then(() => {
|
||||
TUIGlobal?.navigateTo({
|
||||
url: `/TUIKit/components/TUIChat/index`
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
onLoad(e => {
|
||||
userId.value = e?.id || ''
|
||||
/** type: 不传为添加 1 为详情页 */
|
||||
isDetail.value = e?.type == 1 || false
|
||||
uni.setNavigationBarTitle({
|
||||
title: isDetail.value ? '好友信息' : '发送好友申请'
|
||||
})
|
||||
getFriendInfo()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view v-if="!loading" class="details-box">
|
||||
<!-- 顶部用户信息 -->
|
||||
<view class="top-info">
|
||||
<image
|
||||
v-if="friendInfo?.avatar"
|
||||
:src="friendInfo?.avatar"
|
||||
mode="aspectFill"
|
||||
class="avatar"
|
||||
@tap="onViewAvatar(friendInfo?.avatar)"
|
||||
></image>
|
||||
<uni-icons v-else type="contact-filled" size="80"></uni-icons>
|
||||
<view class="right-box">
|
||||
<text>{{ friendInfo.nick || '未知名称' }}</text>
|
||||
<text>手机号: {{ friendInfo.userID }}</text>
|
||||
<text>
|
||||
个性签名: {{ friendInfo.selfSignature || '暂无个性签名' }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 验证信息输入 -->
|
||||
<view v-if="!isDetail" class="input-wrapper">
|
||||
<text class="title">请填写验证信息</text>
|
||||
<textarea
|
||||
v-model="verificationInfo"
|
||||
:maxlength="200"
|
||||
placeholder="请输入验证信息"
|
||||
class="input-text"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 备注 -->
|
||||
<view v-if="!isDetail" class="remark">
|
||||
<text>备注名</text>
|
||||
<input
|
||||
v-model="remark"
|
||||
:maxlength="80"
|
||||
placeholder="请输入备注名"
|
||||
placeholder-class="input-placeholder"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 发送申请按钮 -->
|
||||
<view v-if="!isDetail" class="send-btn" @tap="submit">
|
||||
<text>发送申请</text>
|
||||
</view>
|
||||
|
||||
<!-- 修改好友信息======================== -->
|
||||
<view v-if="isDetail" class="remark" @click="showRemark = true">
|
||||
<text>备注名</text>
|
||||
<view style="display: flex; align-items: center">
|
||||
<text
|
||||
style="margin-right: 10rpx; color: #999999; font-size: 28rpx"
|
||||
>
|
||||
{{ confirmRemark }}
|
||||
</text>
|
||||
<uni-icons type="right" color="#999999" size="36rpx"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="isDetail" class="remark">
|
||||
<text>加入黑名单</text>
|
||||
<SwitchBar :value="isBlack" @click="switchChange" />
|
||||
</view>
|
||||
|
||||
<view v-if="isDetail" class="send-btn" @tap="onDeleteFriend">
|
||||
<text style="color: #eb1c26">删除好友</text>
|
||||
</view>
|
||||
|
||||
<bottom-view v-if="isDetail">
|
||||
<cb-button @click="onSendMessage">发送信息</cb-button>
|
||||
</bottom-view>
|
||||
<popup-box
|
||||
v-model="showRemark"
|
||||
v-model:name="remark"
|
||||
title="备注信息"
|
||||
@confirm="onRemark"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
// 背景色
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.details-box {
|
||||
padding: 26rpx 32rpx;
|
||||
}
|
||||
|
||||
.send-btn {
|
||||
border-radius: 16rpx;
|
||||
margin-top: 20rpx;
|
||||
background: #ffffff;
|
||||
padding: 20rpx 32rpx;
|
||||
text-align: center;
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
color: #00d993;
|
||||
}
|
||||
}
|
||||
|
||||
.remark {
|
||||
border-radius: 16rpx;
|
||||
margin-top: 20rpx;
|
||||
background: #ffffff;
|
||||
padding: 20rpx 32rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
input {
|
||||
width: 80%;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.input-wrapper {
|
||||
margin-top: 20rpx;
|
||||
background: #ffffff;
|
||||
padding: 20rpx 32rpx;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.title {
|
||||
font-family:
|
||||
PingFang SC,
|
||||
PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.input-text {
|
||||
width: calc(100% - 40rpx);
|
||||
// border: 2rpx solid #eeeeee;
|
||||
color: #333333;
|
||||
border-radius: 8rpx;
|
||||
// padding: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.top-info {
|
||||
background: #ffffff;
|
||||
padding: 20rpx 32rpx;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.avatar {
|
||||
flex-shrink: 0;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 60rpx;
|
||||
}
|
||||
.right-box {
|
||||
height: 100%;
|
||||
margin-left: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
text {
|
||||
// 第一个
|
||||
&:first-child {
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
&:last-child {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
box-orient: vertical;
|
||||
line-clamp: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,216 +1,183 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import TUICore, { TUIConstants } from '@tencentcloud/tui-core-lite'
|
||||
import { useUI } from '@/utils/use-ui'
|
||||
import { navigateTo } from '@/utils/router'
|
||||
import TUIChatEngine, {
|
||||
TUIFriendService,
|
||||
TUIUserService
|
||||
TUIFriendService
|
||||
} from '@tencentcloud/chat-uikit-engine-lite'
|
||||
import { useUI } from '../../utils/use-ui'
|
||||
import { navigateBack } from '@/utils/router'
|
||||
|
||||
const { showLoading, hideLoading, showToast } = useUI()
|
||||
const { showLoading, hideLoading } = useUI()
|
||||
const loading = ref(false)
|
||||
const searchValue = ref('')
|
||||
const searchList = ref([])
|
||||
const isSearc = ref(false)
|
||||
// 是否是好友
|
||||
const isFriend = ref(false)
|
||||
|
||||
const loading = ref(true)
|
||||
/** 验证信息输入 */
|
||||
const verificationInfo = ref('')
|
||||
/** 备注名 */
|
||||
const remark = ref('')
|
||||
/** 用户 id */
|
||||
const userId = ref('')
|
||||
/** 好友信息 */
|
||||
const friendInfo = ref({})
|
||||
/** 点击查看头像 */
|
||||
const onViewAvatar = url => {
|
||||
uni.previewImage({
|
||||
urls: [url] // 图片路径数组(本地或网络)
|
||||
})
|
||||
const onCancel = () => {
|
||||
isFriend.value = false
|
||||
isSearc.value = false
|
||||
searchList.value = []
|
||||
}
|
||||
|
||||
/** 获取好友信息 */
|
||||
const getFriendInfo = async () => {
|
||||
loading.value = true
|
||||
const search = () => {
|
||||
if (!searchValue.value) {
|
||||
return
|
||||
}
|
||||
showLoading()
|
||||
TUIUserService.getUserProfile({
|
||||
userIDList: [userId.value]
|
||||
loading.value = true
|
||||
TUICore.callService({
|
||||
serviceName: TUIConstants.TUISearch.SERVICE.NAME,
|
||||
method: TUIConstants.TUISearch.SERVICE.METHOD.SEARCH_USER,
|
||||
params: {
|
||||
userID: searchValue.value
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
friendInfo.value = res.data[0]
|
||||
console.log('获取好友信息成功', friendInfo.value)
|
||||
isSearc.value = res.data.length === 0
|
||||
searchList.value = res.data
|
||||
if (searchList.value.length > 0) {
|
||||
TUIFriendService.checkFriend({
|
||||
type: TUIChatEngine.TYPES.SNS_CHECK_TYPE_BOTH,
|
||||
userIDList: [searchList.value[0].userID]
|
||||
})
|
||||
.then(v => {
|
||||
console.log(v.data.successUserIDList[0])
|
||||
isFriend.value =
|
||||
v.data.successUserIDList[0].relation ===
|
||||
TUIChatEngine.TYPES.SNS_TYPE_BOTH_WAY
|
||||
hideLoading()
|
||||
loading.value = false
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false
|
||||
hideLoading()
|
||||
})
|
||||
} else {
|
||||
loading.value = false
|
||||
hideLoading()
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
.catch(() => {
|
||||
loading.value = false
|
||||
hideLoading()
|
||||
})
|
||||
}
|
||||
|
||||
const submit = async () => {
|
||||
// 在这里可以添加提交验证信息的逻辑
|
||||
let source = 'AddSource_Type_Web' // 来源渠道
|
||||
// #ifdef H5
|
||||
source = 'AddSource_Type_H5'
|
||||
// #endif
|
||||
|
||||
// 判断是否为 App(5+ App)
|
||||
// #ifdef APP-PLUS
|
||||
source = 'AddSource_Type_App'
|
||||
// #endif
|
||||
showLoading()
|
||||
await TUIFriendService.addFriend({
|
||||
to: userId.value,
|
||||
source,
|
||||
remark: remark.value || '',
|
||||
wording: verificationInfo.value,
|
||||
type: TUIChatEngine.TYPES.SNS_ADD_TYPE_BOTH
|
||||
})
|
||||
hideLoading()
|
||||
await showToast('好友请求已发送', 'success')
|
||||
navigateBack()
|
||||
const onAdd = item => {
|
||||
navigateTo('/pages/adduser/details', { id: item.userID })
|
||||
}
|
||||
|
||||
onLoad(e => {
|
||||
userId.value = e?.id || '7616mobile'
|
||||
getFriendInfo()
|
||||
})
|
||||
const onDetails = item => {
|
||||
if (isFriend.value) {
|
||||
navigateTo('/pages/adduser/details', { id: item.userID, type: '1' })
|
||||
} else {
|
||||
onAdd(item)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view v-if="!loading">
|
||||
<!-- 顶部用户信息 -->
|
||||
<view class="top-info">
|
||||
<image
|
||||
v-if="friendInfo?.avatar"
|
||||
:src="friendInfo?.avatar"
|
||||
mode="aspectFill"
|
||||
class="avatar"
|
||||
@tap="onViewAvatar(friendInfo?.avatar)"
|
||||
></image>
|
||||
<uni-icons v-else type="contact-filled" size="80"></uni-icons>
|
||||
<view class="right-box">
|
||||
<text>{{ friendInfo.nick }}</text>
|
||||
<text>ID: {{ friendInfo.userID }}</text>
|
||||
<text>
|
||||
个性签名: {{ friendInfo.selfSignature || '暂无个性签名' }}
|
||||
</text>
|
||||
<view>
|
||||
<uni-search-bar
|
||||
v-model="searchValue"
|
||||
focus
|
||||
radius="100"
|
||||
bgColor="#f4f4f4"
|
||||
textColor="#333333"
|
||||
placeholder="请输入用户手机号"
|
||||
@confirm="search"
|
||||
@cancel="onCancel"
|
||||
></uni-search-bar>
|
||||
<cb-empty v-if="isSearc" name="未搜索到此账号"></cb-empty>
|
||||
<!-- 好友列表 -->
|
||||
<view v-if="!loading" class="user-list">
|
||||
<view
|
||||
v-for="item in searchList"
|
||||
:key="item.userID"
|
||||
class="card"
|
||||
@click="onDetails(item)"
|
||||
>
|
||||
<image
|
||||
v-if="item?.avatar"
|
||||
:src="item?.avatar"
|
||||
mode="aspectFill"
|
||||
class="avatar"
|
||||
></image>
|
||||
<view v-else class="avatar">
|
||||
<uni-icons type="contact-filled" size="130rpx"></uni-icons>
|
||||
</view>
|
||||
<view class="right-box">
|
||||
<view class="name-box">
|
||||
<text>{{ item.nick || '未知名称' }}</text>
|
||||
<text>{{ item.userID }}</text>
|
||||
</view>
|
||||
<text v-if="isFriend" class="tag">已添加</text>
|
||||
<button v-else @click.stop="onAdd(item)">添加</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 验证信息输入 -->
|
||||
<view class="input-wrapper">
|
||||
<text class="title">请填写验证信息</text>
|
||||
<textarea
|
||||
v-model="verificationInfo"
|
||||
:maxlength="200"
|
||||
placeholder="请输入验证信息"
|
||||
class="input-text"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 备注 -->
|
||||
<view class="remark">
|
||||
<text>备注名</text>
|
||||
<input
|
||||
v-model="remark"
|
||||
:maxlength="80"
|
||||
placeholder="请输入备注名"
|
||||
placeholder-class="input-placeholder"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 发送申请按钮 -->
|
||||
<view class="send-btn" @tap="submit">
|
||||
<text>发送申请</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
// 背景色
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.send-btn {
|
||||
margin-top: 20rpx;
|
||||
background: #ffffff;
|
||||
padding: 20rpx 32rpx;
|
||||
text-align: center;
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
color: #2542c0;
|
||||
}
|
||||
}
|
||||
|
||||
.remark {
|
||||
margin-top: 20rpx;
|
||||
background: #ffffff;
|
||||
padding: 20rpx 32rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
input {
|
||||
width: 80%;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.input-wrapper {
|
||||
margin-top: 20rpx;
|
||||
background: #ffffff;
|
||||
padding: 20rpx 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.title {
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.input-text {
|
||||
width: calc(100% - 40rpx);
|
||||
border: 2rpx solid #eeeeee;
|
||||
border-radius: 8rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.top-info {
|
||||
background: #ffffff;
|
||||
padding: 20rpx 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.avatar {
|
||||
flex-shrink: 0;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 60rpx;
|
||||
}
|
||||
.right-box {
|
||||
height: 100%;
|
||||
margin-left: 20rpx;
|
||||
<style lang="scss" scoped>
|
||||
.user-list {
|
||||
padding: 0 48rpx;
|
||||
.card {
|
||||
margin-top: 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
text {
|
||||
// 第一个
|
||||
&:first-child {
|
||||
align-items: center;
|
||||
.avatar {
|
||||
flex-shrink: 0;
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 96rpx;
|
||||
margin-right: 16rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.right-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.tag {
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
color: #999999;
|
||||
}
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
&:last-child {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
box-orient: vertical;
|
||||
line-clamp: 1;
|
||||
overflow: hidden;
|
||||
.name-box {
|
||||
height: 96rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
text {
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
// 最后一个
|
||||
&:last-child {
|
||||
margin-top: 6rpx;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
button {
|
||||
margin: 0;
|
||||
width: 128rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: linear-gradient(0deg, #00d993 0%, #00d9c5 100%);
|
||||
border-radius: 100rpx;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,13 +19,6 @@
|
||||
]
|
||||
|
||||
const onGo = item => {
|
||||
// ============测试添加好友===============
|
||||
// if (item === 'project') {
|
||||
// navigateTo('/pages/adduser/index')
|
||||
// return
|
||||
// }
|
||||
|
||||
// ===========================
|
||||
if (item === 'project') {
|
||||
showDialog('提示', '外部链接暂未提供', false)
|
||||
return
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
const getList = async () => {
|
||||
const res = await getUserServiceFree()
|
||||
customerData.value = res?.data || {}
|
||||
console.log( customerData.value)
|
||||
}
|
||||
|
||||
const handleSwitchConversation = async () => {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</view>
|
||||
<view class="code-img">
|
||||
<l-qrcode
|
||||
:value="`/pages/adduser/index?id=${tencentUserSig.userId}`"
|
||||
:value="`/pages/adduser/details?id=${tencentUserSig.userId}`"
|
||||
size="240"
|
||||
/>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user