diff --git a/src/pages.json b/src/pages.json index 31a6aca..ce3ce4c 100644 --- a/src/pages.json +++ b/src/pages.json @@ -82,6 +82,14 @@ "navigationStyle": "custom", "enablePullDownRefresh": false } + }, + { + "path": "pages/chatSettings/index", + "type": "page", + "style": { + "navigationStyle": "custom", + "enablePullDownRefresh": false + } } ], "globalStyle": { diff --git a/src/pages/chatSettings/components/settingFormItem.vue b/src/pages/chatSettings/components/settingFormItem.vue new file mode 100644 index 0000000..2ea0871 --- /dev/null +++ b/src/pages/chatSettings/components/settingFormItem.vue @@ -0,0 +1,73 @@ + + + + + {{ item.label }} + + + + {{ item.value }} + + + + + + + {{ item.subValue }} + + + + + diff --git a/src/pages/chatSettings/index.vue b/src/pages/chatSettings/index.vue new file mode 100644 index 0000000..77e8136 --- /dev/null +++ b/src/pages/chatSettings/index.vue @@ -0,0 +1,494 @@ + + + + + + + + + {{ $t('index.chat.settings') }} + + + + + + + + + + + + {{ groupName }} + + {{ '(' + groupNum + ')' }} + + + + {{ groupType }} + + + + + + + + + + + + + + + + {{ memberItem.avatar }} + + + + + {{ $t('group.identify.admin') }} + + + + + {{ memberItem.name }} + + + + + + + + + + + + + + + + + + {{ item.value }} + + + + + + + + + + + + + + + + + {{ $t('chat.settings.clearChatRecord') }} + + + + + {{ $t('group.disband.btn') }} + + + + + {{ $t('group.quit.btn') }} + + + + + + + + + + diff --git a/src/pages/dialog/index.vue b/src/pages/dialog/index.vue index c779c98..f7ee122 100644 --- a/src/pages/dialog/index.vue +++ b/src/pages/dialog/index.vue @@ -8,7 +8,7 @@ - + @@ -680,6 +680,13 @@ const initData = async () => { zpagingRef.value?.complete(records.value) } +//点击跳转到聊天设置页面 +const toChatSettingsPage = () => { + uni.navigateTo({ + url: '/pages/chatSettings/index' + }) +} + onMounted(async () => { initData() }) diff --git a/src/pages/search/components/searchItem.vue b/src/pages/search/components/searchItem.vue index 0258d60..d1ca369 100644 --- a/src/pages/search/components/searchItem.vue +++ b/src/pages/search/components/searchItem.vue @@ -228,7 +228,7 @@ const resultDetail = computed(() => { result_detail = t('search.result.include') + result_detail break case 'extra': - result_detail = JSON.parse(props.searchItem?.extra).content + result_detail = props.searchItem?.extra break default: result_detail = '' diff --git a/src/pages/search/components/searchList.vue b/src/pages/search/components/searchList.vue index 67b59a8..fb6401d 100644 --- a/src/pages/search/components/searchList.vue +++ b/src/pages/search/components/searchList.vue @@ -29,8 +29,11 @@ :round="1" prefix="tmicon-search" prefixColor="#46299D" + :prefixLabel="state?.first_talk_record_infos?.receiver_name" v-model.lazy="state.searchText" @input="inputSearchText" + :showClear="true" + @clear="clearInput" > { } }) +//清除输入的搜索内容 +const clearInput = () => { + inputSearchText('') +} + //输入搜索文本 const inputSearchText = (e) => { // console.log(e) @@ -254,7 +262,11 @@ const queryAllSearch = (pageNum, searchResultPageSize) => { data.last_group_id, data.last_member_id, ) - zPaging.value?.completeByTotal([data], data.count) + let total = data.count + if (props.searchRecordDetail) { + total = data.group_record_count + } + zPaging.value?.completeByTotal([data], total) } else { zPaging.value?.complete([data]) } @@ -377,6 +389,11 @@ const clickSearchItem = (searchResultKey, searchItem) => { width: 100%; } + .searchRoot_input::v-deep .tmicon-times-circle-fill::before { + content: '\e82a'; + color: #d2d2d5; + } + .searchRoot_cancelBtn { line-height: 44rpx; color: $theme-primary; diff --git a/src/pages/search/moreResult/moreResult.vue b/src/pages/search/moreResult/moreResult.vue index 3b99442..d946698 100644 --- a/src/pages/search/moreResult/moreResult.vue +++ b/src/pages/search/moreResult/moreResult.vue @@ -28,11 +28,13 @@ const state = reactive({ apiRequest: Function, apiParams: String, searchText: String, + searchResultKey: String, }) onLoad((options) => { console.log(options) if (options.searchResultKey) { + state.searchResultKey = options.searchResultKey if (options.searchResultKey === 'user_infos') { state.apiParams = encodeURIComponent( JSON.stringify({ @@ -85,9 +87,11 @@ const lastIdChange = (last_id, last_group_id, last_member_id) => { //点击了搜索结果项 const clickSearchItem = (searchText) => { - uni.navigateTo({ - url: '/pages/search/moreResult/moreResultDetail?searchText=' + searchText, - }) + if (state.searchResultKey === 'general_infos') { + uni.navigateTo({ + url: '/pages/search/moreResult/moreResultDetail?searchText=' + searchText, + }) + } } diff --git a/src/pages/search/moreResult/moreResultDetail.vue b/src/pages/search/moreResult/moreResultDetail.vue index e493eb7..163b444 100644 --- a/src/pages/search/moreResult/moreResultDetail.vue +++ b/src/pages/search/moreResult/moreResultDetail.vue @@ -9,6 +9,7 @@ :searchText="state.searchText" :isPagination="true" :searchRecordDetail="true" + @lastIdChange="lastIdChange" > @@ -48,5 +49,23 @@ onLoad((options) => { console.log(JSON.parse(decodeURIComponent(state.apiParams))) }) + +//分页查询时,最后一条id变化 +const lastIdChange = (last_id, last_group_id, last_member_id) => { + let idChanges = { + last_id, + last_group_id, + last_member_id, + } + state.apiParams = encodeURIComponent( + JSON.stringify( + Object.assign( + {}, + JSON.parse(decodeURIComponent(state.apiParams)), + idChanges, + ), + ), + ) +} diff --git a/src/static/image/chatSettings/edit-btn.png b/src/static/image/chatSettings/edit-btn.png new file mode 100644 index 0000000..58d371c Binary files /dev/null and b/src/static/image/chatSettings/edit-btn.png differ diff --git a/src/static/image/chatSettings/pointer.png b/src/static/image/chatSettings/pointer.png new file mode 100644 index 0000000..c026df4 Binary files /dev/null and b/src/static/image/chatSettings/pointer.png differ diff --git a/src/static/image/chatSettings/recordSearchTypeDate.png b/src/static/image/chatSettings/recordSearchTypeDate.png new file mode 100644 index 0000000..747cc79 Binary files /dev/null and b/src/static/image/chatSettings/recordSearchTypeDate.png differ diff --git a/src/static/image/chatSettings/recordSearchTypeFiles.png b/src/static/image/chatSettings/recordSearchTypeFiles.png new file mode 100644 index 0000000..a0d60a5 Binary files /dev/null and b/src/static/image/chatSettings/recordSearchTypeFiles.png differ diff --git a/src/static/image/chatSettings/recordSearchTypeGroupMembers.png b/src/static/image/chatSettings/recordSearchTypeGroupMembers.png new file mode 100644 index 0000000..ab31147 Binary files /dev/null and b/src/static/image/chatSettings/recordSearchTypeGroupMembers.png differ diff --git a/src/static/image/chatSettings/recordSearchTypeImgAndVideo.png b/src/static/image/chatSettings/recordSearchTypeImgAndVideo.png new file mode 100644 index 0000000..0c63bf3 Binary files /dev/null and b/src/static/image/chatSettings/recordSearchTypeImgAndVideo.png differ diff --git a/src/static/image/chatSettings/recordSearchTypeLink.png b/src/static/image/chatSettings/recordSearchTypeLink.png new file mode 100644 index 0000000..4182cb1 Binary files /dev/null and b/src/static/image/chatSettings/recordSearchTypeLink.png differ diff --git a/src/uni_modules/tmui/locale/zh-Hans.json b/src/uni_modules/tmui/locale/zh-Hans.json index 299741d..14e8854 100644 --- a/src/uni_modules/tmui/locale/zh-Hans.json +++ b/src/uni_modules/tmui/locale/zh-Hans.json @@ -82,5 +82,23 @@ "search.result.include": "包含:", "has_more": "更多", "index.type.company": "公司", - "search.result.relevant": "相关" + "search.result.relevant": "相关", + "index.chat.settings": "聊天设置", + "chat.settings.clearChatRecord": "清空聊天记录", + "chat.settings.groupName": "群名称", + "chat.settings.groupNotice": "群公告", + "chat.settings.groupType": "群类型", + "chat.settings.topSession": "置顶会话", + "chat.settings.messageNoDisturb": "消息免打扰", + "chat.settings.groupGag": "群内禁言", + "chat.settings.groupAdmin": "群管理员", + "chat.settings.groupMember": "群成员", + "search.chat.record": "搜索聊天记录", + "record.searchType.date": "日期", + "record.searchType.imgAndVideo": "图片及视频", + "record.searchType.files": "文件", + "record.searchType.link": "链接", + "group.identify.admin": "管理员", + "group.disband.btn": "解散该群", + "group.quit.btn": "退出群聊" }