This commit is contained in:
2025-11-21 01:20:28 +08:00
parent d9d7ddc05d
commit ff026c6f32
7 changed files with 822 additions and 824 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
// const API_URL = `http://${BASE_HOST}:10002`
// const WS_URL = `ws://${BASE_HOST}:10001`
const BASE_DOMAIN = '110.42.52.196'
const BASE_DOMAIN = '156.238.245.175'
// const CHAT_URL = `https://${BASE_DOMAIN}/chat`
// const API_URL = `https://${BASE_DOMAIN}/api`
// const WS_URL = `wss://${BASE_DOMAIN}/msg_gateway`
+1 -2
View File
@@ -253,8 +253,7 @@
"borderStyle": "black",
"backgroundColor": "#ffffff",
"height": "55px",
"list": [
{
"list": [{
"pagePath": "pages/conversation/conversationList/index",
"iconPath": "./static/images/tabbar_conversation.png",
"selectedIconPath": "static/images/tabbar_conversation_active.png",
@@ -3,15 +3,8 @@
<custom-nav-bar :route="false">
<view slot="left"> </view>
<view class="search_bar" slot="center">
<u-search
actionText="取消"
@change="keywordChange"
@custom="cancel"
@search="startSearch"
shape="square"
:placeholder="getPlaceholder"
v-model="keyword"
/>
<u-search actionText="取消" @change="keywordChange" @custom="cancel" @search="startSearch" shape="square"
:placeholder="getPlaceholder" v-model="keyword" />
</view>
</custom-nav-bar>
@@ -39,7 +32,9 @@ import CustomNavBar from "@/components/CustomNavBar/index.vue";
import searchGroup from "static/images/contact_add_join_group_fill.png";
import searchUser from "static/images/contact_add_search_user_fill.png";
import { businessSearchUserInfo } from "@/api/login";
import {
businessSearchUserInfo
} from "@/api/login";
export default {
components: {
@@ -93,9 +88,7 @@ export default {
}
if (info) {
uni.navigateTo({
url: `/pages/common/groupCard/index?sourceInfo=${JSON.stringify(
info,
)}`,
url: `/pages/common/groupCard/index?sourceInfo=${JSON.stringify(info,)}`,
});
} else {
this.empty = true;
@@ -122,9 +115,7 @@ export default {
}
if (info) {
uni.navigateTo({
url: `/pages/common/userCard/index?sourceInfo=${JSON.stringify(
info,
)}`,
url: `/pages/common/userCard/index?sourceInfo=${JSON.stringify(info,)}`,
});
} else {
this.empty = true;
+2 -1
View File
@@ -5,7 +5,8 @@
<view v-if="!isLoading" style="flex: 1;display: flex;flex-direction: column;">
<view class="base_info">
<my-avatar :desc="sourceUserInfo.remark || sourceUserInfo.nickname" :src="sourceUserInfo.faceURL" size="46" />
<my-avatar :desc="sourceUserInfo.remark || sourceUserInfo.nickname" :src="sourceUserInfo.faceURL"
size="46" />
<view class="user_name">
<text class="text">{{ getShowName }}</text>
<text class="id" @click="copy(sourceUserInfo.userID)">{{sourceUserInfo.userID}}</text>
+5 -13
View File
@@ -9,11 +9,7 @@
<text class="nickname">{{ selfInfo.nickname }}</text>
<view class="id_row_copy" @click="copy">
<text class="id">{{ selfInfo.userID }}</text>
<image
style="width: 32rpx; height: 32rpx"
src="@/static/images/id_copy.png"
mode=""
/>
<image style="width: 32rpx; height: 32rpx" src="@/static/images/id_copy.png" mode="" />
</view>
</view>
@@ -24,12 +20,8 @@
</view>
<view class="action_box">
<view
@click="profileMenuClick(item)"
class="profile_menu_item"
v-for="item in profileMenus"
:key="item.idx"
>
<view @click="profileMenuClick(item)" class="profile_menu_item" v-for="item in profileMenus"
:key="item.idx">
<view class="menu_left">
<image style="width: 48rpx; height: 48rpx" :src="item.icon" mode="" />
<text>{{ item.title }}</text>
@@ -51,8 +43,7 @@ export default {
},
data() {
return {
profileMenus: [
{
profileMenus: [{
idx: 0,
title: "我的信息",
icon: require("static/images/profile_menu_info.png"),
@@ -82,6 +73,7 @@ export default {
},
methods: {
copy() {
console.log(this.selfInfo)
uni.setClipboardData({
showToast: false,
data: this.selfInfo.userID,
+13 -6
View File
@@ -1,4 +1,6 @@
import { v4 as uuidv4 } from "uuid";
import {
v4 as uuidv4
} from "uuid";
import IMSDK from "openim-uniapp-polyfill";
const state = {
@@ -46,10 +48,11 @@ const mutations = {
const actions = {
async getConversationList({ state, commit }, isFirstPage = true) {
try {
const { data } = await IMSDK.asyncApi(
const {
data
} = await IMSDK.asyncApi(
IMSDK.IMMethods.GetConversationListSplit,
uuidv4(),
{
uuidv4(), {
offset: isFirstPage ? 0 : state.conversationList.length,
count: 500,
},
@@ -68,7 +71,9 @@ const actions = {
getCurrentGroup({ commit }, groupID) {
IMSDK.asyncApi(IMSDK.IMMethods.GetSpecifiedGroupsInfo, uuidv4(), [
groupID,
]).then(({ data }) => {
]).then(({
data
}) => {
commit("SET_CURRENT_GROUP", data[0] ?? {});
});
},
@@ -76,7 +81,9 @@ const actions = {
IMSDK.asyncApi(IMSDK.IMMethods.GetSpecifiedGroupMembersInfo, uuidv4(), {
groupID,
userIDList: [rootState.user.selfInfo.userID],
}).then(({ data }) => {
}).then(({
data
}) => {
commit("SET_CURRENT_MEMBER_IN_GROUP", data[0] ?? {});
});
},
+11 -3
View File
@@ -36,11 +36,14 @@ const mutations = {
const actions = {
async getSelfInfo({ commit }) {
try {
const { data } = await IMSDK.asyncApi(
const {
data
} = await IMSDK.asyncApi(
IMSDK.IMMethods.GetSelfUserInfo,
uuidv4(),
);
const {users} = await businessGetUserInfo(data.userID);
console.log(users);
const businessData = users[0] ?? {};
filterEmptyValue(businessData);
commit("SET_SELF_INFO", {
@@ -52,9 +55,14 @@ const actions = {
uni.$u.toast("获取个人信息失败");
}
},
async updateBusinessInfo({ commit, state }) {
async updateBusinessInfo({
commit,
state
}) {
try {
const { users } = await businessGetUserInfo(state.selfInfo.userID);
const {
users
} = await businessGetUserInfo(state.selfInfo.userID);
const businessData = users[0] ?? {};
filterEmptyValue(businessData);
commit("SET_SELF_INFO", {