diff --git a/App.vue b/App.vue
index f7403d1..fd4eb54 100644
--- a/App.vue
+++ b/App.vue
@@ -10,25 +10,30 @@
export default {
onLaunch: function() {
console.log("App Launch");
- this.checkUpdate();
- this.setGlobalIMlistener();
- this.tryLogin();
// #ifdef H5
console.error(
`暂时不支持运行到 Web,如果需要移动端的 Web 项目,参考 [H5 demo](https://github.com/openimsdk/openim-h5-demo)`
);
+ return ;
// #endif
// #ifdef MP-WEIXIN
console.error(`暂时不支持运行到小程序端`);
// #endif
+ this.checkUpdate();
+ this.setGlobalIMlistener();
+ this.tryLogin();
},
onShow: function() {
console.log("App Show");
+ // #ifdef APP
IMSDK.asyncApi(IMSDK.IMMethods.SetAppBackgroundStatus, IMSDK.uuid(), false);
+ // #endif
},
onHide: function() {
console.log("App Hide");
+ // #ifdef APP
IMSDK.asyncApi(IMSDK.IMMethods.SetAppBackgroundStatus, IMSDK.uuid(), true);
+ // #endif
},
computed: {
...mapGetters([
@@ -269,25 +274,15 @@
return;
}
let filterArr = [];
- console.log(data);
+ //console.log(data);
const chids = data.map((ch) => ch.conversationID);
- filterArr = this.storeConversationList.filter(
- (tc) => !chids.includes(tc.conversationID)
- );
- const idx = data.findIndex(
- (c) =>
- c.conversationID === this.storeCurrentConversation.conversationID
- );
- if (idx !== -1)
- this.$store.commit(
- "conversation/SET_CURRENT_CONVERSATION",
- data[idx]
- );
+ filterArr = this.storeConversationList.filter((tc) => !chids.includes(tc.conversationID));
+ const idx = data.findIndex((c) =>c.conversationID === this.storeCurrentConversation.conversationID);
+ if (idx !== -1){
+ this.$store.commit("conversation/SET_CURRENT_CONVERSATION",data[idx]);
+ }
const result = [...data, ...filterArr];
- this.$store.commit(
- "conversation/SET_CONVERSATION_LIST",
- conversationSort(result)
- );
+ this.$store.commit("conversation/SET_CONVERSATION_LIST",conversationSort(result));
};
IMSDK.subscribe(IMSDK.IMEvents.OnTotalUnreadMessageCountChanged,totalUnreadCountChangedHandler);
@@ -308,13 +303,7 @@
this.$store.dispatch("contact/getFriendList");
this.$store.dispatch("circle/getFriendCircleInfo");
uni.switchTab({
- url: "/pages/conversation/conversationList/index?isRedirect=true",
- success() {
-
- // uni.navigateTo({
- // url:'/pages/workbench/friend-circle/friend-circle'
- // })
- }
+ url: "/pages/conversation/conversationList/index?isRedirect=true"
});
};
getDbDir()
diff --git a/Readme.md b/Readme.md
index 5e8c917..9d3d057 100644
--- a/Readme.md
+++ b/Readme.md
@@ -1,248 +1,119 @@
-
-
-
-
-
-
-# OpenIM Uniapp 💬💻
-
-
- OpenIM Docs
- •
- OpenIM Server
- •
- open-im-sdk-uniapp
- •
- openim-sdk-core
-
-OpenIM 为开发者提供开源即时通讯 SDK,作为 Twilio、Sendbird 等云服务的替代方案。借助 OpenIM,开发者可以构建安全可靠的即时通讯应用,如 WeChat、Zoom、Slack 等。
-
-本仓库基于开源版 OpenIM SDK 开发,提供了一款基于 uniapp 的即时通讯应用。您可以使用此应用程序作为 OpenIM SDK 的参考实现。本项目引用了 `openim-uniapp-polyfill`,可以构建安卓程序和 iOS 程序。
-
-
-
-
-
-
-
-## 授权许可 :page_facing_up:
-
-本仓库采用 GNU Affero 通用公共许可证第 3 版 (AGPL-3.0) 进行许可,并受以下附加条款的约束。**不允许用于商业用途**。详情请参阅 [此处](./LICENSE)。
-
-## 开发环境
-
-在开始开发之前,请确保您的系统已安装以下软件:
-
-- **HBuilderX**:最新版本
-- **Node.js**:版本 ≥ 16.x([手动安装](https://nodejs.org/dist/latest-v20.x/) 或使用 [nvm](https://github.com/nvm-sh/nvm) 进行版本管理)
-- **npm**:版本 ≥ 6.x(随 Node.js 一起安装)
-- **Git**:用于代码版本控制
-
-同时,您需要确保已经[部署](https://docs.openim.io/zh-Hans/guides/gettingStarted/dockerCompose)了最新版本的 OpenIM Server。接下来,您可以编译项目并连接自己的服务端进行测试。
-
-## 运行环境
-
-本应用支持以下操作系统版本:
-
-| 浏览器/操作系统 | 版本 | 状态 |
-| --------------- | ----------------- | ---- |
-| **iOS** | 13.0 及以上 | ✅ |
-| **Android** | 24 及以上 | ✅ |
-
-### 说明
-
-- `只支持` Uniapp 打包成 Android/iOS 应用。并且 SDK 也暂未支持 UniappX (开发中)。
-- 暂时 `不支持` 运行到 Web,如果需要移动端的 Web 项目,参考 [H5 demo](https://github.com/openimsdk/openim-h5-demo)。
-- 暂时 `不支持` 运行到小程序端。
-- 暂时 `不支持` 一对一音视频。如果需要使用,可以运行其他仓库的项目。
-
-## 快速开始
-
-按照以下步骤设置本地开发环境:
-
-1. 拉取代码
-
- ```bash
- git clone https://github.com/openimsdk/open-im-uniapp-demo.git
- cd open-im-uniapp-demo
- ```
-
-2. 安装依赖
-
- ```bash
- npm install
- ```
-
-3. 修改配置
-
- - `common/config.js`
-
- > 如果没有修改过服务端默认端口,则只需要修改`BASE_HOST`为您的服务器 ip 即可,如需配置域名和 https 访问,可以参考[nginx 配置](https://docs.openim.io/zh-Hans/guides/gettingStarted/nginxDomainConfig),并采用最下方的配置项,并修改`BASE_DOMAIN`为您的域名。
-
- ```javascript
- const BASE_HOST = 'your-server-ip'
- const CHAT_URL = `http://${BASE_HOST}:10008`
- const API_URL = `http://${BASE_HOST}:10002`
- const WS_URL = `ws://${BASE_HOST}:10001`
-
- // const BASE_DOMAIN = 'your-server-domain'
- // const CHAT_URL = `http://${BASE_DOMAIN}/chat`
- // const API_URL = `http://${BASE_DOMAIN}/api`
- // const WS_URL = `ws://${BASE_DOMAIN}/msg_gateway`
- ```
-
-4. 修改为您自己的 AppID
-
-- 使用 Hbuilder 打开 manifest.json
-
- 
-
-5. 导入原生插件
-
-- 使用 Hbuilder 打开 manifest.json
-
- 
-
-- 选择云插件需要选择您的项目 Appid 和输入 Android 包名称
-
- 
-
-6. 云打包自定义调试基座
-
-- 菜单 -> 运行 -> 运行到手机或模拟器 -> 制作自定义调试基座 (使用自己的包名)
-
- 
-
-7. 在真实的机器或模拟器上运行 ( iOS 仅支持在真机调试 )
-
-- 菜单 -> 运行 -> 运行到手机或模拟器 -> 运行到Android App基座
-
- 
-
-8. 开始开发测试! 🎉
-
-## 音视频通话
-
-一对一音视频通话,多人音视频通话、视频会议请联系邮箱 [contact@openim.io](mailto:contact@openim.io)
-
-## 构建 🚀
-
-### 使用原生App 云打包
-
-- 菜单 -> 发行 -> 原生App-云打包
-
- 
-
-## 功能列表
-
-### 说明
-
-| 功能模块 | 功能项 | 状态 |
-| ------------------ | --------------------------------------------------------- | ---- |
-| **账号功能** | 手机号注册\邮箱注册\验证码登录 | ✅ |
-| | 个人信息查看\修改 | ✅ |
-| | 修改密码\忘记密码 | ✅ |
-| **好友功能** | 查找\申请\搜索\添加\删除好友 | ✅ |
-| | 同意\拒绝好友申请 | ✅ |
-| | 好友备注 | ✅ |
-| | 是否允许添加好友 | ✅ |
-| | 好友列表\好友资料实时同步 | ✅ |
-| **黑名单功能** | 限制消息 | ✅ |
-| | 黑名单列表实时同步 | ✅ |
-| | 添加\移出黑名单 | ✅ |
-| **群组功能** | 创建\解散群组 | ✅ |
-| | 申请加群\邀请加群\退出群组\移除群成员 | ✅ |
-| | 群名/群头像更改/群资料变更通知和实时同步 | ✅ |
-| | 群成员邀请进群 | ✅ |
-| | 群主转让 | ✅ |
-| | 群主、管理员同意进群申请 | ✅ |
-| | 搜索群成员 | ✅ |
-| **消息功能** | 离线消息 | ✅ |
-| | 漫游消息 | ✅ |
-| | 多端消息 | ✅ |
-| | 历史消息 | ✅ |
-| | 消息删除 | ✅ |
-| | 消息清空 | ✅ |
-| | 消息复制 | ✅ |
-| | 单聊正在输入 | ✅ |
-| | 新消息勿扰 | ✅ |
-| | 清空聊天记录 | ✅ |
-| | 新成员查看群聊历史消息 | ✅ |
-| | 新消息提示 | ✅ |
-| | 文本消息 | ✅ |
-| | 图片消息 | ✅ |
-| | 视频消息 | ✅ |
-| | 表情消息 | ✅ |
-| | 文件消息 | ✅ |
-| | 语音消息 | ✅ |
-| | 名片消息 | ✅ |
-| | 地理位置消息 | ✅ |
-| | 自定义消息 | ✅ |
-| **会话功能** | 置顶会话 | ✅ |
-| | 会话已读 | ✅ |
-| | 会话免打扰 | ✅ |
-| **REST API** | 认证管理 | ✅ |
-| | 用户管理 | ✅ |
-| | 关系链管理 | ✅ |
-| | 群组管理 | ✅ |
-| | 会话管理 | ✅ |
-| | 消息管理 | ✅ |
-| **Webhook** | 群组回调 | ✅ |
-| | 消息回调 | ✅ |
-| | 推送回调 | ✅ |
-| | 关系链回调 | ✅ |
-| | 用户回调 | ✅ |
-| **容量和性能** | 1 万好友 | ✅ |
-| | 10 万人大群 | ✅ |
-| | 秒级同步 | ✅ |
-| | 集群部署 | ✅ |
-| | 互踢策略 | ✅ |
-| **在线状态** | 所有平台不互踢 | ✅ |
-| | 每个平台各只能登录一个设备 | ✅ |
-| | PC 端、移动端、Pad 端、Web 端、小程序端各只能登录一个设备 | ✅ |
-| | PC 端不互踢,其他平台总计一个设备 | ✅ |
-| **文件类对象存储** | 支持私有化部署 minio | ✅ |
-| | 支持 COS、OSS、Kodo、S3 公有云 | ✅ |
-| **推送** | 消息在线实时推送 | ✅ |
-| | 消息离线推送,支持个推,Firebase | ✅ |
-
-更多高级功能、音视频通话、视频会议 请联系邮箱 [contact@openim.io](mailto:contact@openim.io)
-
-## 加入社区 :busts_in_silhouette:
-
-- 🚀 [加入我们的 Slack 社区](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q)
-- :eyes: [加入我们的微信群](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg)
-
-## 常见问题
-
-1. 直接运行无法使用?
-
- 答:必须严格按照文档操作,导入原生插件和制作自定义基座才能运行。
-
-2. iOS 制作自定义基座失败?
-
- 答:插件源码不能经过其他操作系统。只能在 MacOS 环境下载插件、制作自定义基座和云打包。
-
-3. 如何使用地图、定位?
- 答: [参考文档](CONFIGKEY.md)
-
-4. 如何使用离线推送?
- 答: [参考文档](CONFIGKEY.md)
-
-## WeUI 风格样式覆盖(新增)
-
-为了让 `uni-ui` / `uView` 的组件样式更接近 WeChat / WeUI 风格,项目中新增了一个覆盖样式文件:
-
-- `styles/weui-overrides.scss`:放置了一组全局覆盖规则(主要调整按钮、列表、导航栏、输入框、标签等)。
-
-如何启用/禁用:
-
-- 本覆盖样式已在 `uni.scss` 中通过 `@import "@/styles/weui-overrides.scss";` 引入,默认启用。
-- 若要还原原样,只需从 `uni.scss` 中移除或注释该 import 行,然后重新编译项目。
-
-如何微调:
-
-- 直接修改 `styles/weui-overrides.scss` 中的规则或颜色变量(顶部使用 `--weui-primary`),保存后重新编译即可生效。
-
-后续建议:如果你希望更深入地定制(例如把主题色变量传递到 uView 的主题编译阶段),我可以帮你把变量提前并修改 `@/uni_modules/uview-ui/theme.scss` 的引入顺序,以在编译时替换主题变量。
-
+```
+conversation详情
+{
+ "conversationID": "si_100003_100004",
+ "conversationType": 1,
+ "userID": "100004",
+ "groupID": "",
+ "showName": "1111",
+ "faceURL": "/static/img/avatar.png",
+ "recvMsgOpt": 2,
+ "unreadCount": 0,
+ "groupAtType": 0,
+ "latestMsg": "{\"clientMsgID\":\"748ac3ce532afd7dc6638ee13154d5f4\",\"serverMsgID\":\"00ba977273b73af7ae8be68e70b24100\",\"createTime\":1764798647940,\"sendTime\":1764798644531,\"sessionType\":1,\"sendID\":\"100004\",\"recvID\":\"100003\",\"msgFrom\":100,\"contentType\":101,\"senderPlatformID\":2,\"senderNickname\":\"131****1111\",\"senderFaceUrl\":\"/static/img/avatar.png\",\"seq\":17,\"isRead\":true,\"status\":2,\"attachedInfo\":\"null\",\"textElem\":{\"content\":\"馃槆馃槆馃槆馃槆馃槆馃槆馃槆馃槆馃槆馃槆馃槆馃槆馃槆馃槆馃槆馃槆馃槆馃槆馃槆馃槆馃槆\"},\"attachedInfoElem\":{\"groupHasReadInfo\":{\"hasReadCount\":0,\"groupMemberCount\":0},\"isPrivateChat\":false,\"burnDuration\":0,\"hasReadTime\":0,\"isEncryption\":false,\"inEncryptStatus\":false}}",
+ "latestMsgSendTime": 1764798644531,
+ "draftText": "",
+ "draftTextTime": 0,
+ "isPinned": true,
+ "isPrivateChat": false,
+ "burnDuration": 0,
+ "isNotInGroup": false,
+ "updateUnreadCountTime": 0,
+ "attachedInfo": "",
+ "ex": "",
+ "maxSeq": 0,
+ "minSeq": 0,
+ "msgDestructTime": 0,
+ "isMsgDestruct": false
+}
+```
+```
+group detail
+{
+ "groupID": "1793688611",
+ "groupName": "5676uy",
+ "notification": "",
+ "introduction": "",
+ "faceURL": "",
+ "createTime": 1764103081757,
+ "status": 0,
+ "creatorUserID": "100003",
+ "groupType": 2,
+ "ownerUserID": "100003",
+ "memberCount": 3,
+ "ex": "",
+ "attachedInfo": "",
+ "needVerification": 0,
+ "lookMemberInfo": 0,
+ "applyMemberFriend": 0,
+ "notificationUpdateTime": 0,
+ "notificationUserID": ""
+}
+```
+```
+group member
+{
+ "groupID": "1793688611",
+ "userID": "100004",
+ "nickname": "131****1111",
+ "faceURL": "/static/img/avatar.png",
+ "roleLevel": 20,
+ "joinTime": 1764103081761,
+ "joinSource": 2,
+ "inviterUserID": "100003",
+ "muteEndTime": 0,
+ "operatorUserID": "100003",
+ "ex": "",
+ "attachedInfo": ""
+}
+```
+```
+user detail
+{
+ "userID": "100003",
+ "nickname": "131****2222",
+ "faceURL": "/static/img/avatar.png",
+ "createTime": 1764100199726,
+ "ex": "",
+ "attachedInfo": "",
+ "globalRecvMsgOpt": 0,
+ "id": 100003,
+ "role_id": 0,
+ "parent_id": null,
+ "group_id": 0,
+ "username": "13122222222",
+ "sex": "1",
+ "email": null,
+ "region": "86",
+ "mobile": "13122222222",
+ "level": 1,
+ "birthday": null,
+ "bio": null,
+ "money": "0.0000000000",
+ "score": 0,
+ "currency1": "0.0000000000",
+ "currency2": "0.0000000000",
+ "currency3": "0.0000000000",
+ "currency4": "0.0000000000",
+ "currency5": "0.0000000000",
+ "currency6": "0.0000000000",
+ "currency7": "0.0000000000",
+ "currency8": "0.0000000000",
+ "currency9": "0.0000000000",
+ "maxsuccessions": 0,
+ "successions": 0,
+ "loginfailure": 0,
+ "prev_time": null,
+ "last_time": 1764833943,
+ "last_ip": "139.202.159.214",
+ "join_time": 1764100199,
+ "join_ip": "139.202.158.3",
+ "token": null,
+ "invite_code": "WBDFAQSL",
+ "online": 0,
+ "status": 1,
+ "created_at": 1764100199,
+ "updated_at": 1764833943,
+ "deleted_at": null
+}
+```
\ No newline at end of file
diff --git a/api/login.js b/api/login.js
index 939e730..86b5c04 100644
--- a/api/login.js
+++ b/api/login.js
@@ -1,4 +1,3 @@
-import { reject } from "lodash";
import config from "@/common/config";
// 登录
diff --git a/components/MyAvatar/index.vue b/components/MyAvatar/index.vue
index 093647c..928f565 100644
--- a/components/MyAvatar/index.vue
+++ b/components/MyAvatar/index.vue
@@ -1,6 +1,6 @@
+ bg-color="#cdcdcd" :defaultUrl="getDdefaultUrl" :shape="shape" :size="size" mode="aspectFill" font-size="14">
diff --git a/components/SettingItem/index.vue b/components/SettingItem/index.vue
index 368c22a..3acf780 100644
--- a/components/SettingItem/index.vue
+++ b/components/SettingItem/index.vue
@@ -1,84 +1,71 @@
-
- {{
- title
- }}
-
-
-
-
-
-
+
+ {{title}}
+
+
+
+
+
+
+ &_border {
+ border-bottom: 1px solid rgba(153, 153, 153, 0.2);
+ }
+ }
+
\ No newline at end of file
diff --git a/components/chunLei-popups.vue b/components/chunLei-popups.vue
index f29503f..10b2747 100644
--- a/components/chunLei-popups.vue
+++ b/components/chunLei-popups.vue
@@ -2,9 +2,9 @@
-
@@ -60,6 +66,7 @@
title: "我的好友",
},
],
+ limit:0,
};
},
computed: {
@@ -99,16 +106,17 @@
},
},
onLoad(options) {
- const {groupID,type,checkedUserIDList,} = options;
- console.log(this.storeFriendList);
+ const {groupID,type,checkedUserIDList,limit} = options;
+ //console.log(this.storeFriendList);
this.type = type;
this.groupID = groupID;
- this.checkedUserIDList = checkedUserIDList ?
- JSON.parse(checkedUserIDList) :
- [];
+ this.checkedUserIDList = checkedUserIDList ? JSON.parse(checkedUserIDList) : [];
if (this.type === ContactChooseTypes.Invite) {
this.checkDisabledUser();
}
+ if(limit){
+ this.limit = limit;
+ }
},
methods: {
checkDisabledUser() {
@@ -131,16 +139,19 @@
this.updateCheckedUser(item);
}
},
- updateCheckedUser({
- userID
- }) {
- if (this.checkedUserIDList.includes(userID)) {
- const idx = this.checkedUserIDList.findIndex((item) => item === userID);
- const tmpArr = [...this.checkedUserIDList];
- tmpArr.splice(idx, 1);
- this.checkedUserIDList = [...tmpArr];
- } else {
- this.checkedUserIDList = [...this.checkedUserIDList, userID];
+ updateCheckedUser({userID}) {
+ if(this.limit == 1){
+ this.checkedUserIDList = [userID];
+ this.confirm();
+ }else{
+ if (this.checkedUserIDList.includes(userID)) {
+ const idx = this.checkedUserIDList.findIndex((item) => item === userID);
+ const tmpArr = [...this.checkedUserIDList];
+ tmpArr.splice(idx, 1);
+ this.checkedUserIDList = [...tmpArr];
+ } else {
+ this.checkedUserIDList = [...this.checkedUserIDList, userID];
+ }
}
},
confirm() {
@@ -215,7 +226,7 @@
.title {
height: 60rpx;
display: flex;
- justify-content: start;
+ justify-content: flex-start;
align-items: center;
// padding: 16rpx 8rpx;
background: #f8f9fa;
diff --git a/pages/common/createGroup/index.vue b/pages/common/createGroup/index.vue
index 0a958e3..02e7c5d 100644
--- a/pages/common/createGroup/index.vue
+++ b/pages/common/createGroup/index.vue
@@ -88,9 +88,7 @@ export default {
(member) => member.userID,
);
uni.navigateTo({
- url: `/pages/common/contactChoose/index?type=${
- ContactChooseTypes.GetList
- }&checkedUserIDList=${JSON.stringify(checkedIDList)}`,
+ url: `/pages/common/contactChoose/index?type=${ContactChooseTypes.GetList}&checkedUserIDList=${JSON.stringify(checkedIDList)}`,
});
},
complateCreate() {
diff --git a/pages/common/userCard/index.vue b/pages/common/userCard/index.vue
index 8cdf208..d459bfa 100644
--- a/pages/common/userCard/index.vue
+++ b/pages/common/userCard/index.vue
@@ -109,6 +109,7 @@
const info = JSON.parse(sourceInfo);
this.sourceID = info.userID;
}
+ //console.log(this.storeSelfInfo);
this.getSourceUserInfo();
},
methods: {
diff --git a/pages/contact/switchJoinGroup/index.vue b/pages/contact/switchJoinGroup/index.vue
index aba142c..42f0fc7 100644
--- a/pages/contact/switchJoinGroup/index.vue
+++ b/pages/contact/switchJoinGroup/index.vue
@@ -86,7 +86,7 @@ export default {
}
::v-deep .action_item {
- align-items: start;
+ align-items: flex-start;
}
.action_item:last-child {
diff --git a/pages/conversation/chating/components/ChatingFooter/index.vue b/pages/conversation/chating/components/ChatingFooter/index.vue
index 9ca4629..b0598e6 100644
--- a/pages/conversation/chating/components/ChatingFooter/index.vue
+++ b/pages/conversation/chating/components/ChatingFooter/index.vue
@@ -3,10 +3,8 @@