This commit is contained in:
cansnow
2026-01-01 04:15:30 +08:00
parent 09c7889525
commit 78386d4cc1
75 changed files with 1995 additions and 1715 deletions
@@ -1,51 +1,55 @@
<template>
<view @click="click" class="row_item" :class="{ arrow_right: arrow }">
<view class="title">
<text>{{ lable }}</text>
</view>
<view class="content">
<text>{{ content }}</text>
</view>
<slot>
<u-icon v-if="arrow" name="arrow-right" color="#999" size="20"></u-icon>
</slot>
</view>
<view @click="click" class="row_item" :class="{ arrow_right: arrow }">
<view class="title">
<text>{{ lable }}</text>
</view>
<view class="content">
<text>{{ content }}</text>
</view>
<slot>
<u-icon v-if="arrow" name="arrow-right" color="#999" size="20"></u-icon>
</slot>
</view>
</template>
<script>
export default {
name: "",
components: {},
props: {
lable: String,
content: String,
arrow: {
type: Boolean,
default: false,
},
},
data() {
return {};
},
methods: {
click() {
this.$emit("click");
},
},
};
export default {
name: "",
components: {},
props: {
lable: String,
content: String,
arrow: {
type: Boolean,
default: false,
},
},
data() {
return {};
},
methods: {
click() {
this.$emit("click");
},
},
};
</script>
<style lang="scss" scoped>
.row_item {
@include vCenterBox();
padding: 24rpx 44rpx;
}
.row_item {
@include vCenterBox();
padding: 24rpx 44rpx;
.content{
display: flex;
align-items: center;
}
}
.title {
margin-right: 24rpx;
}
.title {
margin-right: 24rpx;
}
.arrow_right {
justify-content: space-between;
}
</style>
.arrow_right {
justify-content: space-between;
}
</style>
+22 -51
View File
@@ -1,7 +1,8 @@
<template>
<view class="user_card_container">
<u-loading-page :loading="isLoading" loading-text="loading..."></u-loading-page>
<custom-nav-bar title="" />
<custom-nav-bar title="" @rightClick="toMoreInfo" more v-if="isFriend" />
<custom-nav-bar title="" v-else />
<view v-if="!isLoading" style="flex: 1;display: flex;flex-direction: column;">
<view class="base_info">
@@ -9,10 +10,7 @@
size="46" />
<view class="user_name">
<text class="text">{{ getShowName }}</text>
<text class="id" @click="copy(sourceUserInfo.userID)">{{sourceUserInfo.userID}}</text>
</view>
<view class="add_btn" @click="toAddFriend" v-if="trySendRequest">
<u-button type="primary" icon="man-add" text="添加"></u-button>
<text class="id" @click="copy(sourceUserInfo.userID || sourceUserInfo.id)">{{sourceUserInfo.userID || sourceUserInfo.id}}</text>
</view>
</view>
<view class="info_row">
@@ -20,15 +18,15 @@
<user-info-row-item lable="生日" :content="getBirth" />
<user-info-row-item lable="个性签名" :content="sourceUserInfo.bio" />
</view>
<view v-if="isFriend" class="info_row">
<user-info-row-item @click="toMoreInfo" lable="个人资料" arrow />
<view class="info_row">
<user-info-row-item v-if="isFriend" @click="toMoreInfo" lable="更多信息" arrow />
<user-info-row-item v-if="1==1" @click="gotoCircle" lable="朋友圈" arrow />
</view>
<view class="action_row" v-if="!isSelf">
<view @click="toDesignatedConversation" class="action_item">
<img src="static/images/user_card_message.png" alt="" />
<text>发消息</text>
</view>
<u-button type="primary" icon="chat" text="发消息" @click="toDesignatedConversation" v-if="isFriend"></u-button>
<u-button type="primary" icon="man-add" text="添加" @click="toAddFriend" v-else></u-button>
</view>
</view>
</view>
@@ -43,6 +41,7 @@
import UserInfoRowItem from "./components/UserInfoRowItem.vue";
import {businessSearchUserInfo} from "@/api/login";
import dayjs from "dayjs";
import util from "@/util/index.js"
export default {
components: {
@@ -106,7 +105,7 @@
if (sourceID) {
this.sourceID = sourceID;
} else {
const info = JSON.parse(sourceInfo);
const info = util.aesdecode(sourceInfo);
this.sourceID = info.userID;
}
//console.log(this.storeSelfInfo);
@@ -148,16 +147,8 @@
try {
const res = await businessSearchUserInfo(this.sourceID);
if (res.total > 0) {
const {
data
} = await IMSDK.asyncApi(
IMSDK.IMMethods.GetUsersInfo,
IMSDK.uuid(),
[this.sourceID+''],
);
const imData = data[0]?.friendInfo ?? data[0]?.publicInfo ?? {};
info = {
...imData,
...info,
...res.data[0],
};
}
@@ -177,6 +168,13 @@
notNeedVerification: false,
});
},
gotoCircle(){
console.log('gotoCircle');
return ;
uni.navigateTo({
url:"/pages/find/friend-circle/friend-circle?userId="+this.sourceID
})
},
toDesignatedConversation() {
navigateToDesignatedConversation(
this.sourceID,
@@ -185,8 +183,9 @@
).catch(() => uni.$u.toast("获取会话信息失败"));
},
toMoreInfo() {
const s = util.aesencode(this.sourceUserInfo);
uni.navigateTo({
url: `/pages/common/userCardMore/index?sourceInfo=${JSON.stringify(this.sourceUserInfo,)}`,
url: `/pages/common/userCardMore/index?sourceInfo=${s}`,
});
}
},
@@ -207,16 +206,6 @@
padding: 44rpx;
margin-bottom: 18rpx;
.add_btn {
width: 140rpx;
height: 60rpx;
margin-left: auto;
.u-button {
width: 140rpx;
height: 60rpx;
}
}
.u-avatar {
margin-right: 24rpx;
@@ -226,7 +215,6 @@
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 12rpx;
height: 46px;
.text {
@@ -271,23 +259,6 @@
margin: 44rpx;
flex: 1;
.action_item {
width: 100%;
@include colBox(true);
flex-direction: row;
align-items: center;
justify-content: center;
padding: 22rpx 0;
background: $u-primary;
color: #fff;
border-radius: 12rpx;
img {
margin-right: 16rpx;
width: 40rpx;
height: 40rpx;
}
}
}
.id {