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Hjn!7T(Iq5XW)<$rJtm~FmBBPHaZ261F+Ec&8N3_82dZiq*LUQEq3WvgXq14
z=)L(PlYS=p*Xp?XG|*yI^xwQ{^#IJ#v|HOZXXobTMuC)>?(f-qfMUL+Tz1YNH;8?@zaQ(~-a2Sy
z9&CU%ScaPZLR%Hcy67BH>#x-X+7{d1LdM~@4Clkc4d$Vj4-KXYtb^f_-Mh`S9vI}VV?
zslT`1@oL$fz7s(Fx9#RE=O(!;0J*PZ!#YJw;MQeq&V^DgM6TU*q1^rb{aMfv745R`
z
Date: Fri, 27 Dec 2024 16:57:32 +0800
Subject: [PATCH 02/12] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=90=9C=E7=B4=A2=E5=86=85=E5=AE=B9=E9=AB=98?=
=?UTF-8?q?=E4=BA=AE=E6=98=BE=E7=A4=BA=EF=BC=8C=E5=B9=B6=E5=A4=84=E7=90=86?=
=?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=95=B0=E6=8D=AE=E6=A0=BC=E5=BC=8F=EF=BC=8C?=
=?UTF-8?q?=E6=8B=BC=E6=8E=A5=E5=B1=95=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 2 +-
pnpm-lock.yaml | 62 +++----
src/pages/search/components/highLightText.vue | 70 ++++++++
src/pages/search/components/searchItem.vue | 163 +++++++++---------
src/pages/search/index.vue | 42 ++++-
src/static/css/color.scss | 1 +
src/uni_modules/tmui/locale/zh-Hans.json | 5 +-
7 files changed, 230 insertions(+), 115 deletions(-)
create mode 100644 src/pages/search/components/highLightText.vue
diff --git a/package.json b/package.json
index ccf5355..fb66a73 100644
--- a/package.json
+++ b/package.json
@@ -39,7 +39,7 @@
"quill-mention": "^6.0.2",
"vconsole": "^3.15.1",
"vue": "^3.3.8",
- "vue-i18n": "^9.6.5"
+ "vue-i18n": "11.0.0-rc.1"
},
"devDependencies": {
"@dcloudio/types": "^3.4.7",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 26ae4d6..591bdda 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -93,8 +93,8 @@ importers:
specifier: ^3.3.8
version: 3.4.35(typescript@5.5.4)
vue-i18n:
- specifier: ^9.6.5
- version: 9.13.1(vue@3.4.35(typescript@5.5.4))
+ specifier: 11.0.0-rc.1
+ version: 11.0.0-rc.1(vue@3.4.35(typescript@5.5.4))
devDependencies:
'@dcloudio/types':
specifier: ^3.4.7
@@ -1391,26 +1391,26 @@ packages:
'@iconify/utils@2.1.32':
resolution: {integrity: sha512-LeifFZPPKu28O3AEDpYJNdEbvS4/ojAPyIW+pF/vUpJTYnbTiXUHkCh0bwgFRzKvdpb8H4Fbfd/742++MF4fPQ==}
+ '@intlify/core-base@11.0.0-rc.1':
+ resolution: {integrity: sha512-fnfZoa9pb1dKM3L1UkDUGLLrPFQ2BK98x4/fMqwS/fktUor34vQR/itPtfv652ZTplenXXLCEYjUYTGfDZgMTQ==}
+ engines: {node: '>= 16'}
+
'@intlify/core-base@9.1.9':
resolution: {integrity: sha512-x5T0p/Ja0S8hs5xs+ImKyYckVkL4CzcEXykVYYV6rcbXxJTe2o58IquSqX9bdncVKbRZP7GlBU1EcRaQEEJ+vw==}
engines: {node: '>= 10'}
- '@intlify/core-base@9.13.1':
- resolution: {integrity: sha512-+bcQRkJO9pcX8d0gel9ZNfrzU22sZFSA0WVhfXrf5jdJOS24a+Bp8pozuS9sBI9Hk/tGz83pgKfmqcn/Ci7/8w==}
- engines: {node: '>= 16'}
-
'@intlify/devtools-if@9.1.9':
resolution: {integrity: sha512-oKSMKjttG3Ut/1UGEZjSdghuP3fwA15zpDPcjkf/1FjlOIm6uIBGMNS5jXzsZy593u+P/YcnrZD6cD3IVFz9vQ==}
engines: {node: '>= 10'}
+ '@intlify/message-compiler@11.0.0-rc.1':
+ resolution: {integrity: sha512-TGw2uBfuTFTegZf/BHtUQBEKxl7Q/dVGLoqRIdw8lFsp9g/53sYn5iD+0HxIzdYjbWL6BTJMXCPUHp9PxDTRPw==}
+ engines: {node: '>= 16'}
+
'@intlify/message-compiler@9.1.9':
resolution: {integrity: sha512-6YgCMF46Xd0IH2hMRLCssZI3gFG4aywidoWQ3QP4RGYQXQYYfFC54DxhSgfIPpVoPLQ+4AD29eoYmhiHZ+qLFQ==}
engines: {node: '>= 10'}
- '@intlify/message-compiler@9.13.1':
- resolution: {integrity: sha512-SKsVa4ajYGBVm7sHMXd5qX70O2XXjm55zdZB3VeMFCvQyvLew/dLvq3MqnaIsTMF1VkkOb9Ttr6tHcMlyPDL9w==}
- engines: {node: '>= 16'}
-
'@intlify/message-resolver@9.1.9':
resolution: {integrity: sha512-Lx/DBpigeK0sz2BBbzv5mu9/dAlt98HxwbG7xLawC3O2xMF9MNWU5FtOziwYG6TDIjNq0O/3ZbOJAxwITIWXEA==}
engines: {node: '>= 10'}
@@ -1419,14 +1419,14 @@ packages:
resolution: {integrity: sha512-XgPw8+UlHCiie3fI41HPVa/VDJb3/aSH7bLhY1hJvlvNV713PFtb4p4Jo+rlE0gAoMsMCGcsiT982fImolSltg==}
engines: {node: '>= 10'}
+ '@intlify/shared@11.0.0-rc.1':
+ resolution: {integrity: sha512-8tR1xe7ZEbkabTuE/tNhzpolygUn9OaYp9yuYAF4MgDNZg06C3Qny80bes2/e9/Wm3aVkPUlCw6WgU7mQd0yEg==}
+ engines: {node: '>= 16'}
+
'@intlify/shared@9.1.9':
resolution: {integrity: sha512-xKGM1d0EAxdDFCWedcYXOm6V5Pfw/TMudd6/qCdEb4tv0hk9EKeg7lwQF1azE0dP2phvx0yXxrt7UQK+IZjNdw==}
engines: {node: '>= 10'}
- '@intlify/shared@9.13.1':
- resolution: {integrity: sha512-u3b6BKGhE6j/JeRU6C/RL2FgyJfy6LakbtfeVF8fJXURpZZTzfh3e05J0bu0XPw447Q6/WUp3C4ajv4TMS4YsQ==}
- engines: {node: '>= 16'}
-
'@intlify/vue-devtools@9.1.9':
resolution: {integrity: sha512-YPehH9uL4vZcGXky4Ev5qQIITnHKIvsD2GKGXgqf+05osMUI6WSEQHaN9USRa318Rs8RyyPCiDfmA0hRu3k7og==}
engines: {node: '>= 10'}
@@ -4819,8 +4819,8 @@ packages:
'@vue/composition-api':
optional: true
- vue-i18n@9.13.1:
- resolution: {integrity: sha512-mh0GIxx0wPtPlcB1q4k277y0iKgo25xmDPWioVVYanjPufDBpvu5ySTjP5wOrSvlYQ2m1xI+CFhGdauv/61uQg==}
+ vue-i18n@11.0.0-rc.1:
+ resolution: {integrity: sha512-qbdCbA537HEdr2yXQ4ec/OMDsoHjod1DwnWbrf+l4Cu/O7CYTCKsOyITUm3RmrCJgRnoVycuR6i/JWdNTJvD5g==}
engines: {node: '>= 16'}
peerDependencies:
vue: ^3.0.0
@@ -6730,6 +6730,11 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ '@intlify/core-base@11.0.0-rc.1':
+ dependencies:
+ '@intlify/message-compiler': 11.0.0-rc.1
+ '@intlify/shared': 11.0.0-rc.1
+
'@intlify/core-base@9.1.9':
dependencies:
'@intlify/devtools-if': 9.1.9
@@ -6739,26 +6744,21 @@ snapshots:
'@intlify/shared': 9.1.9
'@intlify/vue-devtools': 9.1.9
- '@intlify/core-base@9.13.1':
- dependencies:
- '@intlify/message-compiler': 9.13.1
- '@intlify/shared': 9.13.1
-
'@intlify/devtools-if@9.1.9':
dependencies:
'@intlify/shared': 9.1.9
+ '@intlify/message-compiler@11.0.0-rc.1':
+ dependencies:
+ '@intlify/shared': 11.0.0-rc.1
+ source-map-js: 1.2.0
+
'@intlify/message-compiler@9.1.9':
dependencies:
'@intlify/message-resolver': 9.1.9
'@intlify/shared': 9.1.9
source-map: 0.6.1
- '@intlify/message-compiler@9.13.1':
- dependencies:
- '@intlify/shared': 9.13.1
- source-map-js: 1.2.0
-
'@intlify/message-resolver@9.1.9': {}
'@intlify/runtime@9.1.9':
@@ -6767,9 +6767,9 @@ snapshots:
'@intlify/message-resolver': 9.1.9
'@intlify/shared': 9.1.9
- '@intlify/shared@9.1.9': {}
+ '@intlify/shared@11.0.0-rc.1': {}
- '@intlify/shared@9.13.1': {}
+ '@intlify/shared@9.1.9': {}
'@intlify/vue-devtools@9.1.9':
dependencies:
@@ -10890,10 +10890,10 @@ snapshots:
dependencies:
vue: 3.4.35(typescript@5.5.4)
- vue-i18n@9.13.1(vue@3.4.35(typescript@5.5.4)):
+ vue-i18n@11.0.0-rc.1(vue@3.4.35(typescript@5.5.4)):
dependencies:
- '@intlify/core-base': 9.13.1
- '@intlify/shared': 9.13.1
+ '@intlify/core-base': 11.0.0-rc.1
+ '@intlify/shared': 11.0.0-rc.1
'@vue/devtools-api': 6.6.3
vue: 3.4.35(typescript@5.5.4)
diff --git a/src/pages/search/components/highLightText.vue b/src/pages/search/components/highLightText.vue
new file mode 100644
index 0000000..2839885
--- /dev/null
+++ b/src/pages/search/components/highLightText.vue
@@ -0,0 +1,70 @@
+
+
+
+
+ {{ part.text }}
+
+ {{ part.text }}
+
+
+
+
+
+
+
diff --git a/src/pages/search/components/searchItem.vue b/src/pages/search/components/searchItem.vue
index 62807dd..883800f 100644
--- a/src/pages/search/components/searchItem.vue
+++ b/src/pages/search/components/searchItem.vue
@@ -5,17 +5,21 @@
-
- {{ resultName }}
-
+
{{ resultType }}
-
- {{ resultDetail }}
-
+
@@ -24,109 +28,108 @@
import zu4992 from '@/static/image/chatList/zu4992@2x.png'
import zu4991 from '@/static/image/chatList/zu4991@2x.png'
import zu4989 from '@/static/image/chatList/zu4989@2x.png'
-import {
- ref,
- watch,
- computed,
- onMounted,
- onUnmounted,
- reactive,
- getCurrentInstance,
-} from 'vue'
-const { proxy } = getCurrentInstance()
+import zu5296 from '@/static/image/chatList/zu5296@2x.png'
+import { ref, watch, computed, onMounted, onUnmounted, reactive } from 'vue'
+import HighlightText from './highLightText.vue'
+import { useI18n } from 'vue-i18n'
+const { t } = useI18n()
const props = defineProps({
searchItem: Object | Number,
searchResultKey: String,
+ searchText: String,
})
+// 映射表-查找对应结构下的属性名
+const keyMapping = {
+ user_infos: { avatar: 'avatar', name: 'nickname' },
+ group_infos: { avatar: 'avatar', name: 'name' },
+ group_member_infos: {
+ avatar: 'group_avatar',
+ name: 'group_name',
+ detailKey: 'user_name',
+ },
+ general_infos: {
+ avatar: 'receiver_avatar',
+ name: 'receiver_name',
+ detailKey: 'count',
+ },
+}
+//获取key对应值
+const getKeyValue = (keys) => {
+ let keyValue = ''
+ if (keys) {
+ keyValue = props.searchItem[keys]
+ }
+ return keyValue
+}
+//头像
const avatarImg = computed(() => {
- let srcT = ''
- switch (props.searchItem?.group_type) {
- case 0:
- srcT = zu5296
- break
- case 1:
- srcT = zu4992
- break
- case 2:
- srcT = zu4991
- break
- case 3:
- srcT = zu4989
- break
- default:
- srcT = zu4992
+ let avatar = getKeyValue(keyMapping[props.searchResultKey]?.avatar)
+ if (!avatar) {
+ avatar = groupTypeMapping[props.searchItem?.group_type]?.defaultImg
}
- return srcT
+ return avatar
})
+//名称
const resultName = computed(() => {
- let data_key = ''
- switch (props.searchResultKey) {
- case 'user_infos':
- data_key = props.searchItem?.nickname
- break
- case 'group_member_infos':
- data_key = props.searchItem?.group_name
- break
- case 'general_infos':
- data_key = props.searchItem?.receiver_name
- break
- default:
- data_key = ''
- }
- return data_key
+ return getKeyValue(keyMapping[props.searchResultKey]?.name)
})
+// 映射表-根据groupType设置对应值
+const groupTypeMapping = {
+ 0: {},
+ 1: {
+ defaultImg: zu4992,
+ },
+ 2: {
+ result_type: t('index.mine.department'),
+ defaultImg: zu4989,
+ },
+ 3: {
+ result_type: t('index.mine.project'),
+ defaultImg: zu4991,
+ },
+ 4: {
+ defaultImg: zu5296,
+ },
+}
+//群类型tag
const resultType = computed(() => {
- let result_type = ''
- switch (props.searchItem?.group_type) {
- case 0:
- result_type = ''
- break
- case 1:
- result_type = ''
- break
- case 2:
- result_type = proxy.$t('index.mine.department')
- break
- case 3:
- result_type = proxy.$t('index.mine.project')
- break
- case 4:
- result_type = ''
- break
- default:
- result_type = ''
- }
- return result_type
+ return groupTypeMapping[props.searchItem?.group_type]?.result_type
})
+//详细内容
const resultDetail = computed(() => {
- let data_key = ''
- switch (props.searchResultKey) {
- case 'user_infos':
- data_key = ''
+ let result_detail =
+ props.searchItem[keyMapping[props.searchResultKey]?.detailKey]
+ switch (keyMapping[props.searchResultKey]?.detailKey) {
+ case 'count':
+ result_detail = result_detail + t('search.chat.count')
break
- case 'group_member_infos':
- data_key = ''
- break
- case 'general_infos':
- data_key = props.searchItem?.count + proxy.$t('search.chat.count')
+ case 'user_name':
+ result_detail = t('search.result.include') + result_detail
break
default:
- data_key = ''
+ result_detail = ''
}
- return data_key
+ return result_detail
})
diff --git a/src/pages/search/index.vue b/src/pages/search/index.vue
index 97ed4fc..4b15dae 100644
--- a/src/pages/search/index.vue
+++ b/src/pages/search/index.vue
@@ -33,19 +33,42 @@
searchResultIndex) in state.searchResult"
:key="searchResultKey"
>
-
- {{ getResultKeysValue(searchResultKey) }}
+
+
+
+ {{ getResultKeysValue(searchResultKey) }}
+
+
+
+
+
+ {{ getHasMoreResult(searchResultKey) }}
+
+
-
-
-
-
@@ -65,6 +88,7 @@ import { ServeSeachQueryAll } from '@/api/search/index'
import { ref, watch, computed, onMounted, onUnmounted, reactive } from 'vue'
import { useAuth } from '@/store/auth'
import { useI18n } from 'vue-i18n'
+import { nextTick } from 'process'
const { t } = useI18n()
const state = reactive({
searchText: '', //搜索内容
@@ -92,6 +116,9 @@ const getResultKeysValue = (keys) => {
case 'group_member_infos':
resultKey = t('chat.type.group')
break
+ case 'combinedGroup':
+ resultKey = t('chat.type.group')
+ break
case 'general_infos':
resultKey = t('chat.type.record')
break
@@ -101,6 +128,49 @@ const getResultKeysValue = (keys) => {
return resultKey
}
+//是否还有更多数据
+const getHasMoreResult = (searchResultKey) => {
+ let has_more_result = ''
+ switch (searchResultKey) {
+ case 'user_infos':
+ if (
+ state.searchResult['user_count'] &&
+ state.searchResult['user_count'] > 3
+ ) {
+ has_more_result = t('has_more') + t('index.mine.addressBook')
+ }
+ break
+ case 'group_infos':
+ if (
+ state.searchResult['group_count'] &&
+ state.searchResult['group_count'] > 3
+ ) {
+ has_more_result = t('has_more') + t('chat.type.group')
+ }
+ break
+ case 'group_member_infos':
+ if (
+ state.searchResult['group_count'] &&
+ state.searchResult['group_count'] > 3
+ ) {
+ has_more_result = t('has_more') + t('chat.type.group')
+ }
+ break
+ case 'combinedGroup':
+ if (
+ state.searchResult['group_count'] &&
+ state.searchResult['group_count'] > 3
+ ) {
+ has_more_result = t('has_more') + t('chat.type.group')
+ }
+ break
+ case 'general_infos':
+ break
+ default:
+ }
+ return has_more_result
+}
+
// ES搜索聊天记录-主页搜索什么都有
const queryAllSearch = (searchText) => {
let params = {
@@ -111,6 +181,40 @@ const queryAllSearch = (searchText) => {
resp.then(({ code, data }) => {
console.log(data)
if (code == 200) {
+ // data.group_infos = [
+ // {
+ // id: 888898,
+ // type: 4,
+ // name: '泰丰国际',
+ // avatar: '', //群头像
+ // created_at: '2024-10-31 14:31:11',
+ // group_num: 730,
+ // },
+ // ]
+ if ((data.user_infos || []).length > 0) {
+ ;(data.user_infos || []).forEach((item) => {
+ item.group_type = 0
+ })
+ }
+ if ((data.group_infos || []).length > 0) {
+ ;(data.group_infos || []).forEach((item) => {
+ item.group_type = item.type
+ item.groupTempType = 'group_infos'
+ })
+ }
+ if ((data.group_member_infos || []).length > 0) {
+ ;(data.group_member_infos || []).forEach((item) => {
+ item.groupTempType = 'group_member_infos'
+ })
+ }
+ let tempGeneral_infos = Array.isArray(data.general_infos)
+ ? [...data.general_infos]
+ : data.general_infos
+ delete data.general_infos
+ data.combinedGroup = (data.group_infos || []).concat(
+ data.group_member_infos || [],
+ )
+ data.general_infos = tempGeneral_infos
state.searchResult = data
} else {
}
@@ -186,9 +290,19 @@ page {
margin: 46rpx 0 0;
.result-title {
- line-height: 40rpx;
padding: 0 0 10rpx;
- color: $theme-hint-text;
+ span {
+ line-height: 40rpx;
+ color: $theme-hint-text;
+ }
+ }
+ .result-has-more {
+ padding: 10px 0;
+ border-bottom: 1px solid $theme-border-color;
+ span {
+ color: #191919;
+ line-height: 40rpx;
+ }
}
}
}
diff --git a/src/uni_modules/tmui/locale/zh-Hans.json b/src/uni_modules/tmui/locale/zh-Hans.json
index a67286d..5552323 100644
--- a/src/uni_modules/tmui/locale/zh-Hans.json
+++ b/src/uni_modules/tmui/locale/zh-Hans.json
@@ -79,5 +79,7 @@
"index.mine.project": "项目",
"chat.type.group": "群聊",
"chat.type.record": "聊天记录",
- "search.result.include": "包含:"
+ "search.result.include": "包含:",
+ "has_more": "更多",
+ "index.type.company": "公司"
}
From 3109e74a41536d447e196255dfb0ea7c4feb7950 Mon Sep 17 00:00:00 2001
From: wangyifeng <812766448@qq.com>
Date: Mon, 30 Dec 2024 17:03:40 +0800
Subject: [PATCH 04/12] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9B=B4=E5=A4=9A?=
=?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C=E9=A1=B5=EF=BC=9B=E5=B0=86?=
=?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C=E5=88=97=E8=A1=A8=E5=B0=81?=
=?UTF-8?q?=E8=A3=85=E7=BB=84=E4=BB=B6=EF=BC=9B=E6=8E=A5=E5=85=A5=E6=90=9C?=
=?UTF-8?q?=E7=B4=A2=E8=81=8A=E5=A4=A9=E8=AE=B0=E5=BD=95-=E7=BE=A4?=
=?UTF-8?q?=E4=B8=8E=E7=94=A8=E6=88=B7=E6=A6=82=E8=A7=88=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/search/index.js | 9 ++
src/pages.json | 8 +
src/pages/search/components/searchList.vue | 22 ++-
src/pages/search/index.vue | 174 +--------------------
src/pages/search/moreResult/moreResult.vue | 156 ++++++++++++++++++
5 files changed, 199 insertions(+), 170 deletions(-)
create mode 100644 src/pages/search/moreResult/moreResult.vue
diff --git a/src/api/search/index.js b/src/api/search/index.js
index 6ad3d50..3fe5dbe 100644
--- a/src/api/search/index.js
+++ b/src/api/search/index.js
@@ -9,3 +9,12 @@ export const ServeSeachQueryAll = (data) => {
data,
})
}
+
+// ES搜索聊天记录-指定用户、指定群、群与用户概览
+export const ServeTalkRecord = (data) => {
+ return request({
+ url: '/api/v1/elasticsearch/query-talk-record',
+ method: 'POST',
+ data,
+ })
+}
diff --git a/src/pages.json b/src/pages.json
index e79e9b1..85387a9 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -66,6 +66,14 @@
"navigationStyle": "custom",
"enablePullDownRefresh":false
}
+ },
+ {
+ "path": "pages/search/moreResult/moreResult",
+ "type": "page",
+ "style": {
+ "navigationStyle": "custom",
+ "enablePullDownRefresh":false
+ }
}
diff --git a/src/pages/search/components/searchList.vue b/src/pages/search/components/searchList.vue
index 44034b4..cb1eae9 100644
--- a/src/pages/search/components/searchList.vue
+++ b/src/pages/search/components/searchList.vue
@@ -36,7 +36,11 @@
>
-
+
{{ getHasMoreResult(searchResultKey) }}
@@ -126,9 +130,25 @@ const getHasMoreResult = (searchResultKey) => {
}
return has_more_result
}
+
+//点击跳转到更多结果页面
+const toMoreResultPage = (searchResultKey) => {
+ uni.navigateTo({
+ url:
+ '/pages/search/moreResult/moreResult?searchResultKey=' +
+ searchResultKey +
+ '&searchText=' +
+ props.searchText,
+ })
+}
diff --git a/src/pages/search/moreResult/moreResult.vue b/src/pages/search/moreResult/moreResult.vue
new file mode 100644
index 0000000..c3bb605
--- /dev/null
+++ b/src/pages/search/moreResult/moreResult.vue
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+ {{ $t('cancel') }}
+
+
+
+
+
+
+
+
+
+
From 82d6d529baf43ba6c80741cc89a15f50d27c21dd Mon Sep 17 00:00:00 2001
From: wangyifeng <812766448@qq.com>
Date: Tue, 31 Dec 2024 11:04:11 +0800
Subject: [PATCH 05/12] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E5=8F=8A=E5=AD=90=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=85=A5zPaging?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/search/index.js | 18 ++
src/pages/search/components/searchList.vue | 35 +---
src/pages/search/index.vue | 150 +++++++-------
src/pages/search/moreResult/moreResult.vue | 185 +++++++++++++-----
.../search/moreResult/moreResultDetail.vue | 0
5 files changed, 241 insertions(+), 147 deletions(-)
create mode 100644 src/pages/search/moreResult/moreResultDetail.vue
diff --git a/src/api/search/index.js b/src/api/search/index.js
index 3fe5dbe..30f7fd1 100644
--- a/src/api/search/index.js
+++ b/src/api/search/index.js
@@ -10,6 +10,24 @@ export const ServeSeachQueryAll = (data) => {
})
}
+// ES搜索用户数据
+export const ServeQueryUser = (data) => {
+ return request({
+ url: '/api/v1/elasticsearch/query-user',
+ method: 'POST',
+ data,
+ })
+}
+
+// ES搜索群组数据
+export const ServeQueryGroup = (data) => {
+ return request({
+ url: '/api/v1/elasticsearch/query-group',
+ method: 'POST',
+ data,
+ })
+}
+
// ES搜索聊天记录-指定用户、指定群、群与用户概览
export const ServeTalkRecord = (data) => {
return request({
diff --git a/src/pages/search/components/searchList.vue b/src/pages/search/components/searchList.vue
index cb1eae9..42d0461 100644
--- a/src/pages/search/components/searchList.vue
+++ b/src/pages/search/components/searchList.vue
@@ -1,6 +1,6 @@
-
+
-
-

-
{{ $t('search.hint') }}
-
diff --git a/src/pages/search/components/searchList.vue b/src/pages/search/components/searchList.vue
index 42d0461..67b59a8 100644
--- a/src/pages/search/components/searchList.vue
+++ b/src/pages/search/components/searchList.vue
@@ -1,65 +1,282 @@
-
-
-
-
-
- {{ getResultKeysValue(searchResultKey) }}
-
-
-
-
+
+
+
+
-
- {{ getHasMoreResult(searchResultKey) }}
-
+ {{ $t('cancel') }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ getResultKeysValue(searchResultKey) }}
+
+
+
+
+
+ {{ getHasMoreResult(searchResultKey) }}
+
+
+
-
+
+
diff --git a/src/pages/search/moreResult/moreResult.vue b/src/pages/search/moreResult/moreResult.vue
index 3332f73..3b99442 100644
--- a/src/pages/search/moreResult/moreResult.vue
+++ b/src/pages/search/moreResult/moreResult.vue
@@ -1,65 +1,20 @@
-
-
-
-
-
- {{ $t('cancel') }}
-
-
-
-
-
-
-
+
-
+
diff --git a/src/pages/search/moreResult/moreResultDetail.vue b/src/pages/search/moreResult/moreResultDetail.vue
index e69de29..e493eb7 100644
--- a/src/pages/search/moreResult/moreResultDetail.vue
+++ b/src/pages/search/moreResult/moreResultDetail.vue
@@ -0,0 +1,52 @@
+
+
+
+
+
diff --git a/src/static/image/search/search-item-pointer.png b/src/static/image/search/search-item-pointer.png
new file mode 100644
index 0000000000000000000000000000000000000000..c026df4146f5689e68f85891cbea6b0a5fbee790
GIT binary patch
literal 370
zcmeAS@N?(olHy`uVBq!ia0vp^+(0bE!3-pKt-j(8q!^2X+?^QKos)S9
f)G&v$uk##nH^oNYr!
zP(Q;o-&dLkcAZ?#5TUx?@_^pT;|#x_7_;6mS;>9CawXdV&6QOLG%NWVy+6HTI=~!g5kzC#(%1^oKs7y7GD8c$l&Sf=d#Wzp$PyaQI&`Q
literal 0
HcmV?d00001
diff --git a/src/uni_modules/tmui/locale/zh-Hans.json b/src/uni_modules/tmui/locale/zh-Hans.json
index 5552323..299741d 100644
--- a/src/uni_modules/tmui/locale/zh-Hans.json
+++ b/src/uni_modules/tmui/locale/zh-Hans.json
@@ -81,5 +81,6 @@
"chat.type.record": "聊天记录",
"search.result.include": "包含:",
"has_more": "更多",
- "index.type.company": "公司"
+ "index.type.company": "公司",
+ "search.result.relevant": "相关"
}
From 3824ab7638b3c945646e3ab94d6079eeaf39f96c Mon Sep 17 00:00:00 2001
From: wangyifeng <812766448@qq.com>
Date: Thu, 2 Jan 2025 16:01:36 +0800
Subject: [PATCH 07/12] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=90=9C=E7=B4=A2?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=9F=A5=E7=9C=8B=E8=81=8A=E5=A4=A9=E8=AE=B0?=
=?UTF-8?q?=E5=BD=95=E4=B8=AD=E7=9A=84=E8=AF=A6=E7=BB=86=E5=86=85=E5=AE=B9?=
=?UTF-8?q?=E6=97=B6=E5=88=86=E9=A1=B5=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=EF=BC=9B=E6=96=B0=E5=A2=9E=E8=81=8A=E5=A4=A9=E8=AE=BE?=
=?UTF-8?q?=E7=BD=AE=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages.json | 8 +
.../components/settingFormItem.vue | 73 +++
src/pages/chatSettings/index.vue | 494 ++++++++++++++++++
src/pages/dialog/index.vue | 9 +-
src/pages/search/components/searchItem.vue | 2 +-
src/pages/search/components/searchList.vue | 19 +-
src/pages/search/moreResult/moreResult.vue | 10 +-
.../search/moreResult/moreResultDetail.vue | 19 +
src/static/image/chatSettings/edit-btn.png | Bin 0 -> 519 bytes
src/static/image/chatSettings/pointer.png | Bin 0 -> 370 bytes
.../chatSettings/recordSearchTypeDate.png | Bin 0 -> 1890 bytes
.../chatSettings/recordSearchTypeFiles.png | Bin 0 -> 2128 bytes
.../recordSearchTypeGroupMembers.png | Bin 0 -> 1880 bytes
.../recordSearchTypeImgAndVideo.png | Bin 0 -> 2117 bytes
.../chatSettings/recordSearchTypeLink.png | Bin 0 -> 2298 bytes
src/uni_modules/tmui/locale/zh-Hans.json | 20 +-
16 files changed, 647 insertions(+), 7 deletions(-)
create mode 100644 src/pages/chatSettings/components/settingFormItem.vue
create mode 100644 src/pages/chatSettings/index.vue
create mode 100644 src/static/image/chatSettings/edit-btn.png
create mode 100644 src/static/image/chatSettings/pointer.png
create mode 100644 src/static/image/chatSettings/recordSearchTypeDate.png
create mode 100644 src/static/image/chatSettings/recordSearchTypeFiles.png
create mode 100644 src/static/image/chatSettings/recordSearchTypeGroupMembers.png
create mode 100644 src/static/image/chatSettings/recordSearchTypeImgAndVideo.png
create mode 100644 src/static/image/chatSettings/recordSearchTypeLink.png
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 @@
+
+
+
+
+
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 0000000000000000000000000000000000000000..58d371c5b89640361ccc72e4cd4580b423b785c0
GIT binary patch
literal 519
zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k3?#4J%UA`Z7>k44ofy`glX(f`tO)Q4aRt&2
z4h~saS;fW0K(e5qps=v8tgH;kEh#Aha)FG}(o!J1sHg}?0=Yl{WCN8!7!X0A2#|}c
z49G_2g0z7Zz!^YUG&V#8qzzRH$X&eLVmi>R<|RRX!3-=sA`%KJ>KZx*HuetA-T@)u
z5zz_h8QJ;O_4Uo&{gWq8pFMx^>dm|NA3lEi{PpYiA3uNn{`>FHm*Q)IMx63=aSX9I
zefRQqp+g1&t{2-4C53&@9dt=P&~X3%e@P`?5s&Psysbwy%eE*#$TqdNI-4UQ{pp%v
zvXQdtHbu#_Gs~E*4OX@{25JhIzPlW|v}D<@Id9kA@-=AKs$Sg0xGTlg=vvf)G&v$uk##nH^oNYr!
zP(Q;o-&dLkcAZ?#5TUx?@_^pT;|#x_7_;6mS;>9CawXdV&6QOLG%NWVy+6HTI=~!g5kzC#(%1^oKs7y7GD8c$l&Sf=d#Wzp$PyaQI&`Q
literal 0
HcmV?d00001
diff --git a/src/static/image/chatSettings/recordSearchTypeDate.png b/src/static/image/chatSettings/recordSearchTypeDate.png
new file mode 100644
index 0000000000000000000000000000000000000000..747cc793b054657ae2c0cc45a2cdeb511b32c305
GIT binary patch
literal 1890
zcmZ`(3pkT&9RK8&Bu7m_q@;dzF#sHCa
z=;$cK$H&J(GV!(Ka{1)sBsc{TB2!aS;1tB^>FJrT1$t&@XCWs@ASZ~R2P#nfhyFc+
zyQ%Hm`JUl!yGBPSEDmprvL?Wf8rjp6zw6rt|g_540e&fas
zDwRs3(Xz9%b8>R>^75EWW^r*bo6Y9&c-7U_wY9Z%b#?Xi^$iUTjg5^hEiD3ppr@zj
z&6_v<{ry8jLsF@9WMl+9Bx7S^(3b_@TbceP9z0QTVt7O}>CD;Ki;2nLHmEl>txzZ$diPH9UOMvO19+fipFWR`jmsyeXJ+UAXw>fkuaAl{
z%5gXTM8BYK`bg?-BlSQXPX**
znU$U8)A;j)ukyE=!gD%_oY;5T_S_`O#FLL4xW7eY(_v2!Z0lk1vrO?yP3+{5dpn%7
zQRXl2SbO?}RiBY-hP8zW+H_Z|m7RBnKDwc5%@dm49TjxZF}jjj$QnXxBi!rcCzpG)
z`uM5B6WRpw`Yfj`EO`OWxa}s>y?}y0a2%ysZD!Vw3^(6RyCgvuqC(xwtlUBaoyj)3
zS>;CqQAdMxjofLmEqO_giOr)K`q(E7o?>}
zCX^RHUT3ku&sAa-l3%fxVZZOELutjbV5!%RwU;QzHxtB@MG?U@w#>?YB>)&SsF%ug
z{726p+uso#Kd{H-3nMW^JnBBP(L)Ic=#j*GE#*91Ugt`k1x&P+1B=3&m!c
zUdAJlgxDhu)Be!0)zgs&9uZHOW0BL|0msR^CuvsB~`gNz+#4OQX7BN?#LG9Qsu
zyC1q~9$TuqSNCun=2k|Pe)5LW&E9;?g%1+lI(y4Bd=oxgEw|pGrN2a}qRVhe&DQHL
z;tw+7Z$A`R%O`GbO^S+t18-|n(QIhS7G2$9li;64l`ppYEq}{Qp@F2!%ocrIu9tW}
z=9LYM=FD|V9Gz$=IpZPG`CyY@rPsc#_R34Or`J4!?&Mw<+(BeH!4CAhqlgxF*QsCR
zsWfqRV5Mp1Kl6MX-G$Zn`RA=|=Yu}y>U9plugEs1#`#SD%;R#wzZZZ)VjMXL@3=n!
DfaaM+
literal 0
HcmV?d00001
diff --git a/src/static/image/chatSettings/recordSearchTypeFiles.png b/src/static/image/chatSettings/recordSearchTypeFiles.png
new file mode 100644
index 0000000000000000000000000000000000000000..a0d60a504e9e0b24ac3bb9ec1e05387b4d20ae95
GIT binary patch
literal 2128
zcmZ`(3pAAL8Xn0dOyyD-<+AG(+R1Iyt}VHY`~A|k?UYGLv#DrA5=LW?$;LDzx5PBY
zFotB3QEZNbEDV|nIc}Sn8IrpgyUy4C_wPoZhwm=X>7gd){ZQ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DbhyjyIX>8ZxBxt&G*1~Yukg4S2b`N?E#NS@O1#4siEkjG`c59#B7%5r5B-=
zNA^d`m&HEnQtF@+RLUoC7KpM$A90C^mJ~0&DP?bkoQcUhWBzWM|I6H}Su^PzY+^<;HzB7(j>L~QTt?%%Me=JHSC4Rc2!
z!_(q8kxmcq)(by1B=&>ZP_K
zRiehDbhjPONsa+V{x!NV+JrIZ`}+#_EWvJP%9TT#exM4@X;G8%QigMypKBNqSw)9R
zub`a!>;wsI5tZ8Pys%qGc2N}0{C@1Pnr!Np*YK9csQs{MLXxmwe6)#zOT-GYozQ*k
zBR#mR3Y;WPPw}nFO>NjEgB(9wjduE3g{f#aUsS5&!6n<6jh`$&Nd)>W`VzDZj$N8~
zN;dWQ+0R%p19iXGu0GY|4A6QD3|Kwc!x}G?9Ke6=|z}OGNy7SZd!?<
UXb?ZG41TIG2b8M~%PJt@U&ovTmH+?%
literal 0
HcmV?d00001
diff --git a/src/static/image/chatSettings/recordSearchTypeGroupMembers.png b/src/static/image/chatSettings/recordSearchTypeGroupMembers.png
new file mode 100644
index 0000000000000000000000000000000000000000..ab31147bcc24849712259492c9eec181171031a2
GIT binary patch
literal 1880
zcmV-e2dDUnP)Px+5=lfsRCwCuoNH_qMHI)U@+d?^KWL(alqe)7e)5YZ@Bv7{CdR5H8caxxAPEsu
z9?BLf6%bodBwXZCpeP7RwLHqJw1JdIj6?|XYI#2dYLQoaTU*-Q`R^tD`=JlYy?fj3
z-PwD0<(^O7X?EwAGjnFnnK?%Y7k*4K2FcOpWHW$b9Kjh`i6Bgv2+B&F!4VXj0XbQY
zW(t#p*MIDxzbZ3Pf_l)V)XNf?X}-c99>lr#jGWpn7z;RaDxda@c4Rt=fS7SQ3Q#1|
z6Rb7%l~ZtC2~G!**Ub#}O$^Xe$d-3i1GR~H2idhx#(Bt@83?)s)Gk4p5x1deq@vt)
zpf)KtQr!o79$V2IHza~+#%3eMMI?+xLtKH{qyb~ynMZwOenNoSY+^q9sMgU-IGso&
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H&!IN|@HMg;@>^XcRWJ#8YZ9PV@Pq)%f-?*KontwPrOakq2d1yF8
zLCbv`@xrY?{?!(IgUD6dd7rVOhfdXN84~L24ZMQ}=t+)%{{aAv!Xis8f4TD~LkC*l
literal 0
HcmV?d00001
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": "退出群聊"
}
From 0db50f2216bea01123b35b8638180d1be666dbcb Mon Sep 17 00:00:00 2001
From: wangyifeng <812766448@qq.com>
Date: Thu, 2 Jan 2025 17:10:31 +0800
Subject: [PATCH 08/12] =?UTF-8?q?=E6=8E=A5=E5=85=A5=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E7=BE=A4=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/chatSettings/index.js | 11 ++++++
.../components/settingFormItem.vue | 2 ++
src/pages/chatSettings/index.vue | 34 +++++++++++++++++--
src/pages/dialog/index.vue | 2 +-
4 files changed, 46 insertions(+), 3 deletions(-)
create mode 100644 src/api/chatSettings/index.js
diff --git a/src/api/chatSettings/index.js b/src/api/chatSettings/index.js
new file mode 100644
index 0000000..e194d2c
--- /dev/null
+++ b/src/api/chatSettings/index.js
@@ -0,0 +1,11 @@
+import request from '@/service/index.js'
+import qs from 'qs'
+
+// 群信息查询
+export const ServeQueryGroupInfo = (data) => {
+ return request({
+ url: '/api/v1/group/detail',
+ method: 'GET',
+ data,
+ })
+}
diff --git a/src/pages/chatSettings/components/settingFormItem.vue b/src/pages/chatSettings/components/settingFormItem.vue
index 2ea0871..685da61 100644
--- a/src/pages/chatSettings/components/settingFormItem.vue
+++ b/src/pages/chatSettings/components/settingFormItem.vue
@@ -13,6 +13,8 @@
src="/src/static/image/chatSettings/pointer.png"
/>
{
+ if (options.groupId) {
+ console.log(options.groupId)
+ state.groupId = Number(options.groupId)
+ getGroupInfo()
+ }
+})
+
const state = reactive({
chatGroupMembers: [], //群成员
chatGroupInfos: [], //群聊信息
recordSearchTypeList: [], //聊天记录搜索类型
chatSettings: [], //群聊设置
chatManagement: [], //群聊管理
+ groupId: '', //群id
+ groupInfo: null, //群信息
})
onMounted(() => {
@@ -176,7 +188,7 @@ onMounted(() => {
{
label: t('chat.settings.groupName'),
hasPointer: true,
- value: '泰丰国际',
+ value: groupName,
subValue: '',
customInfo: '',
},
@@ -258,7 +270,7 @@ const groupAvatar = computed(() => {
//群名称
const groupName = computed(() => {
- return '泰丰国际'
+ return state?.groupInfo?.group_name
})
//群人数
@@ -270,6 +282,24 @@ const groupNum = computed(() => {
const groupType = computed(() => {
return '公司'
})
+
+//查询群信息
+const getGroupInfo = () => {
+ let params = {
+ group_id: state.groupId,
+ }
+ const resp = ServeQueryGroupInfo(params)
+ console.log(resp)
+ resp.then(({ code, data }) => {
+ console.log(data)
+ if (code == 200) {
+ state.groupInfo = data
+ } else {
+ }
+ })
+
+ resp.catch(() => {})
+}
diff --git a/src/pages/chatSettings/index.vue b/src/pages/chatSettings/index.vue
index 09a7d8d..f6fa3fa 100644
--- a/src/pages/chatSettings/index.vue
+++ b/src/pages/chatSettings/index.vue
@@ -23,8 +23,24 @@
{{ '(' + groupNum + ')' }}
-
-
{{ groupType }}
+
+
+ {{ groupType }}
+
@@ -41,13 +57,20 @@
-
![]()
-
- {{ memberItem.avatar }}
+
+
+ {{
+ memberItem.nickname.length >= 2
+ ? memberItem.nickname.slice(-2)
+ : memberItem.nickname
+ }}
@@ -57,7 +80,7 @@
- {{ memberItem.name }}
+ {{ memberItem.nickname }}
@@ -71,7 +94,10 @@
v-for="(item, index) in state.chatGroupInfos"
:key="index"
>
-
+
@@ -88,6 +114,7 @@
class="record-search-types-each"
v-for="(item, index) in state.recordSearchTypeList"
:key="index"
+ @click="toSearchByConditionPage(index)"
>
{{ item.value }}
@@ -135,6 +162,10 @@
diff --git a/src/static/image/search/down-pointer.png b/src/static/image/search/down-pointer.png
new file mode 100644
index 0000000000000000000000000000000000000000..6f6b2cff4003b393bf874b59fa4add0cc7d1a6de
GIT binary patch
literal 208
zcmeAS@N?(olHy`uVBq!ia0vp^LO{&T!VDxEEDx9iDaPU;cPEB*=VV?2If?;3A+8{~
zhK8P=p5ESG2nlCExQ>jgJ%Nh2N`m}?8CYzBL(2P?fBx;q`%eKV>h9^{7{YNqS-?Dj
zfpHr{+p3cZVb_A#&QDcv+!pG~qqEteDN
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
diff --git a/src/uni_modules/tmui/components/tm-calendar-view/tm-calendar-view.vue b/src/uni_modules/tmui/components/tm-calendar-view/tm-calendar-view.vue
index 02b9d28..230572c 100644
--- a/src/uni_modules/tmui/components/tm-calendar-view/tm-calendar-view.vue
+++ b/src/uni_modules/tmui/components/tm-calendar-view/tm-calendar-view.vue
@@ -1,137 +1,139 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/uni_modules/tmui/components/tm-time-picker/tm-time-picker.vue b/src/uni_modules/tmui/components/tm-time-picker/tm-time-picker.vue
index 18beac2..bc42457 100644
--- a/src/uni_modules/tmui/components/tm-time-picker/tm-time-picker.vue
+++ b/src/uni_modules/tmui/components/tm-time-picker/tm-time-picker.vue
@@ -123,7 +123,8 @@ const props = defineProps({
day: true,
hour: false,
minute: false,
- second: false
+ second: false,
+ am_pm: true
}
}
},
diff --git a/src/uni_modules/tmui/components/tm-time-view/interface.ts b/src/uni_modules/tmui/components/tm-time-view/interface.ts
index fedd600..3599dda 100644
--- a/src/uni_modules/tmui/components/tm-time-view/interface.ts
+++ b/src/uni_modules/tmui/components/tm-time-view/interface.ts
@@ -5,6 +5,7 @@ export interface showDetail {
hour: boolean,
minute: boolean,
second: boolean,
+ am_pm: boolean
}
export enum timeDetailType {
year = "year",
@@ -25,4 +26,4 @@ export interface timeArrayType {
hour: Array,
minute: Array,
second: Array,
-}
\ No newline at end of file
+}
diff --git a/src/uni_modules/tmui/components/tm-time-view/tm-time-view.vue b/src/uni_modules/tmui/components/tm-time-view/tm-time-view.vue
index a68c94d..ddb4729 100644
--- a/src/uni_modules/tmui/components/tm-time-view/tm-time-view.vue
+++ b/src/uni_modules/tmui/components/tm-time-view/tm-time-view.vue
@@ -1,11 +1,14 @@
-
-
+
+
- {{item + showSuffix['year']}}
+
+ {{ item + showSuffix['year'] }}
+
-
@@ -38,7 +41,6 @@
class="flex itemcel flex-row flex-row-center-center"
:class="[colIndex[1] == index ? '' : 'UnitemSelected']"
>
-
- {{item + 1 + showSuffix['month']}}
+
+ {{ item + 1 + showSuffix['month'] }}
+
-
@@ -59,7 +62,6 @@
class="flex itemcel flex-row flex-row-center-center"
:class="[colIndex[2] == index ? '' : 'UnitemSelected']"
>
-
- {{item + showSuffix['date']}}
+
+ {{ item + showSuffix['date'] }}
+
@@ -79,7 +83,6 @@
class="flex itemcel flex-row flex-row-center-center"
:class="[colIndex[3] == index ? '' : 'UnitemSelected']"
>
-
- {{item + showSuffix['hour']}}
+
+ {{ item + showSuffix['hour'] }}
+
@@ -99,7 +104,6 @@
class="flex itemcel flex-row flex-row-center-center"
:class="[colIndex[4] == index ? '' : 'UnitemSelected']"
>
-
- {{item + showSuffix['minute']}}
+
+ {{ item + showSuffix['minute'] }}
+
@@ -119,7 +125,6 @@
class="flex itemcel flex-row flex-row-center-center"
:class="[colIndex[5] == index ? '' : 'UnitemSelected']"
>
-
- {{item + showSuffix['second']}}
+
+ {{ item + showSuffix['second'] }}
+
@@ -136,19 +143,24 @@
-
+
-
- {{item}}
+
+ {{ item }}
+
@@ -177,7 +189,7 @@
* 时间选择
* @description 嵌入在页面的时间选择器。
*/
-import { useTmpiniaStore } from "../../tool/lib/tmpinia";
+import { useTmpiniaStore } from '../../tool/lib/tmpinia'
import {
computed,
PropType,
@@ -189,44 +201,44 @@ import {
watch,
onUpdated,
Ref,
-} from "vue";
-import { showDetail, coltimeData, timeDetailType } from "./interface";
-import * as dayjs from "../../tool/dayjs/esm";
-import { propsOpts } from "./props";
+} from 'vue'
+import { showDetail, coltimeData, timeDetailType } from './interface'
+import * as dayjs from '../../tool/dayjs/esm'
+import { propsOpts } from './props'
import {
rangeTimeArray,
getNowbyIndex,
getIndexNowbydate,
checkNowDateisBetween,
-} from "./time";
-import TmText from "../tm-text/tm-text.vue";
-import TmIcon from "../tm-icon/tm-icon.vue";
+} from './time'
+import TmText from '../tm-text/tm-text.vue'
+import TmIcon from '../tm-icon/tm-icon.vue'
// #ifdef APP-PLUS-NVUE
-const dom = uni.requireNativePlugin("dom");
+const dom = uni.requireNativePlugin('dom')
// #endif
-const proxy = getCurrentInstance()?.proxy ?? null;
-const store = useTmpiniaStore();
-const emits = defineEmits(["update:modelValue", "update:modelStr", "change"]);
-const tmTimeViewName = "tmTimeViewName";
-const DayJs = dayjs.default;
-const props = defineProps({ ...propsOpts });
+const proxy = getCurrentInstance()?.proxy ?? null
+const store = useTmpiniaStore()
+const emits = defineEmits(['update:modelValue', 'update:modelStr', 'change'])
+const tmTimeViewName = 'tmTimeViewName'
+const DayJs = dayjs.default
+const props = defineProps({ ...propsOpts })
const _nowtime = ref(
- DayJs(checkNowDateisBetween(props.defaultValue, props.start, props.end))
-);
-const _nowtimeValue = computed(() => _nowtime.value.format());
+ DayJs(checkNowDateisBetween(props.defaultValue, props.start, props.end)),
+)
+const _nowtimeValue = computed(() => _nowtime.value.format())
-const show = ref(true);
+const show = ref(true)
const _startTime = computed(() => {
return DayJs(props.start).isValid()
? DayJs(props.start).format()
- : DayJs().subtract(3, "year").format();
-});
+ : DayJs().subtract(3, 'year').format()
+})
const _endTime = computed(() => {
return DayJs(props.end).isValid()
? DayJs(props.end).format()
- : DayJs().add(1, "year").format();
-});
+ : DayJs().add(1, 'year').format()
+})
const showCol = computed(() => {
return {
year: props.showDetail?.year ?? true,
@@ -235,24 +247,25 @@ const showCol = computed(() => {
hour: props.showDetail?.hour ?? false,
minute: props.showDetail?.minute ?? false,
second: props.showDetail?.second ?? false,
- };
-});
+ am_pm: props.showDetail?.am_pm ?? true,
+ }
+})
const trueCount = computed(() => {
- return Object.values(showCol.value).filter(value => value === true).length;
-});
+ return Object.values(showCol.value).filter((value) => value === true).length
+})
const showSuffix = computed(() => {
return {
- year: props.showSuffix?.year ?? "年",
- month: props.showSuffix?.month ?? "月",
- hour: props.showSuffix?.hour ?? "时",
- minute: props.showSuffix?.minute ?? "分",
- second: props.showSuffix?.second ?? "秒",
- date: props.showSuffix?.day ?? "日",
- };
-});
-const isDark = computed(() => store.tmStore.dark);
-let colIndex: Ref> = ref([0, 0, 0, 0, 0, 0]);
-let ampmIndex: Ref> = ref([0]);
+ year: props.showSuffix?.year ?? '年',
+ month: props.showSuffix?.month ?? '月',
+ hour: props.showSuffix?.hour ?? '时',
+ minute: props.showSuffix?.minute ?? '分',
+ second: props.showSuffix?.second ?? '秒',
+ date: props.showSuffix?.day ?? '日',
+ }
+})
+const isDark = computed(() => store.tmStore.dark)
+let colIndex: Ref> = ref([0, 0, 0, 0, 0, 0])
+let ampmIndex: Ref> = ref([0])
const _col = ref({
year: [] as Array,
month: [] as Array,
@@ -260,129 +273,144 @@ const _col = ref({
hour: [] as Array,
minute: [] as Array,
second: [] as Array,
-});
+})
-let timid = NaN;
-const maskWidth = ref(0);
+let timid = NaN
+const maskWidth = ref(0)
const maskHeight = computed(() => {
- return (uni.upx2px(props.height) - 50) / 2;
-});
+ return (uni.upx2px(props.height) - 50) / 2
+})
const maskStyle = computed(() => {
let str_white =
- "background-image:linear-gradient(rgba(255,255,255,0.95),rgba(255,255,255,0.6)),linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.95))";
+ 'background-image:linear-gradient(rgba(255,255,255,0.95),rgba(255,255,255,0.6)),linear-gradient(rgba(255,255,255,0.6),rgba(255,255,255,0.95))'
let str_black =
- "background-image:linear-gradient(rgba(17, 17, 17, 1.0),rgba(106, 106, 106, 0.2)),linear-gradient(rgba(106, 106, 106, 0.2),rgba(17, 17, 17, 1.0))";
+ 'background-image:linear-gradient(rgba(17, 17, 17, 1.0),rgba(106, 106, 106, 0.2)),linear-gradient(rgba(106, 106, 106, 0.2),rgba(17, 17, 17, 1.0))'
// #ifdef APP-NVUE
str_black =
- "background-image: linear-gradient(to bottom,rgba(30, 30, 30, 0.9),rgba(104, 104, 104, 0.6))";
+ 'background-image: linear-gradient(to bottom,rgba(30, 30, 30, 0.9),rgba(104, 104, 104, 0.6))'
// #endif
if (!isDark.value) {
- return str_white;
+ return str_white
}
- return str_black;
-});
+ return str_black
+})
_col.value = rangeTimeArray(
_nowtimeValue.value,
_startTime.value,
_endTime.value,
- showCol.value
-);
-function change1(data){
- console.log('data',data)
+ showCol.value,
+)
+function change1(data) {
+ console.log('data', data)
}
function colchange(e: any) {
-
- let changedate = getNowbyIndex(_col.value, e.detail.value, showCol.value, _startTime.value,_endTime.value);
- let testDate = checkNowDateisBetween(changedate, _startTime.value,_endTime.value)
-
-
+ let changedate = getNowbyIndex(
+ _col.value,
+ e.detail.value,
+ showCol.value,
+ _startTime.value,
+ _endTime.value,
+ )
+ let testDate = checkNowDateisBetween(
+ changedate,
+ _startTime.value,
+ _endTime.value,
+ )
let testRang = rangeTimeArray(
- testDate,
- _startTime.value,
- _endTime.value,
- showCol.value
- );
-
-
-
-
- _nowtime.value = DayJs(testDate);
- colIndex.value = getIndexNowbydate(testRang, _nowtime.value, showCol.value);
- emits("update:modelValue", _nowtime.value.format("YYYY/MM/DD HH:mm:ss"));
- emits("update:modelStr", _nowtime.value.format(props.format));
- emits("change", _nowtime.value.format(props.format));
-
- _col.value= testRang;
+ testDate,
+ _startTime.value,
+ _endTime.value,
+ showCol.value,
+ )
+ _nowtime.value = DayJs(testDate)
+ colIndex.value = getIndexNowbydate(testRang, _nowtime.value, showCol.value)
+ emits('update:modelValue', _nowtime.value.format('YYYY/MM/DD HH:mm:ss'))
+ emits('update:modelStr', _nowtime.value.format(props.format))
+ emits('change', _nowtime.value.format(props.format))
+ _col.value = testRang
}
watch(
() => props.modelValue,
() => {
- if (!DayJs(props.modelValue).isValid()) return;
- let deattime = DayJs(checkNowDateisBetween(props.modelValue, props.start, props.end));
+ if (!DayJs(props.modelValue).isValid()) return
+ let deattime = DayJs(
+ checkNowDateisBetween(props.modelValue, props.start, props.end),
+ )
- if (DayJs(deattime).isSame(_nowtime.value)) return;
- _nowtime.value = deattime;
- emits("update:modelStr", _nowtime.value.format(props.format));
+ if (DayJs(deattime).isSame(_nowtime.value)) return
+ _nowtime.value = deattime
+ emits('update:modelStr', _nowtime.value.format(props.format))
// #ifdef APP-NVUE
_col.value = rangeTimeArray(
deattime,
_startTime.value,
_endTime.value,
- showCol.value
- );
- show.value = false;
- colIndex.value = getIndexNowbydate(_col.value, _nowtime.value, showCol.value);
+ showCol.value,
+ )
+ show.value = false
+ colIndex.value = getIndexNowbydate(
+ _col.value,
+ _nowtime.value,
+ showCol.value,
+ )
nextTick(() => {
/**这力着重解释下,uni sdk从3.6.8开始,在nvue下直接对picker view赋值value,页面不会有任何变化,必须刷新下页面才可以显示正确
* 其它平台没有这问题
*/
- show.value = true;
- });
+ show.value = true
+ })
// #endif
// #ifndef APP-NVUE
_col.value = rangeTimeArray(
deattime,
_startTime.value,
_endTime.value,
- showCol.value
- );
- colIndex.value = getIndexNowbydate(_col.value, _nowtime.value, showCol.value);
+ showCol.value,
+ )
+ colIndex.value = getIndexNowbydate(
+ _col.value,
+ _nowtime.value,
+ showCol.value,
+ )
// #endif
- }
-);
+ },
+)
function nvuegetClientRect() {
nextTick(function () {
// #ifdef APP-PLUS-NVUE
dom.getComponentRect(proxy.$refs.picker, function (res) {
if (res?.size) {
- maskWidth.value = res.size.width;
+ maskWidth.value = res.size.width
if (res.size.width == 0) {
- nvuegetClientRect();
+ nvuegetClientRect()
}
}
- });
+ })
// #endif
- });
+ })
}
onMounted(() => {
- nvuegetClientRect();
+ nvuegetClientRect()
nextTick(() => {
- emits("update:modelValue", _nowtime.value.format("YYYY/MM/DD HH:mm:ss"));
- emits("update:modelStr", _nowtime.value.format(props.format));
- colIndex.value = getIndexNowbydate(_col.value, _nowtime.value, showCol.value);
- });
-});
+ emits('update:modelValue', _nowtime.value.format('YYYY/MM/DD HH:mm:ss'))
+ emits('update:modelStr', _nowtime.value.format(props.format))
+ colIndex.value = getIndexNowbydate(
+ _col.value,
+ _nowtime.value,
+ showCol.value,
+ )
+ })
+})
-
-onUpdated(() => nvuegetClientRect());
+onUpdated(() => nvuegetClientRect())
// defineExpose({tmTimeViewName,setNowtime})
@@ -397,7 +425,11 @@ onUpdated(() => nvuegetClientRect());
}
.bottom {
- background-image: linear-gradient(to top, rgba(17, 17, 17, 1), rgba(36, 36, 36, 0.6));
+ background-image: linear-gradient(
+ to top,
+ rgba(17, 17, 17, 1),
+ rgba(36, 36, 36, 0.6)
+ );
}
.itemcel {
diff --git a/src/uni_modules/tmui/locale/zh-Hans.json b/src/uni_modules/tmui/locale/zh-Hans.json
index 14e8854..ee28c25 100644
--- a/src/uni_modules/tmui/locale/zh-Hans.json
+++ b/src/uni_modules/tmui/locale/zh-Hans.json
@@ -100,5 +100,9 @@
"record.searchType.link": "链接",
"group.identify.admin": "管理员",
"group.disband.btn": "解散该群",
- "group.quit.btn": "退出群聊"
+ "group.quit.btn": "退出群聊",
+ "search.condition.date": "按日期查找",
+ "search.condition.date_pickerTitle": "请选择聊天日期",
+ "button.text.done": "完成",
+ "input.placeholder.enter": "请输入..."
}
From 5382335a9cf8df591bc7a2ef7e88f5d676230d9f Mon Sep 17 00:00:00 2001
From: wangyifeng <812766448@qq.com>
Date: Mon, 6 Jan 2025 18:55:00 +0800
Subject: [PATCH 10/12] =?UTF-8?q?OA=E4=BD=93=E5=88=B6=E5=86=85=E8=81=8A?=
=?UTF-8?q?=E5=A4=A9=E6=96=B0=E5=A2=9E=E7=BE=A4=E5=90=8D=E7=A7=B0=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E3=80=81=E5=A4=B4=E5=83=8F=E4=BF=AE=E6=94=B9=E3=80=81?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BE=A4=E5=85=AC=E5=91=8A=E3=80=81=E7=BE=A4?=
=?UTF-8?q?=E5=86=85=E7=A6=81=E8=A8=80=E7=AE=A1=E7=90=86=E7=AD=89=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=EF=BC=8C=E5=B9=B6=E6=8E=A5=E5=85=A5=E7=BD=AE=E9=A1=B6?=
=?UTF-8?q?=E4=BC=9A=E8=AF=9D=E5=92=8C=E6=B6=88=E6=81=AF=E5=85=8D=E6=89=93?=
=?UTF-8?q?=E6=89=B0=E8=AE=BE=E7=BD=AE=E6=8E=A5=E5=8F=A3=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/chatSettings/index.js | 18 ++
src/components/custom-btn/custom-btn.vue | 42 +++
src/pages.json | 32 +++
.../components/groupMembersList.vue | 117 ++++++++
.../components/settingFormItem.vue | 53 +++-
.../chatSettings/groupManage/editAvatar.vue | 95 +++++++
.../groupManage/editGroupName.vue | 127 +++++++++
.../groupManage/manageGroupMembers.vue | 85 ++++++
.../groupManage/manageGroupSilence.vue | 109 +++++++
.../chatSettings/groupManage/manageNotice.vue | 48 +++-
src/pages/chatSettings/index.vue | 269 ++++++++++--------
src/pages/dialog/index.vue | 12 +-
src/pages/index/components/chatItem.vue | 2 +-
src/static/image/chatSettings/add-btn.png | Bin 0 -> 795 bytes
src/static/image/chatSettings/app-icon.png | Bin 0 -> 1548 bytes
src/static/image/chatSettings/clear-btn.png | Bin 0 -> 297 bytes
src/store/modules/talk.js | 4 +
src/uni_modules/tmui/locale/zh-Hans.json | 10 +-
18 files changed, 885 insertions(+), 138 deletions(-)
create mode 100644 src/components/custom-btn/custom-btn.vue
create mode 100644 src/pages/chatSettings/components/groupMembersList.vue
create mode 100644 src/pages/chatSettings/groupManage/editAvatar.vue
create mode 100644 src/pages/chatSettings/groupManage/editGroupName.vue
create mode 100644 src/pages/chatSettings/groupManage/manageGroupMembers.vue
create mode 100644 src/pages/chatSettings/groupManage/manageGroupSilence.vue
create mode 100644 src/static/image/chatSettings/add-btn.png
create mode 100644 src/static/image/chatSettings/app-icon.png
create mode 100644 src/static/image/chatSettings/clear-btn.png
diff --git a/src/api/chatSettings/index.js b/src/api/chatSettings/index.js
index 346c10d..3d124e2 100644
--- a/src/api/chatSettings/index.js
+++ b/src/api/chatSettings/index.js
@@ -27,3 +27,21 @@ export const ServeQueryGroupNotice = (data) => {
data,
})
}
+
+// 置顶聊天会话
+export const ServeTopTalk = (data) => {
+ return request({
+ url: '/api/v1/talk/topping',
+ method: 'POST',
+ data,
+ })
+}
+
+// 免打扰聊天会话
+export const ServeDisturbTalk = (data) => {
+ return request({
+ url: '/api/v1/talk/disturb',
+ method: 'POST',
+ data,
+ })
+}
diff --git a/src/components/custom-btn/custom-btn.vue b/src/components/custom-btn/custom-btn.vue
new file mode 100644
index 0000000..2877c40
--- /dev/null
+++ b/src/components/custom-btn/custom-btn.vue
@@ -0,0 +1,42 @@
+
+
+ {{ props.btnText }}
+
+
+
+
diff --git a/src/pages.json b/src/pages.json
index 964d9d5..be2de0b 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -106,6 +106,38 @@
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
+ },
+ {
+ "path": "pages/chatSettings/groupManage/editGroupName",
+ "type": "page",
+ "style": {
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
+ "path": "pages/chatSettings/groupManage/editAvatar",
+ "type": "page",
+ "style": {
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
+ "path": "pages/chatSettings/groupManage/manageGroupMembers",
+ "type": "page",
+ "style": {
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
+ "path": "pages/chatSettings/groupManage/manageGroupSilence",
+ "type": "page",
+ "style": {
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": false
+ }
}
],
"globalStyle": {
diff --git a/src/pages/chatSettings/components/groupMembersList.vue b/src/pages/chatSettings/components/groupMembersList.vue
new file mode 100644
index 0000000..244f784
--- /dev/null
+++ b/src/pages/chatSettings/components/groupMembersList.vue
@@ -0,0 +1,117 @@
+
+
+
+
+
+
![]()
+
+ {{
+ memberItem.nickname.length >= 2
+ ? memberItem.nickname.slice(-2)
+ : memberItem.nickname
+ }}
+
+
+
+
+ {{ $t('group.identify.admin') }}
+
+
+
+
+ {{ memberItem.nickname }}
+
+
+
+
+
+
+
+
diff --git a/src/pages/chatSettings/components/settingFormItem.vue b/src/pages/chatSettings/components/settingFormItem.vue
index 45c8136..6dfdaa7 100644
--- a/src/pages/chatSettings/components/settingFormItem.vue
+++ b/src/pages/chatSettings/components/settingFormItem.vue
@@ -2,33 +2,39 @@
-
+
dialogueStore.online),
keyboard: computed(() => dialogueStore.keyboard),
num: computed(() => dialogueStore.members.length),
+ memberList: computed(() => dialogueStore.members),
})
const topItems = computed(() => talkStore.topItems)
const disturbItems = computed(() => talkStore.disturbItems)
-
+const groupStore = useGroupStore()
+const groupParams = reactive({
+ groupInfo: computed(() => groupStore.groupInfo),
+})
const state = reactive({
chatGroupMembers: [], //群成员form-item
chatGroupInfos: [], //群聊信息
@@ -192,19 +193,17 @@ const state = reactive({
chatSettings: [], //群聊设置
chatManagement: [], //群聊管理
groupId: '', //群id
- groupInfo: null, //群信息
- memberList: [], //群成员列表
groupNotice: [], //群公告
sessionId: '', //会话id
})
-onLoad((options) => {
+onLoad(async (options) => {
console.log(talkParams)
if (options.groupId) {
console.log(options.groupId)
state.groupId = Number(options.groupId)
- getGroupInfo()
- getGroupMembers()
+ await groupStore.setGroupInfo()
+ updateGroupInfos()
getGroupNotice()
}
if (options.sessionId) {
@@ -287,19 +286,19 @@ onMounted(() => {
//群头像
const groupAvatar = computed(() => {
return (
- state?.groupInfo?.avatar ||
- groupTypeMapping[state?.groupInfo?.group_type]?.defaultImg
+ groupParams?.groupInfo?.avatar ||
+ groupTypeMapping[groupParams?.groupInfo?.group_type]?.defaultImg
)
})
//群名称
const groupName = computed(() => {
- return state?.groupInfo?.group_name
+ return groupParams?.groupInfo?.group_name
})
//群人数
const groupNum = computed(() => {
- return state?.groupInfo?.group_num || 0
+ return groupParams?.groupInfo?.group_num || 0
})
// 映射表-根据groupType设置对应值
@@ -329,46 +328,9 @@ const groupTypeMapping = {
//群类型
const groupType = computed(() => {
- return groupTypeMapping[state?.groupInfo?.group_type]?.result_type || ''
+ return groupTypeMapping[groupParams?.groupInfo?.group_type]?.result_type || ''
})
-//查询群信息
-const getGroupInfo = () => {
- let params = {
- group_id: state.groupId,
- }
- const resp = ServeQueryGroupInfo(params)
- console.log(resp)
- resp.then(({ code, data }) => {
- console.log(data)
- if (code == 200) {
- state.groupInfo = data
- updateGroupInfos()
- } else {
- }
- })
-
- resp.catch(() => {})
-}
-
-//查看群成员
-const getGroupMembers = () => {
- let params = {
- group_id: state.groupId,
- }
- const resp = ServeQueryGroupMembers(params)
- console.log(resp)
- resp.then(({ code, data }) => {
- console.log(data)
- if (code == 200) {
- state.memberList = data.items
- } else {
- }
- })
-
- resp.catch(() => {})
-}
-
//群公告查询
const getGroupNotice = () => {
let params = {
@@ -466,6 +428,10 @@ const toManagePage = (label) => {
uni.navigateTo({
url: '/pages/chatSettings/groupManage/manageGroupSilence',
})
+ } else if (label === t('chat.settings.groupAdmin')) {
+ uni.navigateTo({
+ url: '/pages/chatSettings/groupManage/manageGroupAdmin',
+ })
}
}
}
diff --git a/src/pages/search/components/searchList.vue b/src/pages/search/components/searchList.vue
index fb6401d..cc086fb 100644
--- a/src/pages/search/components/searchList.vue
+++ b/src/pages/search/components/searchList.vue
@@ -22,19 +22,11 @@
>
-
+
diff --git a/src/pages/chatSettings/index.vue b/src/pages/chatSettings/index.vue
index 7719454..1401025 100644
--- a/src/pages/chatSettings/index.vue
+++ b/src/pages/chatSettings/index.vue
@@ -58,7 +58,7 @@
@toManagePage="toManagePage"
>
@@ -158,18 +158,14 @@ import {
useGroupStore,
} from '@/store'
import { onLoad } from '@dcloudio/uni-app'
-import {
- ServeQueryGroupNotice,
- ServeTopTalk,
- ServeDisturbTalk,
-} from '@/api/chatSettings/index'
+import { ServeTopTalkList, ServeSetNotDisturb } from '@/api/chat/index'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
import customInput from '@/components/custom-input/custom-input.vue'
const userStore = useUserStore()
const talkStore = useTalkStore()
const dialogueStore = useDialogueStore()
-const talkParams = reactive({
+const dialogueParams = reactive({
uid: computed(() => userStore.uid),
index_name: computed(() => dialogueStore.index_name),
type: computed(() => dialogueStore.talk.talk_type),
@@ -180,11 +176,14 @@ const talkParams = reactive({
num: computed(() => dialogueStore.members.length),
memberList: computed(() => dialogueStore.members),
})
-const topItems = computed(() => talkStore.topItems)
-const disturbItems = computed(() => talkStore.disturbItems)
+const talkParams = reactive({
+ topItems: computed(() => talkStore.topItems),
+ disturbItems: computed(() => talkStore.disturbItems),
+})
const groupStore = useGroupStore()
const groupParams = reactive({
groupInfo: computed(() => groupStore.groupInfo),
+ groupNotice: computed(() => groupStore.groupNotice),
})
const state = reactive({
chatGroupMembers: [], //群成员form-item
@@ -193,30 +192,29 @@ const state = reactive({
chatSettings: [], //群聊设置
chatManagement: [], //群聊管理
groupId: '', //群id
- groupNotice: [], //群公告
sessionId: '', //会话id
})
onLoad(async (options) => {
- console.log(talkParams)
+ console.log(dialogueParams)
if (options.groupId) {
console.log(options.groupId)
state.groupId = Number(options.groupId)
- await groupStore.setGroupInfo()
+ await groupStore.ServeGroupDetail()
+ await groupStore.ServeGetGroupNotices()
updateGroupInfos()
- getGroupNotice()
}
if (options.sessionId) {
state.sessionId = Number(options.sessionId)
- if (topItems.value.length > 0) {
- topItems.value.forEach((item) => {
+ if (talkParams.topItems.length > 0) {
+ talkParams.topItems.forEach((item) => {
if (item.id == options.sessionId) {
state.sessionInfo = item
}
})
}
- if (disturbItems.value.length > 0) {
- disturbItems.value.forEach((item) => {
+ if (talkParams.disturbItems.length > 0) {
+ talkParams.disturbItems.forEach((item) => {
if (item.id == options.sessionId) {
state.sessionInfo = item
}
@@ -331,25 +329,6 @@ const groupType = computed(() => {
return groupTypeMapping[groupParams?.groupInfo?.group_type]?.result_type || ''
})
-//群公告查询
-const getGroupNotice = () => {
- let params = {
- group_id: state.groupId,
- }
- const resp = ServeQueryGroupNotice(params)
- console.log(resp)
- resp.then(({ code, data }) => {
- console.log(data)
- if (code == 200) {
- state.groupNotice = data.items
- updateGroupInfos()
- } else {
- }
- })
-
- resp.catch(() => {})
-}
-
//更新群信息
const updateGroupInfos = () => {
state.chatGroupMembers = [
@@ -373,7 +352,7 @@ const updateGroupInfos = () => {
label: t('chat.settings.groupNotice'),
hasPointer: true,
value: '',
- subValue: state.groupNotice[0],
+ subValue: groupParams.groupNotice[0],
customInfo: '',
},
{
@@ -439,16 +418,23 @@ const toManagePage = (label) => {
//点击跳转到按条件搜索页
const toSearchByConditionPage = (flag) => {
let condition = ''
- if (flag == 1) {
- condition = 'date'
+ if (flag == 0) {
+ uni.navigateTo({
+ url:
+ '/pages/chatSettings/groupManage/selectMembers?manageType=searchRecord',
+ })
+ } else {
+ if (flag == 1) {
+ condition = 'date'
+ }
+ uni.navigateTo({
+ url:
+ '/pages/search/searchByCondition/index?condition=' +
+ condition +
+ '&receiver_id=' +
+ state.groupId,
+ })
}
- uni.navigateTo({
- url:
- '/pages/search/searchByCondition/index?condition=' +
- condition +
- '&receiver_id=' +
- state.groupId,
- })
}
//切换开关选择
@@ -460,14 +446,14 @@ const changeSwitch = (switchStatus, label) => {
list_id: state.sessionId, //聊天会话的id
type: switchStatus ? 1 : 2,
}
- resp = ServeTopTalk(params)
+ resp = ServeTopTalkList(params)
} else if (label == t('chat.settings.messageNoDisturb')) {
params = {
- talk_type: talkParams.type, //1私聊;2群聊
- receiver_id: talkParams.receiver_id, //接收人id或群id
+ talk_type: dialogueParams.type, //1私聊;2群聊
+ receiver_id: dialogueParams.receiver_id, //接收人id或群id
is_disturb: switchStatus ? 1 : 0, //是否开启免打扰,0不免打扰,1免打扰
}
- resp = ServeDisturbTalk(params)
+ resp = ServeSetNotDisturb(params)
}
console.log(resp)
resp.then(({ code, data }) => {
@@ -475,12 +461,12 @@ const changeSwitch = (switchStatus, label) => {
if (code == 200) {
if (label == t('chat.settings.topSession')) {
talkStore.updateItem({
- index_name: talkParams.index_name,
+ index_name: dialogueParams.index_name,
is_top: switchStatus ? 1 : 2,
})
} else if (label == t('chat.settings.messageNoDisturb')) {
talkStore.updateItem({
- index_name: talkParams.index_name,
+ index_name: dialogueParams.index_name,
is_disturb: switchStatus ? 1 : 0,
})
}
diff --git a/src/store/modules/dialogue.js b/src/store/modules/dialogue.js
index df1d5e8..1b60160 100644
--- a/src/store/modules/dialogue.js
+++ b/src/store/modules/dialogue.js
@@ -119,6 +119,7 @@ export const useDialogueStore = defineStore('dialogue', {
remark: o.remark,
online: false,
value: o.nickname,
+ key: o.key
}))
},
diff --git a/src/store/modules/group.js b/src/store/modules/group.js
index 6a58eef..cdc657d 100644
--- a/src/store/modules/group.js
+++ b/src/store/modules/group.js
@@ -1,5 +1,9 @@
import { defineStore } from 'pinia'
-import { ServeGroupDetail, ServeGetGroupMembers } from '@/api/group/index'
+import {
+ ServeGroupDetail,
+ ServeGetGroupMembers,
+ ServeGetGroupNotices,
+} from '@/api/group/index'
import { useDialogueStore } from '@/store'
export const useGroupStore = defineStore('group', {
@@ -7,15 +11,18 @@ export const useGroupStore = defineStore('group', {
return {
groupInfo: '', //群聊信息
memberList: [], //群成员列表
+ groupNotice: [], //群公告
}
},
getters: {
//获取群聊信息
getGroupInfo: (state) => state.groupInfo,
+ //获取群公告
+ getGroupNotice: (state) => state.groupNotice,
},
actions: {
//获取群聊信息
- async setGroupInfo() {
+ async ServeGroupDetail() {
const dialogueStore = useDialogueStore()
let { code, data } = await ServeGroupDetail({
group_id: dialogueStore.talk.receiver_id,
@@ -25,5 +32,16 @@ export const useGroupStore = defineStore('group', {
this.groupInfo = data
}
},
+ //群公告查询
+ async ServeGetGroupNotices() {
+ const dialogueStore = useDialogueStore()
+ let { code, data } = await ServeGetGroupNotices({
+ group_id: dialogueStore.talk.receiver_id,
+ })
+ if (code == 200) {
+ this.groupNotice = data.items
+ } else {
+ }
+ },
},
})
diff --git a/src/uni_modules/tmui/locale/zh-Hans.json b/src/uni_modules/tmui/locale/zh-Hans.json
index cd34a54..5055012 100644
--- a/src/uni_modules/tmui/locale/zh-Hans.json
+++ b/src/uni_modules/tmui/locale/zh-Hans.json
@@ -115,5 +115,6 @@
"chat.manage.addSilenceMember": "添加禁言成员",
"chatSettings.btn.undoSilence": "解禁",
"silence.tag.hasDone": "已禁言",
- "chat.manage.addAdmin": "添加管理员"
+ "chat.manage.addAdmin": "添加管理员",
+ "search.condition.member": "按群成员查找"
}