This commit is contained in:
2025-11-25 05:36:02 +08:00
parent 8e036cc171
commit b10e4b4336
65 changed files with 2672 additions and 2270 deletions
+24 -14
View File
@@ -15,7 +15,11 @@
<u-button type="primary" icon="man-add" text="添加"></u-button>
</view>
</view>
<view class="info_row">
<user-info-row-item lable="性别" :content="getGender" />
<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>
@@ -31,21 +35,14 @@
</template>
<script>
import {
mapGetters
} from "vuex";
import {
navigateToDesignatedConversation
} from "@/util/imCommon";
import IMSDK, {
SessionType,
} from "openim-uniapp-polyfill";
import {mapGetters} from "vuex";
import {navigateToDesignatedConversation} from "@/util/imCommon";
import IMSDK, {SessionType,} from "openim-uniapp-polyfill";
import MyAvatar from "@/components/MyAvatar/index.vue";
import CustomNavBar from "@/components/CustomNavBar/index.vue";
import UserInfoRowItem from "./components/UserInfoRowItem.vue";
import {
businessSearchUserInfo
} from "@/api/login";
import {businessSearchUserInfo} from "@/api/login";
import dayjs from "dayjs";
export default {
components: {
@@ -67,6 +64,19 @@
"storeFriendList",
"storeSelfInfo",
]),
getGender() {
if (this.sourceUserInfo.sex === 0) {
return "保密";
}
if (this.sourceUserInfo.sex === 1) {
return "男";
}
return "女";
},
getBirth() {
const birth = this.sourceUserInfo.birthday ?? 0;
return dayjs(birth).format("YYYY-MM-DD");
},
isFriend() {
return (
this.storeFriendList.findIndex(
@@ -142,7 +152,7 @@
} = await IMSDK.asyncApi(
IMSDK.IMMethods.GetUsersInfo,
IMSDK.uuid(),
[this.sourceID],
[this.sourceID+''],
);
const imData = data[0]?.friendInfo ?? data[0]?.publicInfo ?? {};
info = {