From 69a61178e1a1aaf57efa7c62a39960bdde5faf6e Mon Sep 17 00:00:00 2001 From: cansnow Date: Fri, 5 Dec 2025 16:10:52 +0800 Subject: [PATCH] 10 --- App.vue | 43 +- Readme.md | 367 +++------ api/login.js | 1 - components/MyAvatar/index.vue | 2 +- components/SettingItem/index.vue | 137 ++-- components/chunLei-popups.vue | 4 +- constant/comp.js | 1 + manifest.json | 5 + package.json | 1 - pages.json | 26 + pages/common/contactChoose/choose.vue | 367 +++++++++ pages/common/contactChoose/index.vue | 49 +- pages/common/createGroup/index.vue | 4 +- pages/common/userCard/index.vue | 1 + pages/contact/switchJoinGroup/index.vue | 2 +- .../components/ChatingFooter/index.vue | 24 +- .../chating/components/ChatingList.vue | 69 +- .../chating/components/MessageItem/index.vue | 86 ++- .../chating/components/SelectFooter.vue | 39 + .../chating/components/SelectHeader.vue | 64 ++ pages/conversation/chating/index.vue | 278 ++++++- .../components/ChatHeader.vue | 4 +- .../components/ConversationItem.vue | 28 +- pages/conversation/conversationList/index.vue | 126 ++- pages/conversation/groupManage/index.vue | 128 +-- .../groupSettings/announcement.vue | 67 ++ .../components/GroupMemberRow.vue | 31 +- pages/conversation/groupSettings/index.vue | 731 ++++++++++-------- pages/conversation/groupSettings/manage.vue | 22 + pages/conversation/groupSettings/qrcode.vue | 22 + pages/conversation/singleSettings/index.vue | 50 +- .../updateGroupOrNickname/index.vue | 2 +- pages/login/index.vue | 8 +- .../friend-circle/components/circleItem.vue | 289 +++++++ .../friend-circle/components/header.vue | 8 + .../workbench/friend-circle/friend-circle.vue | 211 +---- .../friend-circle/releaseFriendCircle.vue | 63 +- static/images/chat/longTipIcon/delete.png | Bin 0 -> 1929 bytes static/images/chat/longTipIcon/select.png | Bin 0 -> 3480 bytes store/modules/circle.js | 7 +- store/modules/message.js | 33 +- styles/global.scss | 17 + types/AtUserInfo.ts | 5 + types/AttachedInfoElem.ts | 9 + types/CardElem.ts | 7 + types/CustomElem.ts | 6 + types/FaceElem.ts | 5 + types/FileElem.ts | 8 + types/GroupHasReadInfo.ts | 6 + types/LocationElem.ts | 6 + types/MergeElem.ts | 7 + types/MessageItem.ts | 62 ++ types/NotificationElem.ts | 4 + types/OfflinePushInfo.ts | 9 + types/PictureElem.ts | 8 + types/PictureInfo.ts | 9 + types/QuoteElem.ts | 7 + types/SoundElem.ts | 8 + types/TextElem.ts | 4 + types/TypingElem.ts | 4 + types/VideoElem.ts | 15 + types/atTextElem.ts | 10 + types/index.ts | 15 + util/index.js | 85 +- 64 files changed, 2575 insertions(+), 1141 deletions(-) create mode 100644 pages/common/contactChoose/choose.vue create mode 100644 pages/conversation/chating/components/SelectFooter.vue create mode 100644 pages/conversation/chating/components/SelectHeader.vue create mode 100644 pages/conversation/groupSettings/announcement.vue create mode 100644 pages/conversation/groupSettings/manage.vue create mode 100644 pages/conversation/groupSettings/qrcode.vue create mode 100644 pages/workbench/friend-circle/components/circleItem.vue create mode 100644 pages/workbench/friend-circle/components/header.vue create mode 100644 static/images/chat/longTipIcon/delete.png create mode 100644 static/images/chat/longTipIcon/select.png create mode 100644 types/AtUserInfo.ts create mode 100644 types/AttachedInfoElem.ts create mode 100644 types/CardElem.ts create mode 100644 types/CustomElem.ts create mode 100644 types/FaceElem.ts create mode 100644 types/FileElem.ts create mode 100644 types/GroupHasReadInfo.ts create mode 100644 types/LocationElem.ts create mode 100644 types/MergeElem.ts create mode 100644 types/MessageItem.ts create mode 100644 types/NotificationElem.ts create mode 100644 types/OfflinePushInfo.ts create mode 100644 types/PictureElem.ts create mode 100644 types/PictureInfo.ts create mode 100644 types/QuoteElem.ts create mode 100644 types/SoundElem.ts create mode 100644 types/TextElem.ts create mode 100644 types/TypingElem.ts create mode 100644 types/VideoElem.ts create mode 100644 types/atTextElem.ts create mode 100644 types/index.ts 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 程序。 - -

- Preview - - Preview -

- -## 授权许可 :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 - - ![](./docs/images/appid.png) - -5. 导入原生插件 - -- 使用 Hbuilder 打开 manifest.json - - ![](./docs/images/plugin.png) - -- 选择云插件需要选择您的项目 Appid 和输入 Android 包名称 - - ![](./docs/images/download.png) - -6. 云打包自定义调试基座 - -- 菜单 -> 运行 -> 运行到手机或模拟器 -> 制作自定义调试基座 (使用自己的包名) - - ![](./docs/images/dev.png) - -7. 在真实的机器或模拟器上运行 ( iOS 仅支持在真机调试 ) - -- 菜单 -> 运行 -> 运行到手机或模拟器 -> 运行到Android App基座 - - ![](./docs/images/run_dev.png) - -8. 开始开发测试! 🎉 - -## 音视频通话 - -一对一音视频通话,多人音视频通话、视频会议请联系邮箱 [contact@openim.io](mailto:contact@openim.io) - -## 构建 🚀 - -### 使用原生App 云打包 - -- 菜单 -> 发行 -> 原生App-云打包 - - ![](./docs/images/build.png) - -## 功能列表 - -### 说明 - -| 功能模块 | 功能项 | 状态 | -| ------------------ | --------------------------------------------------------- | ---- | -| **账号功能** | 手机号注册\邮箱注册\验证码登录 | ✅ | -| | 个人信息查看\修改 | ✅ | -| | 修改密码\忘记密码 | ✅ | -| **好友功能** | 查找\申请\搜索\添加\删除好友 | ✅ | -| | 同意\拒绝好友申请 | ✅ | -| | 好友备注 | ✅ | -| | 是否允许添加好友 | ✅ | -| | 好友列表\好友资料实时同步 | ✅ | -| **黑名单功能** | 限制消息 | ✅ | -| | 黑名单列表实时同步 | ✅ | -| | 添加\移出黑名单 | ✅ | -| **群组功能** | 创建\解散群组 | ✅ | -| | 申请加群\邀请加群\退出群组\移除群成员 | ✅ | -| | 群名/群头像更改/群资料变更通知和实时同步 | ✅ | -| | 群成员邀请进群 | ✅ | -| | 群主转让 | ✅ | -| | 群主、管理员同意进群申请 | ✅ | -| | 搜索群成员 | ✅ | -| **消息功能** | 离线消息 | ✅ | -| | 漫游消息 | ✅ | -| | 多端消息 | ✅ | -| | 历史消息 | ✅ | -| | 消息删除 | ✅ | -| | 消息清空 | ✅ | -| | 消息复制 | ✅ | -| | 单聊正在输入 | ✅ | -| | 新消息勿扰 | ✅ | -| | 清空聊天记录 | ✅ | -| | 新成员查看群聊历史消息 | ✅ | -| | 新消息提示 | ✅ | -| | 文本消息 | ✅ | -| | 图片消息 | ✅ | -| | 视频消息 | ✅ | -| | 表情消息 | ✅ | -| | 文件消息 | ✅ | -| | 语音消息 | ✅ | -| | 名片消息 | ✅ | -| | 地理位置消息 | ✅ | -| | 自定义消息 | ✅ | -| **会话功能** | 置顶会话 | ✅ | -| | 会话已读 | ✅ | -| | 会话免打扰 | ✅ | -| **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 @@ 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 @@ + &_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 @@ - - + + - - + + - - + + + @@ -19,10 +24,7 @@ @@ -255,4 +268,16 @@ .fade-enter { opacity: 0; } + .msg_item{ + display: flex; + flex-direction: row; + align-items: flex-start; + width: 100%; + .message_item{ + flex:1; + } + .selectedIcon{ + margin-top: 20rpx; + } + } \ No newline at end of file diff --git a/pages/conversation/chating/components/MessageItem/index.vue b/pages/conversation/chating/components/MessageItem/index.vue index 38dd2f3..56be114 100644 --- a/pages/conversation/chating/components/MessageItem/index.vue +++ b/pages/conversation/chating/components/MessageItem/index.vue @@ -15,7 +15,7 @@ - + @@ -26,11 +26,12 @@ - + {{ getNoticeContent }} @@ -74,7 +75,6 @@ toolTipFlag: false, popPostion:"default", toolTipData: [], - }; }, computed: { @@ -137,9 +137,17 @@ }, 2000); } }, - longtap(e){ - console.log(e.target,e.currentTarget); - this.showToolTip(e); + longtapEvent(e){ + console.log('longtapEvent'); + // console.log("#"+e.currentTarget.id,e); + // let view = uni.createSelectorQuery().in(this).select("#"+e.currentTarget.id.replace('message_content_wrap_','auchor')); + // console.log(e.touches[0].clientX,e.touches[0].clientY); + // view.boundingClientRect((data) => { + // console.log(data.left,data.top); + // //console.log("得到布局位置信息" + JSON.stringify(data)); + // }).exec(); + this.$emit('userEvent',{type:"longtapMsgContent"},this.source); + //this.showToolTip(e); }, //操作项 showToolTip: function(e) { @@ -158,11 +166,23 @@ disabled: false }, { - id: 5, - icon: '/static/images/chat/longTipIcon/tag.png', - title: '编辑', + id: 6, + icon: '/static/images/chat/longTipIcon/select.png', + title: '多选', disabled: false - } + }, + { + id: 7, + icon: '/static/images/chat/longTipIcon/delete.png', + title: '删除', + disabled: false + }, + // { + // id: 5, + // icon: '/static/images/chat/longTipIcon/tag.png', + // title: '编辑', + // disabled: false + // } ]; that.toolTipX =e.touches[0].clientX; that.toolTipY = e.touches[0].clientY-20; @@ -184,18 +204,19 @@ tapPopup(e) { let that = this; let currentHandleMsg=that.source; + console.log(currentHandleMsg); if (e.title == "撤回") { - let editMessage=JSON.parse(JSON.stringify(currentHandleMsg)); - that.$emit("revertMsg",editMessage) that.toolTipFlag = false; + that.$emit('userEvent',{type:'revokeMessage'},that.source); } if (e.title == "复制") { - let content = currentHandleMsg.content; + let content = currentHandleMsg.textElem?.content; if (content) { let copyContent =content.text; - let formatStr = this.replaceReseverEmoji(copyContent); - that.globalUtil.uniCopy({ - content: formatStr, + let formatStr = copyContent; + //let formatStr = this.replaceReseverEmoji(copyContent); + uni.setClipboardData({ + data:formatStr, success: (res) => { uni.showToast({ title: res, @@ -215,15 +236,8 @@ return; } if (e.title == "转发") { + that.$emit('userEvent',{type:'forward'},that.source); that.toolTipFlag = false; - /* that.$u.route({ - url: '/pages/chat/chatGroup/msgForward', - params: { - msgList:encodeURIComponent(JSON.stringify([currentHandleMsg])), - sendType: 1, //1 单条转发 2多条转发 - fromChatGroupId: currentHandleMsg.groupId - } - }) */ return } if(e.title=="调换"){ @@ -231,24 +245,16 @@ return; } if (e.title == "多选") { + that.$emit('userEvent',{type:'select'},that.source); that.toolTipFlag = false; - /* that.$u.route({ - url: '/pages/chat/chatting/chatting-checkbox', - params: { - groupId:currentHandleMsg.groupId, - pageNum:1, - selectMsgId: currentHandleMsg.id, - } - }) */ return } - if(e.title=="编辑"){ - let editMessage=JSON.parse(JSON.stringify(currentHandleMsg)); - editMessage.formatTimeStr=currentHandleMsg.createTime; - that.$emit("showUpdateMsg",editMessage) + if (e.title == "删除") { that.toolTipFlag = false; - return; + that.$emit('userEvent',{type:'deleteMsg'},that.source); + return } + }, }, }; @@ -289,7 +295,7 @@ flex-direction: column; align-items: flex-start; margin-left: 20rpx; - // text-align: start; + // text-align: flex-start; max-width: 80%; position: relative; @@ -307,7 +313,7 @@ } .message_content_wrap { @include vCenterBox(); - text-align: start; + text-align: flex-start; // font-size: 14px; color: $uni-text-color; width: fit-content; @@ -316,7 +322,7 @@ .bg_container { padding: 16rpx 24rpx; - border-radius: 0rpx 12rpx 12rpx 12rpx; + border-radius: 12rpx; background-color: #fff; } } diff --git a/pages/conversation/chating/components/SelectFooter.vue b/pages/conversation/chating/components/SelectFooter.vue new file mode 100644 index 0000000..7fe7215 --- /dev/null +++ b/pages/conversation/chating/components/SelectFooter.vue @@ -0,0 +1,39 @@ + + + + + \ No newline at end of file diff --git a/pages/conversation/chating/components/SelectHeader.vue b/pages/conversation/chating/components/SelectHeader.vue new file mode 100644 index 0000000..67407af --- /dev/null +++ b/pages/conversation/chating/components/SelectHeader.vue @@ -0,0 +1,64 @@ + + + + + \ No newline at end of file diff --git a/pages/conversation/chating/index.vue b/pages/conversation/chating/index.vue index c0037af..5291324 100644 --- a/pages/conversation/chating/index.vue +++ b/pages/conversation/chating/index.vue @@ -1,32 +1,40 @@ @@ -78,9 +78,17 @@ + .setting_row { + background-color: #fff; + margin: 24rpx 24rpx 0; + border-radius: 6px; + overflow: hidden; + } + } + \ No newline at end of file diff --git a/pages/conversation/groupSettings/announcement.vue b/pages/conversation/groupSettings/announcement.vue new file mode 100644 index 0000000..0387481 --- /dev/null +++ b/pages/conversation/groupSettings/announcement.vue @@ -0,0 +1,67 @@ + + + + + \ No newline at end of file diff --git a/pages/conversation/groupSettings/components/GroupMemberRow.vue b/pages/conversation/groupSettings/components/GroupMemberRow.vue index ff11aaf..6b1a675 100644 --- a/pages/conversation/groupSettings/components/GroupMemberRow.vue +++ b/pages/conversation/groupSettings/components/GroupMemberRow.vue @@ -1,12 +1,12 @@ + .sub_title { + @include nomalEllipsis(); + margin-bottom: 0; + font-size: 28rpx; + color: #999; + } + } + } + } + \ No newline at end of file diff --git a/pages/conversation/groupSettings/manage.vue b/pages/conversation/groupSettings/manage.vue new file mode 100644 index 0000000..87b6899 --- /dev/null +++ b/pages/conversation/groupSettings/manage.vue @@ -0,0 +1,22 @@ + + + + + \ No newline at end of file diff --git a/pages/conversation/groupSettings/qrcode.vue b/pages/conversation/groupSettings/qrcode.vue new file mode 100644 index 0000000..87b6899 --- /dev/null +++ b/pages/conversation/groupSettings/qrcode.vue @@ -0,0 +1,22 @@ + + + + + \ No newline at end of file diff --git a/pages/conversation/singleSettings/index.vue b/pages/conversation/singleSettings/index.vue index 0cd946a..5ef4fbc 100644 --- a/pages/conversation/singleSettings/index.vue +++ b/pages/conversation/singleSettings/index.vue @@ -2,27 +2,37 @@ - - - - - - + + + + + + + + + + + + + + + + + diff --git a/pages/conversation/updateGroupOrNickname/index.vue b/pages/conversation/updateGroupOrNickname/index.vue index 9a800dc..6797960 100644 --- a/pages/conversation/updateGroupOrNickname/index.vue +++ b/pages/conversation/updateGroupOrNickname/index.vue @@ -2,7 +2,7 @@ - 保存 + 保存 diff --git a/pages/login/index.vue b/pages/login/index.vue index 1ba024d..f079c65 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -107,6 +107,7 @@ export default { }, onLoad(options) { const _this = this; + // #ifdef APP plus.runtime.getProperty(plus.runtime.appid, (inf) => { console.log(inf); _this.appversion = inf.version @@ -114,6 +115,7 @@ export default { // if(options.isRedirect){ // plus.navigator.closeSplashscreen(); // } + // #endif this.init(); }, methods: { @@ -166,10 +168,12 @@ export default { code: this.loginInfo.verificationCode, }); const { imToken, userID } = data; + // #ifdef APP await IMSDK.asyncApi(IMSDK.IMMethods.Login, uuidv4(), { userID, token: imToken, }); + // #endif this.saveLoginProfile(data); this.$store.commit("user/SET_AUTH_DATA", data); this.$store.dispatch("user/getSelfInfo"); @@ -274,8 +278,8 @@ export default { .logo { display: flex; flex-direction: column; - justify-content: start; - align-items: start; + justify-content: flex-start; + align-items: flex-start; img { width: 160rpx; diff --git a/pages/workbench/friend-circle/components/circleItem.vue b/pages/workbench/friend-circle/components/circleItem.vue new file mode 100644 index 0000000..755234b --- /dev/null +++ b/pages/workbench/friend-circle/components/circleItem.vue @@ -0,0 +1,289 @@ + + + + + \ No newline at end of file diff --git a/pages/workbench/friend-circle/components/header.vue b/pages/workbench/friend-circle/components/header.vue new file mode 100644 index 0000000..02409e3 --- /dev/null +++ b/pages/workbench/friend-circle/components/header.vue @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/pages/workbench/friend-circle/friend-circle.vue b/pages/workbench/friend-circle/friend-circle.vue index 7446cce..ed313a3 100644 --- a/pages/workbench/friend-circle/friend-circle.vue +++ b/pages/workbench/friend-circle/friend-circle.vue @@ -1,7 +1,14 @@