产品化: 统一title
This commit is contained in:
@@ -11,6 +11,38 @@ interceptorChooseImage()
|
||||
// #endif
|
||||
const db = uniCloud.database()
|
||||
|
||||
/**
|
||||
* 跳转到登录页面
|
||||
*/
|
||||
function redirectToLogin() {
|
||||
const loginPage = '/uni_modules/uni-id-pages/pages/login/login-withpwd'
|
||||
const pages = getCurrentPages()
|
||||
|
||||
// 如果当前已经在登录页,不重复跳转
|
||||
if (pages.length > 0) {
|
||||
const currentPage = pages[pages.length - 1]
|
||||
if (currentPage.route && currentPage.route.includes('login')) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
uni.reLaunch({
|
||||
url: loginPage,
|
||||
fail: (err) => {
|
||||
console.error('跳转登录页失败:', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否为登录相关接口(不需要租户ID的接口)
|
||||
*/
|
||||
function isLoginApi(url) {
|
||||
if (!url) return false
|
||||
// 登录接口不需要租户ID
|
||||
return url.includes('/api/sys/auth/login')
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置全局 uni.request 拦截器,自动添加 X-Tenant-Id header
|
||||
*/
|
||||
@@ -30,6 +62,14 @@ function setupRequestInterceptor() {
|
||||
console.error('获取 tenantId 失败:', e)
|
||||
}
|
||||
|
||||
// 检查是否需要登录:如果不是登录接口且租户ID为空,则跳转到登录页
|
||||
if (!isLoginApi(url) && !tenantId) {
|
||||
console.warn('[Request Interceptor] 租户ID为空,跳转到登录页面')
|
||||
redirectToLogin()
|
||||
// 返回一个被拒绝的Promise,阻止请求继续执行
|
||||
return Promise.reject(new Error('未登录,请先登录'))
|
||||
}
|
||||
|
||||
// 构建新的 header(保留原有的 header,避免覆盖)
|
||||
const newHeader = {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
@@ -17,6 +17,38 @@ function getTenantId() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转到登录页面
|
||||
*/
|
||||
function redirectToLogin() {
|
||||
const loginPage = '/uni_modules/uni-id-pages/pages/login/login-withpwd'
|
||||
const pages = getCurrentPages()
|
||||
|
||||
// 如果当前已经在登录页,不重复跳转
|
||||
if (pages.length > 0) {
|
||||
const currentPage = pages[pages.length - 1]
|
||||
if (currentPage.route && currentPage.route.includes('login')) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
uni.reLaunch({
|
||||
url: loginPage,
|
||||
fail: (err) => {
|
||||
console.error('跳转登录页失败:', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否为登录相关接口(不需要租户ID的接口)
|
||||
*/
|
||||
function isLoginApi(url) {
|
||||
if (!url) return false
|
||||
// 登录接口不需要租户ID
|
||||
return url.includes('/api/sys/auth/login')
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 token(从本地存储)
|
||||
*/
|
||||
@@ -84,6 +116,15 @@ export function request(options = {}) {
|
||||
// 技术方案:登录返回的 LoginResponse 中包含 tenantId,前端保存后自动添加到所有请求的 header 中
|
||||
if (needTenantId) {
|
||||
const tenantId = getTenantId()
|
||||
|
||||
// 检查是否需要登录:如果不是登录接口且租户ID为空,则跳转到登录页
|
||||
if (!isLoginApi(fullUrl) && !tenantId) {
|
||||
console.warn('[Request] 租户ID为空,跳转到登录页面')
|
||||
redirectToLogin()
|
||||
// 返回一个被拒绝的Promise,阻止请求继续执行
|
||||
return Promise.reject(new Error('未登录,请先登录'))
|
||||
}
|
||||
|
||||
if (tenantId) {
|
||||
// 将 tenantId 放入 X-Tenant-Id header(适用于所有请求类型:GET、POST、PUT、DELETE)
|
||||
requestHeader['X-Tenant-Id'] = tenantId
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<uni-nav-bar
|
||||
:fixed="true"
|
||||
:statusBar="true"
|
||||
title="销冠"
|
||||
title="AI销管系统"
|
||||
leftIcon="left"
|
||||
@clickLeft="goBack"
|
||||
color="#333"
|
||||
@@ -16,11 +16,6 @@
|
||||
</uni-nav-bar>
|
||||
|
||||
<view class="content">
|
||||
<!-- AI功能横幅 -->
|
||||
<view class="ai-banner">
|
||||
<text class="banner-text">AI让销售过程和团队管理更透明</text>
|
||||
</view>
|
||||
|
||||
<!-- 标签页 -->
|
||||
<scroll-view class="tabs-scroll" scroll-x="true" show-scrollbar="false">
|
||||
<view class="tabs">
|
||||
@@ -123,11 +118,11 @@
|
||||
</view>
|
||||
|
||||
<view class="customer-tags">
|
||||
<view class="tag-item tag-blue" v-if="item.content">
|
||||
<text>详情: {{ getContentPreview(item.content) }}</text>
|
||||
<view class="tag-item tag-blue" v-if="item.content || item.detail">
|
||||
<text @tap.stop="showFullText('详情', item.content || item.detail)">详情: {{ getContentPreview(item.content || item.detail, 30) }}</text>
|
||||
</view>
|
||||
<view class="tag-item tag-orange" v-if="item.remark">
|
||||
<text>备注: {{ item.remark }}</text>
|
||||
<text @tap.stop="showFullText('提示词', item.remark)">提示词: {{ getContentPreview(item.remark, 30) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -198,18 +193,24 @@
|
||||
/>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<text class="form-item__label">文件上传</text>
|
||||
<view class="file-upload-area">
|
||||
<view class="file-item" v-if="practiceForm.file">
|
||||
<text class="file-name">{{ practiceForm.file.name || '文件' }}</text>
|
||||
<view class="file-delete" @click="removePracticeFile">
|
||||
<uni-icons type="close" size="16" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="file-upload-btn" v-if="!practiceForm.file" @click="choosePracticeFile">
|
||||
<uni-icons type="plus" size="24" color="#2A68FF"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<text class="form-item__label">详情</text>
|
||||
<textarea
|
||||
class="form-item__textarea"
|
||||
v-model="practiceForm.content"
|
||||
placeholder="请输入详情内容"
|
||||
placeholder-style="color: #9ca3af"
|
||||
maxlength="2000"
|
||||
/>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<text class="form-item__label">提示词</text>
|
||||
<textarea
|
||||
class="form-item__textarea"
|
||||
v-model="practiceForm.remark"
|
||||
placeholder="请输入提示词"
|
||||
placeholder-style="color: #9ca3af"
|
||||
maxlength="500"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -255,6 +256,8 @@
|
||||
placeholder="请输入知识分类"
|
||||
placeholder-style="color: #9ca3af"
|
||||
maxlength="100"
|
||||
:disabled="true"
|
||||
readonly
|
||||
/>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
@@ -278,11 +281,11 @@
|
||||
/>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<text class="form-item__label">备注</text>
|
||||
<input
|
||||
class="form-item__input"
|
||||
<text class="form-item__label">提示词</text>
|
||||
<textarea
|
||||
class="form-item__textarea"
|
||||
v-model="editPracticeForm.remark"
|
||||
placeholder="请输入备注"
|
||||
placeholder="请输入提示词"
|
||||
placeholder-style="color: #9ca3af"
|
||||
maxlength="500"
|
||||
/>
|
||||
@@ -378,11 +381,11 @@
|
||||
</view>
|
||||
|
||||
<view class="customer-tags">
|
||||
<view class="tag-item tag-blue" v-if="item.content">
|
||||
<text>详情: {{ getContentPreview(item.content) }}</text>
|
||||
<view class="tag-item tag-blue" v-if="item.content || item.detail">
|
||||
<text @tap.stop="showFullText('详情', item.content || item.detail)">详情: {{ getContentPreview(item.content || item.detail, 30) }}</text>
|
||||
</view>
|
||||
<view class="tag-item tag-orange" v-if="item.remark">
|
||||
<text>备注: {{ item.remark }}</text>
|
||||
<text @tap.stop="showFullText('提示词', item.remark)">提示词: {{ getContentPreview(item.remark, 30) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -558,6 +561,21 @@
|
||||
|
||||
<!-- 上下文菜单遮罩层 -->
|
||||
<view class="context-menu-mask" v-if="contextMenuVisible" @tap="closeContextMenu"></view>
|
||||
|
||||
<!-- 内容详情弹出框 -->
|
||||
<view class="content-popup-mask" v-if="showContentPopup" @click="closeContentPopup">
|
||||
</view>
|
||||
<view class="content-popup" v-if="showContentPopup" @click.stop>
|
||||
<view class="content-popup-header">
|
||||
<text class="content-popup-title">{{ contentPopupTitle }}</text>
|
||||
<view class="content-popup-close" @click="closeContentPopup">
|
||||
<uni-icons type="close" size="20" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view class="content-popup-body" scroll-y>
|
||||
<text class="content-popup-text">{{ contentPopupText }}</text>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -645,7 +663,8 @@
|
||||
title: '',
|
||||
category: '',
|
||||
industry: '',
|
||||
files: []
|
||||
content: '',
|
||||
remark: ''
|
||||
},
|
||||
// 编辑陪练弹出框
|
||||
showEditPracticePopup: false,
|
||||
@@ -661,7 +680,11 @@
|
||||
practiceContextMenuVisible: false,
|
||||
practiceContextMenuIndex: -1,
|
||||
practiceContextMenuTop: 0,
|
||||
practiceContextMenuLeft: 0
|
||||
practiceContextMenuLeft: 0,
|
||||
// 内容详情弹出框
|
||||
showContentPopup: false,
|
||||
contentPopupTitle: '',
|
||||
contentPopupText: ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -794,9 +817,22 @@
|
||||
// 查看素材详情
|
||||
console.log('查看素材详情', item);
|
||||
},
|
||||
getContentPreview(content) {
|
||||
getContentPreview(content, limit = 30) {
|
||||
if (!content) return '';
|
||||
return content.length > 10 ? content.substring(0, 10) : content;
|
||||
const text = String(content).replace(/\s+/g, ' ').trim();
|
||||
if (!text) return '';
|
||||
return text.length > limit ? `${text.substring(0, limit)}...` : text;
|
||||
},
|
||||
showFullText(title, content) {
|
||||
if (!content) return;
|
||||
this.contentPopupTitle = title || '详情';
|
||||
this.contentPopupText = String(content);
|
||||
this.showContentPopup = true;
|
||||
},
|
||||
closeContentPopup() {
|
||||
this.showContentPopup = false;
|
||||
this.contentPopupTitle = '';
|
||||
this.contentPopupText = '';
|
||||
},
|
||||
showContextMenu(item, index, event) {
|
||||
// 阻止事件冒泡
|
||||
@@ -1457,7 +1493,8 @@
|
||||
title: '',
|
||||
category: 'AI陪练虚拟人', // 固定值,不可修改
|
||||
industry: '汽车销售', // 默认值
|
||||
file: null
|
||||
content: '',
|
||||
remark: ''
|
||||
};
|
||||
},
|
||||
closePracticePopup() {
|
||||
@@ -1538,85 +1575,41 @@
|
||||
// 获取租户ID
|
||||
const tenantId = getTenantId();
|
||||
|
||||
let res;
|
||||
const payload = {
|
||||
title: this.practiceForm.title.trim(),
|
||||
category: this.practiceForm.category?.trim() || '',
|
||||
industry: this.practiceForm.industry?.trim() || '',
|
||||
content: this.practiceForm.content?.trim() || '',
|
||||
remark: this.practiceForm.remark?.trim() || ''
|
||||
};
|
||||
|
||||
// 如果有文件,使用 uni.uploadFile 同时上传文件和其他表单数据
|
||||
if (this.practiceForm.file) {
|
||||
// 使用 uni.uploadFile 将文件和其他字段一起提交
|
||||
const formData = {
|
||||
// 其他表单字段
|
||||
'title': this.practiceForm.title.trim(),
|
||||
'category': this.practiceForm.category?.trim() || '',
|
||||
'industry': this.practiceForm.industry?.trim() || '',
|
||||
'content': '-',
|
||||
'fileName': this.practiceForm.file.name || 'file' // 文件名
|
||||
};
|
||||
|
||||
// 添加租户ID到formData
|
||||
if (tenantId) {
|
||||
formData['tenantId'] = tenantId;
|
||||
}
|
||||
|
||||
res = await uni.uploadFile({
|
||||
url: getApiUrl('/api/knowledgeBase/add'),
|
||||
filePath: this.practiceForm.file.path,
|
||||
name: 'file', // 文件字段名
|
||||
formData: formData,
|
||||
header: tenantId ? {
|
||||
'X-Tenant-Id': tenantId
|
||||
} : {},
|
||||
timeout: 15000
|
||||
});
|
||||
} else {
|
||||
// 如果没有文件,使用 uni.request 提交表单数据
|
||||
const payload = {
|
||||
title: this.practiceForm.title.trim(),
|
||||
category: this.practiceForm.category?.trim() || '',
|
||||
industry: this.practiceForm.industry?.trim() || '',
|
||||
content: "-"
|
||||
};
|
||||
|
||||
// 添加租户ID到payload
|
||||
if (tenantId) {
|
||||
payload.tenantId = tenantId;
|
||||
}
|
||||
|
||||
const headers = {
|
||||
"Content-Type": "application/json"
|
||||
};
|
||||
|
||||
// 添加租户ID到header
|
||||
if (tenantId) {
|
||||
headers['X-Tenant-Id'] = tenantId;
|
||||
}
|
||||
|
||||
res = await uni.request({
|
||||
url: getApiUrl('/api/knowledgeBase/add'),
|
||||
method: 'POST',
|
||||
data: payload,
|
||||
header: headers,
|
||||
timeout: 15000
|
||||
});
|
||||
// 添加租户ID到payload
|
||||
if (tenantId) {
|
||||
payload.tenantId = tenantId;
|
||||
}
|
||||
|
||||
const headers = {
|
||||
"Content-Type": "application/json"
|
||||
};
|
||||
|
||||
// 添加租户ID到header
|
||||
if (tenantId) {
|
||||
headers['X-Tenant-Id'] = tenantId;
|
||||
}
|
||||
|
||||
const res = await uni.request({
|
||||
url: getApiUrl('/api/knowledgeBase/add'),
|
||||
method: 'POST',
|
||||
data: payload,
|
||||
header: headers,
|
||||
timeout: 15000
|
||||
});
|
||||
|
||||
uni.hideLoading();
|
||||
|
||||
// 处理响应(uni.uploadFile 返回的 data 可能是字符串,需要解析)
|
||||
let result;
|
||||
if (this.practiceForm.file) {
|
||||
// uni.uploadFile 返回的数据需要解析
|
||||
try {
|
||||
result = typeof res.data === 'string' ? JSON.parse(res.data) : res.data;
|
||||
} catch (e) {
|
||||
result = res.data;
|
||||
}
|
||||
} else {
|
||||
result = res.data;
|
||||
}
|
||||
|
||||
if (res.statusCode === 200 && result && (result.success || result.code === 200)) {
|
||||
if (res.statusCode === 200 && res.data && (res.data.success || res.data.code === 200)) {
|
||||
uni.showToast({
|
||||
title: result?.message || "提交成功",
|
||||
title: res.data?.message || "提交成功",
|
||||
icon: "success"
|
||||
});
|
||||
// 关闭弹出框并刷新列表
|
||||
@@ -1625,7 +1618,7 @@
|
||||
this.fetchPracticeList({ force: true });
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: result?.message || "提交失败",
|
||||
title: res.data?.message || "提交失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
@@ -1653,35 +1646,38 @@
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-top: 88rpx;
|
||||
padding-top: 0; /* 移除padding-top,因为tab页和内容区域都使用绝对定位 */
|
||||
margin-top: 0;
|
||||
position: relative;
|
||||
min-height: 100vh; /* 确保content有足够高度 */
|
||||
}
|
||||
|
||||
/* AI功能横幅 */
|
||||
.ai-banner {
|
||||
background-color: #E3F2FD;
|
||||
padding: 24rpx 16rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.banner-text {
|
||||
font-size: 28rpx;
|
||||
color: #1976D2;
|
||||
flex: 1;
|
||||
/* 隐藏导航栏占位区域,避免产生空白 */
|
||||
::v-deep .uni-navbar__placeholder {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* 标签页 */
|
||||
.tabs-scroll {
|
||||
position: fixed;
|
||||
top: 88rpx; /* 导航栏高度 */
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
background-color: #FFFFFF;
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
white-space: nowrap;
|
||||
margin-top: 0;
|
||||
z-index: 999;
|
||||
height: 72rpx; /* 设置固定高度,确保tabs可见 */
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: inline-flex;
|
||||
padding: 0 16rpx;
|
||||
height: 100%; /* 确保tabs占满scroll-view的高度 */
|
||||
align-items: center; /* 垂直居中 */
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
@@ -1711,12 +1707,27 @@
|
||||
border-radius: 2rpx;
|
||||
}
|
||||
|
||||
/* 内容区域 */
|
||||
/* 内容区域 - 使用绝对定位,从tab页底部开始,到底部导航栏结束 */
|
||||
.tab-content {
|
||||
height: calc(100vh - 300rpx);
|
||||
position: absolute;
|
||||
top: 160rpx; /* 导航栏(88rpx) + tab页(72rpx) = 160rpx */
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 96rpx; /* 底部导航栏高度 */
|
||||
background-color: #F5F5F5;
|
||||
padding: 24rpx 16rpx;
|
||||
padding: 24rpx 16rpx 0 16rpx; /* 顶部24rpx间距,底部0 */
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
/* 素材内容区域和陪练内容区域使用相同定位 */
|
||||
.material-content,
|
||||
.practice-content {
|
||||
position: absolute;
|
||||
top: 160rpx; /* 导航栏(88rpx) + tab页(72rpx) = 160rpx */
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 96rpx; /* 底部导航栏高度 */
|
||||
}
|
||||
|
||||
.champion-card {
|
||||
@@ -1745,59 +1756,62 @@
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* 素材内容样式 - 参考标签管理 */
|
||||
.material-content {
|
||||
height: calc(100vh - 300rpx);
|
||||
background-color: #F5F5F5;
|
||||
padding: 24rpx 16rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.service-status-toolbar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
margin-bottom: 24rpx;
|
||||
gap: 2rpx;
|
||||
padding: 4rpx 4rpx;
|
||||
margin-bottom: 4rpx;
|
||||
background-color: #F8F8FA;
|
||||
border-radius: 16rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 1px solid #EFEFF2;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.toolbar-total {
|
||||
font-size: 26rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
margin-right: 16rpx;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
margin-right: 2rpx;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.toolbar-input {
|
||||
flex: 1;
|
||||
min-width: 150rpx;
|
||||
min-width: 100rpx;
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
background-color: #F5F6FA;
|
||||
border-radius: 12rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 8rpx;
|
||||
padding: 0 8rpx;
|
||||
font-size: 24rpx;
|
||||
border: 1px solid transparent;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.toolbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: auto;
|
||||
flex-shrink: 0;
|
||||
gap: 2rpx;
|
||||
}
|
||||
|
||||
.toolbar-btn {
|
||||
padding: 0 16rpx;
|
||||
height: 72rpx;
|
||||
padding: 0 6rpx;
|
||||
height: 48rpx;
|
||||
min-width: 48rpx;
|
||||
color: #2A68FF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8rpx;
|
||||
font-size: 28rpx;
|
||||
gap: 2rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.service-card {
|
||||
@@ -2011,9 +2025,10 @@
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 90vw;
|
||||
max-width: 620rpx;
|
||||
width: calc(100vw - 80rpx);
|
||||
max-width: 90%;
|
||||
box-sizing: border-box;
|
||||
height: 80vh;
|
||||
max-height: 80vh;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
@@ -2021,6 +2036,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.2);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.popup-header {
|
||||
@@ -2029,6 +2045,7 @@
|
||||
justify-content: space-between;
|
||||
padding: 32rpx;
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.popup-title {
|
||||
@@ -2047,9 +2064,10 @@
|
||||
|
||||
.popup-content {
|
||||
flex: 1;
|
||||
max-height: calc(80vh - 200rpx);
|
||||
min-height: 0;
|
||||
padding: 20rpx 20rpx 28rpx;
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.form-card {
|
||||
@@ -2173,6 +2191,7 @@
|
||||
gap: 24rpx;
|
||||
padding: 24rpx;
|
||||
border-top: 1px solid #E0E0E0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.popup-btn {
|
||||
@@ -2210,5 +2229,73 @@
|
||||
.popup-btn--submit .popup-btn__text {
|
||||
color: #2A68FF;
|
||||
}
|
||||
|
||||
/* 内容详情弹出框样式 */
|
||||
.content-popup-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.content-popup {
|
||||
position: fixed;
|
||||
left: 10%;
|
||||
right: 10%;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
box-sizing: border-box;
|
||||
max-height: calc(100vh - 320rpx);
|
||||
height: auto;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.2);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.content-popup-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 32rpx;
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.content-popup-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.content-popup-close {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.content-popup-body {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
padding: 32rpx;
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.content-popup-text {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
line-height: 1.8;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -1,7 +1,31 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="list-header">
|
||||
<text class="total">共{{ list.length }}条</text>
|
||||
<view class="customer-list-container">
|
||||
<view class="service-status-toolbar">
|
||||
<text class="toolbar-total">共{{ list.length }}条</text>
|
||||
<input
|
||||
class="toolbar-input"
|
||||
v-model="salesName"
|
||||
placeholder="所属销售姓名"
|
||||
placeholder-style="color: #b0b0b0"
|
||||
confirm-type="search"
|
||||
@confirm="handleRefresh"
|
||||
@input="onInputChange"
|
||||
/>
|
||||
<input
|
||||
class="toolbar-input"
|
||||
v-model="customerName"
|
||||
placeholder="客户姓名"
|
||||
placeholder-style="color: #b0b0b0"
|
||||
confirm-type="search"
|
||||
@confirm="handleRefresh"
|
||||
@input="onInputChange"
|
||||
/>
|
||||
<view class="toolbar-actions">
|
||||
<view class="toolbar-btn toolbar-btn--refresh" @click="handleRefresh">
|
||||
<uni-icons type="refresh" size="18" color="#2A68FF"></uni-icons>
|
||||
<text>刷新</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view class="customer-list" scroll-y>
|
||||
<view
|
||||
@@ -44,33 +68,119 @@
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
salesName: '',
|
||||
customerName: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onInputChange() {
|
||||
// 输入框变化时,可以在这里添加实时搜索逻辑(如果需要)
|
||||
},
|
||||
handleRefresh() {
|
||||
// 触发刷新事件,并传递查询参数
|
||||
this.$emit('filterClick', {
|
||||
salesName: this.salesName.trim(),
|
||||
customerName: this.customerName.trim()
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.list-header {
|
||||
.customer-list-container {
|
||||
/* 使用绝对定位,从tab页底部开始,到底部导航栏结束 */
|
||||
position: absolute;
|
||||
top: 160rpx; /* 导航栏(88rpx) + tab页(72rpx) = 160rpx */
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 96rpx; /* 底部导航栏高度 */
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 24rpx 16rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.total {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.customer-list {
|
||||
height: calc(100vh - 300rpx);
|
||||
flex-direction: column;
|
||||
background-color: #F5F5F5;
|
||||
padding: 24rpx 16rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.service-status-toolbar {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
gap: 8rpx; /* 增加间距,避免元素被挤压 */
|
||||
padding: 12rpx 8rpx; /* 增加内边距,给搜索框更多空间 */
|
||||
margin-bottom: 24rpx; /* 与列表项间距保持一致(24rpx) */
|
||||
background-color: #F8F8FA;
|
||||
border-radius: 8rpx;
|
||||
border: 1px solid #EFEFF2;
|
||||
overflow-x: auto;
|
||||
min-height: 64rpx; /* 设置最小高度,确保搜索区域不被挤压 */
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0; /* 防止被压缩 */
|
||||
}
|
||||
|
||||
.toolbar-total {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
margin-right: 8rpx; /* 增加右边距,与搜索框保持距离 */
|
||||
line-height: 1.2;
|
||||
padding: 0 4rpx; /* 增加左右内边距 */
|
||||
}
|
||||
|
||||
.toolbar-input {
|
||||
flex: 1;
|
||||
min-width: 120rpx; /* 增加最小宽度,避免被挤压变形 */
|
||||
max-width: 200rpx; /* 设置最大宽度,保持合理比例 */
|
||||
height: 56rpx; /* 稍微增加高度,提升可用性 */
|
||||
line-height: 56rpx;
|
||||
background-color: #F5F6FA;
|
||||
border-radius: 8rpx;
|
||||
padding: 0 12rpx; /* 增加左右内边距 */
|
||||
font-size: 24rpx;
|
||||
border: 1px solid transparent;
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 1; /* 允许适当收缩,但保持最小宽度 */
|
||||
}
|
||||
|
||||
.toolbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: auto;
|
||||
flex-shrink: 0;
|
||||
gap: 8rpx; /* 增加按钮之间的间距 */
|
||||
}
|
||||
|
||||
.toolbar-btn {
|
||||
padding: 0 12rpx; /* 增加左右内边距 */
|
||||
height: 56rpx; /* 与输入框高度保持一致 */
|
||||
min-width: 56rpx;
|
||||
color: #2A68FF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4rpx; /* 增加图标和文字之间的间距 */
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.toolbar-btn text {
|
||||
color: #2A68FF;
|
||||
}
|
||||
|
||||
.customer-list {
|
||||
/* 使用flex填充剩余空间 */
|
||||
flex: 1;
|
||||
background-color: transparent;
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.customer-card {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -1,22 +1,30 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="list-header">
|
||||
<text class="total">共{{ total || list.length }}条</text>
|
||||
<view class="filter-inputs">
|
||||
<input
|
||||
class="filter-input"
|
||||
v-model="salesName"
|
||||
placeholder="所属销售姓名"
|
||||
@input="onInputChange" />
|
||||
<input
|
||||
class="filter-input"
|
||||
v-model="customerName"
|
||||
placeholder="客户姓名"
|
||||
@input="onInputChange" />
|
||||
</view>
|
||||
<view class="refresh-btn" @click="handleRefresh">
|
||||
<uni-icons type="reload" size="16" color="#007AFF"></uni-icons>
|
||||
<text>刷新</text>
|
||||
<view class="service-list-container">
|
||||
<view class="service-status-toolbar">
|
||||
<text class="toolbar-total">共{{ total || list.length }}条</text>
|
||||
<input
|
||||
class="toolbar-input"
|
||||
v-model="salesName"
|
||||
placeholder="所属销售姓名"
|
||||
placeholder-style="color: #b0b0b0"
|
||||
confirm-type="search"
|
||||
@confirm="handleRefresh"
|
||||
@input="onInputChange"
|
||||
/>
|
||||
<input
|
||||
class="toolbar-input"
|
||||
v-model="customerName"
|
||||
placeholder="客户姓名"
|
||||
placeholder-style="color: #b0b0b0"
|
||||
confirm-type="search"
|
||||
@confirm="handleRefresh"
|
||||
@input="onInputChange"
|
||||
/>
|
||||
<view class="toolbar-actions">
|
||||
<view class="toolbar-btn toolbar-btn--refresh" @click="handleRefresh">
|
||||
<uni-icons type="refresh" size="18" color="#2A68FF"></uni-icons>
|
||||
<text>刷新</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view class="service-list" scroll-y @scrolltolower="onReachBottom">
|
||||
@@ -90,69 +98,104 @@
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.list-header {
|
||||
.service-list-container {
|
||||
/* 使用绝对定位,从tab页底部开始,到底部导航栏结束 */
|
||||
position: absolute;
|
||||
top: 160rpx; /* 导航栏(88rpx) + tab页(72rpx) = 160rpx */
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 96rpx; /* 底部导航栏高度 */
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 24rpx 32rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
gap: 16rpx;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.total {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.filter-inputs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
gap: 16rpx;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.filter-input {
|
||||
flex: 1;
|
||||
height: 64rpx;
|
||||
padding: 0 24rpx;
|
||||
flex-direction: column;
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 8rpx;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
padding: 24rpx 16rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.filter-input::placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.refresh-btn {
|
||||
.service-status-toolbar {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
padding: 8rpx 16rpx;
|
||||
background-color: #F5F5F5;
|
||||
gap: 8rpx; /* 增加间距,避免元素被挤压 */
|
||||
padding: 12rpx 8rpx; /* 增加内边距,给搜索框更多空间 */
|
||||
margin-bottom: 24rpx; /* 与列表项间距保持一致(24rpx) */
|
||||
background-color: #F8F8FA;
|
||||
border-radius: 8rpx;
|
||||
flex-shrink: 0;
|
||||
border: 1px solid #EFEFF2;
|
||||
overflow-x: auto;
|
||||
min-height: 64rpx; /* 设置最小高度,确保搜索区域不被挤压 */
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0; /* 防止被压缩 */
|
||||
}
|
||||
|
||||
.refresh-btn text {
|
||||
.toolbar-total {
|
||||
font-size: 24rpx;
|
||||
color: #007AFF;
|
||||
margin-left: 8rpx;
|
||||
color: #666;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
margin-right: 8rpx; /* 增加右边距,与搜索框保持距离 */
|
||||
line-height: 1.2;
|
||||
padding: 0 4rpx; /* 增加左右内边距 */
|
||||
}
|
||||
|
||||
.toolbar-input {
|
||||
flex: 1;
|
||||
min-width: 120rpx; /* 增加最小宽度,避免被挤压变形 */
|
||||
max-width: 200rpx; /* 设置最大宽度,保持合理比例 */
|
||||
height: 56rpx; /* 稍微增加高度,提升可用性 */
|
||||
line-height: 56rpx;
|
||||
background-color: #F5F6FA;
|
||||
border-radius: 8rpx;
|
||||
padding: 0 12rpx; /* 增加左右内边距 */
|
||||
font-size: 24rpx;
|
||||
border: 1px solid transparent;
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 1; /* 允许适当收缩,但保持最小宽度 */
|
||||
}
|
||||
|
||||
.toolbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: auto;
|
||||
flex-shrink: 0;
|
||||
gap: 8rpx; /* 增加按钮之间的间距 */
|
||||
}
|
||||
|
||||
.toolbar-btn {
|
||||
padding: 0 12rpx; /* 增加左右内边距 */
|
||||
height: 56rpx; /* 与输入框高度保持一致 */
|
||||
min-width: 56rpx;
|
||||
color: #2A68FF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4rpx; /* 增加图标和文字之间的间距 */
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.toolbar-btn text {
|
||||
color: #2A68FF;
|
||||
}
|
||||
|
||||
.service-list {
|
||||
height: calc(100vh - 420rpx);
|
||||
background-color: #FFFFFF;
|
||||
/* 使用flex填充剩余空间 */
|
||||
flex: 1;
|
||||
background-color: transparent;
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.service-item {
|
||||
padding: 32rpx;
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
padding: 32rpx;
|
||||
margin-bottom: 24rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.service-header {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<uni-nav-bar
|
||||
:fixed="true"
|
||||
:statusBar="true"
|
||||
title="AI销冠系统"
|
||||
title="AI销管系统"
|
||||
leftIcon="left"
|
||||
@clickLeft="goBack"
|
||||
color="#333"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<uni-nav-bar
|
||||
:fixed="true"
|
||||
:statusBar="true"
|
||||
title="AI销冠系统"
|
||||
title="AI销管系统"
|
||||
leftIcon="left"
|
||||
@clickLeft="goBack"
|
||||
color="#333"
|
||||
@@ -45,7 +45,8 @@
|
||||
<CustomerList
|
||||
v-if="activeTab === 'customer'"
|
||||
:list="customerList"
|
||||
@itemClick="viewCustomerDetail" />
|
||||
@itemClick="viewCustomerDetail"
|
||||
@filterClick="refreshCustomerList" />
|
||||
</view>
|
||||
|
||||
<!-- 客户档案弹窗 -->
|
||||
@@ -566,6 +567,11 @@
|
||||
// 重新加载数据,传递查询参数
|
||||
this.loadServiceList(filterParams);
|
||||
},
|
||||
refreshCustomerList(filterParams = {}) {
|
||||
// 客户列表刷新方法(可以根据需要实现搜索逻辑)
|
||||
console.log('客户列表刷新', filterParams);
|
||||
// TODO: 实现客户列表的搜索和刷新逻辑
|
||||
},
|
||||
// 服务记录列表到底部加载更多
|
||||
onServiceListReachBottom() {
|
||||
// 如果已经加载全部数据,则不再请求
|
||||
@@ -1722,15 +1728,28 @@
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-top: 88rpx; /* 导航栏高度 */
|
||||
padding-top: 0; /* 移除padding-top,因为tab页和列表组件都使用绝对定位 */
|
||||
margin-top: 0;
|
||||
position: relative;
|
||||
min-height: 100vh; /* 确保content有足够高度 */
|
||||
}
|
||||
|
||||
/* 标签页 */
|
||||
/* 隐藏导航栏占位区域,避免产生空白 */
|
||||
::v-deep .uni-navbar__placeholder {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* 标签页 - 使用绝对定位紧贴导航栏 */
|
||||
.tabs {
|
||||
display: flex;
|
||||
background-color: #FFFFFF;
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
padding: 0 32rpx;
|
||||
position: absolute;
|
||||
top: 88rpx; /* 导航栏高度 */
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
<uni-nav-bar
|
||||
:fixed="true"
|
||||
:statusBar="true"
|
||||
title="AI销售管理"
|
||||
:border="false"
|
||||
title="AI销管系统"
|
||||
leftIcon="left"
|
||||
@clickLeft="goBack"
|
||||
color="#333"
|
||||
@@ -16,11 +17,6 @@
|
||||
</uni-nav-bar>
|
||||
|
||||
<view class="content">
|
||||
<!-- AI功能横幅 -->
|
||||
<view class="ai-banner">
|
||||
<text class="banner-text">AI让销售过程和团队管理更透明</text>
|
||||
</view>
|
||||
|
||||
<!-- 标签页 -->
|
||||
<view class="tabs">
|
||||
<view
|
||||
@@ -568,10 +564,11 @@ import { getApiUrl } from "@/common/config.js";
|
||||
}
|
||||
this.serviceStatusLoading = true;
|
||||
try {
|
||||
// 构建查询参数对象
|
||||
const queryParams = {
|
||||
current: this.serviceStatusPage.current,
|
||||
size: this.serviceStatusPage.size,
|
||||
syncStatus: '服务中'
|
||||
serviceStatus: '服务中' // 默认搜索条件
|
||||
};
|
||||
const trimmedSalesName = this.serviceStatusQuery?.salesName?.trim();
|
||||
const trimmedCustomerName = this.serviceStatusQuery?.customerName?.trim();
|
||||
@@ -581,12 +578,28 @@ import { getApiUrl } from "@/common/config.js";
|
||||
if (trimmedCustomerName) {
|
||||
queryParams.customerName = trimmedCustomerName;
|
||||
}
|
||||
// 后端改为 POST 接口,参数放请求体
|
||||
const url = getApiUrl('/api/audioManagement/list');
|
||||
|
||||
// 确保 serviceStatus 始终存在
|
||||
queryParams.serviceStatus = '服务中';
|
||||
|
||||
// 将参数转换为 URL 查询字符串(因为后端使用 @RequestParam)
|
||||
const queryString = Object.keys(queryParams)
|
||||
.filter(key => queryParams[key] !== null && queryParams[key] !== undefined && queryParams[key] !== '')
|
||||
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(queryParams[key])}`)
|
||||
.join('&');
|
||||
|
||||
// 调试:打印请求参数
|
||||
console.log('服务状态查询参数:', JSON.stringify(queryParams));
|
||||
console.log('查询字符串:', queryString);
|
||||
|
||||
// 后端使用 @RequestParam,参数需要作为 URL 查询参数传递
|
||||
const baseUrl = getApiUrl('/api/audioManagement/list');
|
||||
const url = queryString ? `${baseUrl}?${queryString}` : baseUrl;
|
||||
|
||||
const res = await uni.request({
|
||||
url,
|
||||
method: 'POST',
|
||||
data: queryParams,
|
||||
data: {}, // POST 请求体为空,参数都在 URL 查询字符串中
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
@@ -1161,39 +1174,43 @@ import { getApiUrl } from "@/common/config.js";
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-top: 88rpx;
|
||||
padding-top: 0; /* 移除padding-top,因为tab页和scroll-view都使用绝对定位 */
|
||||
margin-top: 0;
|
||||
position: relative;
|
||||
min-height: 100vh; /* 确保content有足够高度 */
|
||||
}
|
||||
|
||||
/* AI功能横幅 */
|
||||
.ai-banner {
|
||||
background-color: #E3F2FD;
|
||||
padding: 24rpx 16rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
/* 隐藏导航栏占位区域(红色区域) */
|
||||
::v-deep .uni-navbar__placeholder {
|
||||
display: none !important;
|
||||
height: 0 !important;
|
||||
}
|
||||
|
||||
.banner-text {
|
||||
font-size: 28rpx;
|
||||
color: #1976D2;
|
||||
flex: 1;
|
||||
::v-deep .uni-navbar__placeholder-view {
|
||||
display: none !important;
|
||||
height: 0 !important;
|
||||
}
|
||||
|
||||
.banner-btn {
|
||||
font-size: 28rpx;
|
||||
color: #1976D2;
|
||||
font-weight: 500;
|
||||
margin-left: 16rpx;
|
||||
/* 隐藏导航栏底部边框 */
|
||||
::v-deep .uni-navbar--border {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
/* 标签页 */
|
||||
/* 标签页 - 使用绝对定位紧贴导航栏,消除红色空白区域 */
|
||||
.tabs {
|
||||
display: flex;
|
||||
background-color: #FFFFFF;
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
padding: 0 16rpx;
|
||||
margin-top: 0;
|
||||
position: absolute;
|
||||
top: 88rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
|
||||
.tab-item {
|
||||
padding: 24rpx 32rpx;
|
||||
position: relative;
|
||||
@@ -1222,61 +1239,89 @@ import { getApiUrl } from "@/common/config.js";
|
||||
|
||||
/* 服务状态列表 */
|
||||
.service-status-list {
|
||||
height: calc(100vh - 300rpx);
|
||||
/* 使用绝对定位,从tab页底部开始,高度计算:100vh - 导航栏(88rpx) - tab页(72rpx) - 底部导航栏(96rpx) */
|
||||
position: absolute;
|
||||
top: 160rpx; /* 导航栏(88rpx) + tab页(72rpx) = 160rpx */
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 96rpx; /* 底部导航栏高度 */
|
||||
background-color: #F5F5F5;
|
||||
padding: 24rpx 16rpx;
|
||||
padding: 24rpx 16rpx 0 16rpx; /* 顶部24rpx间距(与列表项间距一致),底部0 */
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 标签管理列表区:仅缩小高度到当前的 70%,宽度保持不变 */
|
||||
/* 标签管理列表区:使用绝对定位,与service-status-list保持一致 */
|
||||
.tag-list {
|
||||
height: calc((100vh - 300rpx) * 0.7);
|
||||
/* 使用绝对定位,从tab页底部开始,高度计算:100vh - 导航栏(88rpx) - tab页(72rpx) - 底部导航栏(96rpx) */
|
||||
position: absolute;
|
||||
top: 160rpx; /* 导航栏(88rpx) + tab页(72rpx) = 160rpx */
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 96rpx; /* 底部导航栏高度 */
|
||||
/* 如果需要缩小高度,可以调整bottom值,比如 bottom: calc(96rpx + (100vh - 88rpx - 72rpx - 96rpx) * 0.3); */
|
||||
}
|
||||
|
||||
.service-status-toolbar {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
margin-bottom: 24rpx;
|
||||
gap: 8rpx; /* 增加间距,避免元素被挤压 */
|
||||
padding: 12rpx 8rpx; /* 增加内边距,给搜索框更多空间 */
|
||||
margin-bottom: 24rpx; /* 与列表项间距保持一致(24rpx) */
|
||||
background-color: #F8F8FA;
|
||||
border-radius: 16rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 1px solid #EFEFF2;
|
||||
overflow-x: auto;
|
||||
min-height: 64rpx; /* 设置最小高度,确保搜索区域不被挤压 */
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.toolbar-total {
|
||||
font-size: 26rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
margin-right: 16rpx;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
margin-right: 8rpx; /* 增加右边距,与搜索框保持距离 */
|
||||
line-height: 1.2;
|
||||
padding: 0 4rpx; /* 增加左右内边距 */
|
||||
}
|
||||
|
||||
.toolbar-input {
|
||||
flex: 1;
|
||||
min-width: 150rpx;
|
||||
min-width: 120rpx; /* 增加最小宽度,避免被挤压变形 */
|
||||
max-width: 200rpx; /* 设置最大宽度,保持合理比例 */
|
||||
height: 56rpx; /* 稍微增加高度,提升可用性 */
|
||||
line-height: 56rpx;
|
||||
background-color: #F5F6FA;
|
||||
border-radius: 12rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 8rpx;
|
||||
padding: 0 12rpx; /* 增加左右内边距 */
|
||||
font-size: 24rpx;
|
||||
border: 1px solid transparent;
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 1; /* 允许适当收缩,但保持最小宽度 */
|
||||
}
|
||||
|
||||
.toolbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: auto;
|
||||
flex-shrink: 0;
|
||||
gap: 8rpx; /* 增加按钮之间的间距 */
|
||||
}
|
||||
|
||||
.toolbar-btn {
|
||||
padding: 0 16rpx;
|
||||
height: 72rpx;
|
||||
padding: 0 12rpx; /* 增加左右内边距 */
|
||||
height: 56rpx; /* 与输入框高度保持一致 */
|
||||
min-width: 56rpx;
|
||||
color: #2A68FF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8rpx;
|
||||
font-size: 28rpx;
|
||||
gap: 4rpx; /* 增加图标和文字之间的间距 */
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.service-card {
|
||||
@@ -1527,9 +1572,14 @@ import { getApiUrl } from "@/common/config.js";
|
||||
|
||||
/* 开始接待表单样式 */
|
||||
.reception-form {
|
||||
height: calc(100vh - 300rpx);
|
||||
/* 使用绝对定位,从tab页底部开始,高度计算:100vh - 导航栏(88rpx) - tab页(72rpx) - 底部导航栏(96rpx) */
|
||||
position: absolute;
|
||||
top: 160rpx; /* 导航栏(88rpx) + tab页(72rpx) = 160rpx */
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 96rpx; /* 底部导航栏高度 */
|
||||
background-color: #F5F5F5;
|
||||
padding: 24rpx 16rpx;
|
||||
padding: 24rpx 16rpx 0 16rpx; /* 顶部24rpx间距(与列表项间距一致),底部0 */
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -1749,8 +1799,14 @@ import { getApiUrl } from "@/common/config.js";
|
||||
|
||||
/* 标签管理样式 - 添加表单 */
|
||||
.tag-management {
|
||||
height: calc(100vh - 300rpx);
|
||||
/* 使用绝对定位,从tab页底部开始,高度计算:100vh - 导航栏(88rpx) - tab页(72rpx) - 底部导航栏(96rpx) */
|
||||
position: absolute;
|
||||
top: 160rpx; /* 导航栏(88rpx) + tab页(72rpx) = 160rpx */
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 96rpx; /* 底部导航栏高度 */
|
||||
background-color: #F5F5F5;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 标签卡片操作菜单 */
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
<statusBar></statusBar>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- 头部:返回 + 标题“AI销售管理” -->
|
||||
<!-- 头部:返回 + 标题"AI销管系统" -->
|
||||
<view class="page-header">
|
||||
<view class="page-header__back" @tap="onBack">
|
||||
<text class="page-header__back-icon">‹</text>
|
||||
</view>
|
||||
<text class="page-header__title">AI销售管理</text>
|
||||
<text class="page-header__title">AI销管系统</text>
|
||||
<!-- 占位,使标题居中 -->
|
||||
<view class="page-header__right"></view>
|
||||
</view>
|
||||
@@ -356,6 +356,8 @@
|
||||
|
||||
.page-container {
|
||||
padding: 0 24rpx 32rpx;
|
||||
position: relative;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.filter-row {
|
||||
@@ -466,7 +468,14 @@
|
||||
}
|
||||
|
||||
.scroll-area {
|
||||
max-height: calc(100vh - 120rpx);
|
||||
/* 高度计算:100vh - 导航栏(88rpx) - filter-row和tab-switch(约120rpx) - 底部导航栏(96rpx) - container padding(32rpx) */
|
||||
/* 使用绝对定位,从tab-switch底部开始,到底部导航栏结束 */
|
||||
position: absolute;
|
||||
top: 208rpx; /* 导航栏(88rpx) + filter-row(约40rpx) + tab-switch(80rpx) = 208rpx */
|
||||
left: 24rpx;
|
||||
right: 24rpx;
|
||||
bottom: 96rpx; /* 底部导航栏高度 */
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.card-list {
|
||||
|
||||
Reference in New Issue
Block a user