From 89380e6260a75d1d3b94de687ebcc2f50d50659d Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 03 Feb 2026 15:44:33 +0800
Subject: [PATCH] feat:环境变量配置调整
---
uniapps/work-app/src/pages/voiceCall/index.vue | 71 ++++++++++++++++++++++-------------
1 files changed, 44 insertions(+), 27 deletions(-)
diff --git a/uniapps/work-app/src/pages/voiceCall/index.vue b/uniapps/work-app/src/pages/voiceCall/index.vue
index ee39a4a..80a3506 100644
--- a/uniapps/work-app/src/pages/voiceCall/index.vue
+++ b/uniapps/work-app/src/pages/voiceCall/index.vue
@@ -2,7 +2,7 @@
<div class="voiceCallContainer" :style="{ paddingTop: topMargin + 'px' }">
<!-- 顶部搜索栏 -->
<div class="searchBar">
- <up-search placeholder="请输入关键字搜索" v-model="defaultParam.searchKeyword" :animation="true" :show-action="false"></up-search>
+ <up-search placeholder="请输入关键字搜索" v-model="defaultParam.friendNickName" :animation="true" :show-action="false" @confirm="onSearch" @search="onSearch" @clear="handleClear"></up-search>
</div>
<!-- 联系人列表 -->
@@ -21,7 +21,7 @@
<!-- 联系人信息 -->
<div class="contactInfo">
<div class="contactName">{{ contact.friendNickName || '未知联系人' }}</div>
- <div class="contactDept">{{ contact.dept || '未知部门' }}</div>
+ <div class="contactDept">{{ contact.deptName || '未知部门' }}</div>
</div>
<!-- 电话按钮 -->
@@ -35,7 +35,7 @@
<!-- 加载提示 -->
<div class="loadingMore">
<text v-if="loading">加载中...</text>
- <text v-else-if="!hasMore && contacts.length > 0">没有更多数据了</text>
+
</div>
</div>
</div>
@@ -43,16 +43,17 @@
<script setup>
import { getStatusBarHeight } from '@/utils/common';
+
const topMargin = getStatusBarHeight()
import { getPhoneBookListApi } from '@/api/voiceCall/index.js'
import { onShow } from '@dcloudio/uni-app'
-import defaultAvatar from '/static/images/defaultAvatar.svg'
+import defaultAvatar from '/static/images/defaultAvatar.svg'
// 联系人数据
const contacts = ref([])
-const defaultParam =ref( {
+const defaultParam = ref({
current: 1,
size: 10,
- searchKeyword:''
+ friendNickName: ''
})
// 加载状态
@@ -62,19 +63,16 @@
// 获取通讯录
const getPhoneBookList = () => {
if (loading.value || !hasMore.value) return
-
loading.value = true
// 添加分页参数
const params = {
current: defaultParam.value.current,
size: defaultParam.value.size,
- searchKeyword: defaultParam.value.searchKeyword
+ friendNickName: defaultParam.value.friendNickName
}
getPhoneBookListApi(params).then(res => {
const response = res.data.data
- console.log('通讯录', response)
-
if (defaultParam.value.current === 1) {
contacts.value = response.records
} else {
@@ -108,15 +106,25 @@
defaultParam.value.current++
getPhoneBookList()
}
+const onSearch = () => {
+ defaultParam.value.current = 1
+ hasMore.value = true
+ getPhoneBookList()
+}
+const handleClear = () => {
+ defaultParam.value.friendNickName = ''
+ defaultParam.value.current = 1
+ hasMore.value = true
+ getPhoneBookList()
+}
// 拨打电话方法
const makeCall = (contact) => {
- const contactName = contact.friendNickName || '未知联系人'
- console.log('拨打电话给', contactName)
- // 这里可以添加实际的拨打电话逻辑
- uni.showToast({
- title: `正在拨打${contactName}的电话`,
- icon: 'none'
+ console.log('拨打电话', contact)
+ // 将contact对象转换为JSON字符串并URL编码
+ const contactStr = encodeURIComponent(JSON.stringify(contact))
+ uni.navigateTo({
+ url: `/subPackages/voiceCallDetail/index?contact=${contactStr}`,
})
}
@@ -143,14 +151,22 @@
}
.searchBar {
- padding: 20rpx;
+ padding: 20rpx 20rpx 0 20rpx;
display: flex;
align-items: center;
height: 108rpx;
+ :deep(){
+ .u-search__content{
+ background: #fff !important;
+ }
+ .u-search__content__input{
+ background: #fff !important;
+ }
+ }
}
.contactList {
- margin: 0 24rpx;
+ margin: 0 20rpx 20rpx 20rpx;
background: #fff;
border-radius: 12rpx;
overflow-y: auto;
@@ -162,7 +178,7 @@
.contactItem {
display: flex;
align-items: center;
- padding: 0 24rpx;
+ padding: 0 20rpx;
}
@@ -224,12 +240,13 @@
height: 60rpx;
}
- .loadingMore {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 80rpx;
- font-size: 28rpx;
- color: #999;
- }
+
+.loadingMore {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 80rpx;
+ font-size: 28rpx;
+ color: #999;
+}
</style>
--
Gitblit v1.9.3