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