Commit 03ad4e65 by liimin

Merge branch 'feature/rework' of http://192.168.3.233:8090/monorepo/venus into feature/rework

2 parents 2c4cba59 934a91e6
<template>
<view class="detail-container">
<!-- 顶部返回按钮:用于关闭该详情组件(由父级处理 close 事件) -->
<view class="detail-header">
<view class="back-btn" @click="onBack">
<un-icon name="arrow-left"></un-icon>
</view>
</view>
<!-- 主内容区:可滚动 -->
<scroll-view class="main-scroll" scroll-y="true">
<!-- 客户卡片 -->
......@@ -27,106 +33,124 @@
<text class="risk-text">战败风险高</text>
</view>
</view>
</view>
<view class="analysis-section-container">
<!-- 快捷操作 -->
<view class="quick-actions">
<view class="action-btn primary-btn" @click="onQualityReport">
<text class="action-icon">✓</text>
<text class="action-text">质检报告</text>
<view
class="action-btn"
:class="quickActionMode == 'quality' ? 'action-btn-active' : 'action-btn-inactive'"
@click="onQualityReport"
>
<text class="action-text" :class="quickActionMode == 'quality' ? 'action-text-active' : 'action-text-inactive'">对话</text>
</view>
<view class="action-icon-btn" @click="onShare">
<text class="icon-btn-text">↗</text>
</view>
<view class="action-icon-btn" @click="onPlay">
<text class="icon-btn-text">▶</text>
</view>
</view>
</view>
<!-- 分析 Tab 切换 -->
<view class="analysis-tabs-wrap">
<scroll-view class="tabs-scroll" scroll-x="true" :show-scrollbar="false">
<view class="tabs-row">
<view
v-for="(tab, idx) in tabList"
:key="idx"
:class="['tab-item', activeTabIndex == idx ? 'tab-active' : '']"
@click="switchTab(idx)"
>
<text :class="['tab-text', activeTabIndex == idx ? 'tab-text-active' : '']">{{ tab.label }}</text>
</view>
<view
class="action-btn"
:class="quickActionMode == 'dialogue' ? 'action-btn-active' : 'action-btn-inactive'"
@click="onDialogue"
>
<text class="action-text" :class="quickActionMode == 'dialogue' ? 'action-text-active' : 'action-text-inactive'">质检</text>
</view>
</scroll-view>
</view>
<!-- 分析内容区 -->
<view class="analysis-content">
<!-- 对话历史 -->
<view class="dialogue-list">
<view class="dialogue-item">
<image class="avatar" src="/static/images/home/nothing.webp" mode="aspectFill" />
<view class="bubble-wrap">
<view class="bubble bubble-left">
<text class="bubble-text">恭喜你啊,黎先生</text>
<text class="bubble-time">00:01</text>
</view>
<view class="quick-actions-right">
<image class="action-icon-img" @click="onShare" src="@/assets/images/reception/icon-share.png" mode="aspectFit" />
<view class="play-record-wrap" @click="onPlay">
<image class="play-icon-img" src="@/assets/images/reception/icon-play.png" mode="aspectFit" />
<text class="play-time">00:24</text>
</view>
</view>
<view class="dialogue-item">
<image class="avatar" src="/static/images/home/nothing.webp" mode="aspectFill" />
<view class="bubble-wrap">
<view class="bubble bubble-left">
<text class="bubble-text">您好,我是这边的延保经理,你可以叫我小陈,接下来由我来给您讲解。</text>
<text class="bubble-time">00:24</text>
</view>
<!-- 分析 Tab 切换 -->
<view class="analysis-tabs-wrap">
<view
class="tabs-pan"
@touchstart="onTabTouchStart"
@touchmove="onTabTouchMove"
@touchend="onTabTouchEnd"
>
<view class="tabs-row" :style="'transform: translateX(' + tabsOffset + 'px);'">
<view
class="tab-item"
v-for="(tab, idx) in list1"
:key="idx"
:class="activeTab == idx ? 'tab-active' : ''"
@click="click(idx)"
>
<text class="tab-text" :class="activeTab == idx ? 'tab-text-active' : ''">{{ tab.label }}</text>
<text class="tab-value" :class="activeTab == idx ? 'tab-value-active' : ''">{{ tab.value }}</text>
</view>
</view>
</view>
</view>
<!-- AI 话术推荐框 -->
<view class="suggestion-box">
<view class="suggestion-tag">
<text class="suggestion-tag-text">意图匹配</text>
<view class="analysis-title-wrap">
<view class="analysis-title-left">
<text class="analysis-title-dot">·</text>
<text class="analysis-title-text">{{ list1[activeTab].label }}</text>
<text class="analysis-title-value">{{ list1[activeTab].value }}</text>
</view>
<view class="suggestion-header">
<text class="suggestion-icon">✦</text>
<text class="suggestion-title">话术推荐</text>
<view class="analysis-match-btn">
<text class="analysis-match-btn-text">意图匹配</text>
</view>
<text class="suggestion-desc">销售在解释厂家服务时,语言过于冗长且表达不够清晰。建议直接点明优惠价格和质保升级的好处,减少专业术语的使用。</text>
</view>
<!-- AI 导师意见 -->
<view class="mentor-section">
<view class="mentor-header">
<view class="mentor-title-wrap">
<view class="title-bar"></view>
<text class="mentor-title">AI 导师意见</text>
<!-- 分析内容区 -->
<view class="analysis-content">
<!-- 对话历史 -->
<view class="dialogue-list">
<view
class="dialogue-item dialogue-item-selectable"
:class="selectedDialogueIndex == 0 ? 'dialogue-item-selected' : ''"
@click="onSelectDialogueItem(0)"
>
<view class="avatar-with-time">
<image class="avatar" src="/static/images/reception/icon-user-sale.png" mode="aspectFill" />
<text class="bubble-time bubble-time-under-avatar">00:12</text>
</view>
<view class="bubble-wrap">
<view class="bubble bubble-left">
<text class="bubble-text" :class="selectedDialogueIndex == 0 ? 'bubble-text-selected' : ''">恭喜你啊,黎先生</text>
</view>
</view>
</view>
<text class="mentor-status">实时分析中...</text>
</view>
<view class="chat-list">
<!-- AI 气泡 -->
<view class="chat-item chat-ai">
<view class="chat-avatar chat-avatar-ai">
<text class="avatar-icon">🤖</text>
<view
class="dialogue-item dialogue-item-selectable"
:class="selectedDialogueIndex == 1 ? 'dialogue-item-selected' : ''"
@click="onSelectDialogueItem(1)"
>
<image class="avatar" src="/static/images/reception/icon-user-sale.png" mode="aspectFill" />
<view class="bubble-wrap">
<view class="bubble bubble-left">
<text class="bubble-text" :class="selectedDialogueIndex == 1 ? 'bubble-text-selected' : ''">您好,我是这边的延保经理,你可以叫我小陈,接下来是由我来给您讲解</text>
</view>
</view>
<view class="chat-bubble chat-bubble-ai">
<text class="chat-text">好的,针对当前客户的顾虑,我为您生成了一套权益销售话术:</text>
<view class="chat-list-wrap">
<text class="chat-list-item">• 强调3年免费保养的经济价值</text>
<text class="chat-list-item">• 突出24小时道路救援的安全感</text>
<text class="chat-list-item">• 低息贷款方案的财务优势</text>
</view>
<!-- AI 话术推荐框 -->
<view class="suggestion-box">
<view class="suggestion-header">
<view class="suggestion-icon-with-time">
<image class="suggestion-icon" src="/static/images/reception/icon-pen.png" mode="aspectFit" />
<text class="bubble-time bubble-time-under-avatar">00:20</text>
</view>
<text class="suggestion-title">话术推荐</text>
</view>
<text class="suggestion-desc">销售在解释厂家服务时,语言过于冗长且表达不够清晰。建议直接点明优惠价格和质保升级的好处,减少专业术语的使用。</text>
</view>
</view>
<!-- 用户回复 -->
<view class="chat-item chat-user">
<view class="chat-bubble chat-bubble-user">
<text class="chat-text">介绍下众筹活动</text>
<view
class="dialogue-item dialogue-item-selectable"
:class="selectedDialogueIndex == 2 ? 'dialogue-item-selected' : ''"
@click="onSelectDialogueItem(2)"
>
<view class="avatar-with-time">
<image class="avatar" src="/static/images/reception/icon-user-client.png" mode="aspectFill" />
<text class="bubble-time bubble-time-under-avatar">00:24</text>
</view>
<view class="bubble-wrap">
<view class="bubble bubble-left">
<text class="bubble-text" :class="selectedDialogueIndex == 2 ? 'bubble-text-selected' : ''">您好,我是这边的延保经理,你可以叫我小陈,接下来由我来给您讲解。</text>
</view>
<image class="chat-avatar chat-avatar-user" src="/static/images/home/nothing.webp" mode="aspectFill" />
</view>
</view>
</view>
......@@ -138,19 +162,6 @@
<!-- 底部输入栏 -->
<view class="input-footer">
<view class="input-wrap">
<text class="input-prefix">⌘</text>
<input
class="input-field"
type="text"
placeholder="向 AI 导师提问..."
v-model="inputValue"
/>
<text class="input-suffix">☺</text>
</view>
<view class="send-btn" @click="onSend">
<text class="send-icon">➤</text>
</view>
</view>
</view>
</template>
......@@ -162,31 +173,159 @@ defineProps<{
item?: UTSJSONObject
}>();
const emit = defineEmits<{
'close': []
}>();
function onBack(): void {
emit('close');
}
// ── Tab 数据 ─────────────────────────────────────────────────────────────────
type TabItem = {
label: string;
value: string;
};
const tabList: TabItem[] = [
{ label: "身份介绍(2/2)" },
{ label: "服务意识(4/5)" },
{ label: "需求分析" },
{ label: "专业知识" },
const list1: TabItem[] = [
{ label: "身份介绍",value: '2/2' },
{ label: "服务意识",value: '4/5' },
{ label: "需求分析",value: '2/2' },
{ label: "专业知识",value: '3/3' },
{ label: "服务流程",value: '4/4' },
{ label: "服务技巧",value: '5/5' },
];
const activeTab = ref(0);
// 采用手势拖动轨道替代 scroll-view 横向滚动,规避嵌套滚动时横滑失效
const TAB_ITEM_WIDTH = 112;
const TAB_ITEM_GAP = 8;
const TABS_HORIZONTAL_PADDING = 32;
const TAB_VISIBLE_EDGE_PADDING = 8;
const tabsOffset = ref(0);
const tabTouchStartX = ref(0);
const tabTouchStartY = ref(0);
const tabTouchStartOffset = ref(0);
const tabDragging = ref(false);
const tabHorizontalIntent = ref(false);
const windowWidth = ref(375);
const activeTabIndex = ref(0);
const inputValue = ref("");
const selectedDialogueIndex = ref(-1);
type QuickActionMode = "quality" | "dialogue";
const quickActionMode = ref<QuickActionMode>("quality");
function onSelectDialogueItem(idx: number): void {
selectedDialogueIndex.value = idx;
}
function getTabsMaxOffset(): number {
const count = list1.length;
let contentWidth = count * TAB_ITEM_WIDTH + TABS_HORIZONTAL_PADDING;
if (count > 1) {
contentWidth = contentWidth + (count - 1) * TAB_ITEM_GAP;
}
const viewportWidth = windowWidth.value;
const maxOffset = contentWidth - viewportWidth;
return maxOffset > 0 ? maxOffset : 0;
}
function clampTabsOffset(rawOffset: number): number {
const maxOffset = getTabsMaxOffset();
if (rawOffset > 0) {
return 0;
}
if (rawOffset < -maxOffset) {
return -maxOffset;
}
return rawOffset;
}
function ensureTabVisible(idx: number): void {
const itemStart = 16 + idx * (TAB_ITEM_WIDTH + TAB_ITEM_GAP);
const itemEnd = itemStart + TAB_ITEM_WIDTH;
const visibleStart = -tabsOffset.value;
const visibleEnd = visibleStart + windowWidth.value;
let nextOffset = tabsOffset.value;
if (itemStart < visibleStart + TAB_VISIBLE_EDGE_PADDING) {
nextOffset = -(itemStart - TAB_VISIBLE_EDGE_PADDING);
} else if (itemEnd > visibleEnd - TAB_VISIBLE_EDGE_PADDING) {
nextOffset = -(itemEnd - windowWidth.value + TAB_VISIBLE_EDGE_PADDING);
}
tabsOffset.value = clampTabsOffset(nextOffset);
}
// ── 切换 Tab ─────────────────────────────────────────────────────────────────
function switchTab(idx: number): void {
activeTabIndex.value = idx;
function click(idx: number): void {
activeTab.value = idx;
ensureTabVisible(idx);
uni.showToast({ title: "当前 Tab: " + idx, icon: "none" });
}
function onTabTouchStart(e: UniTouchEvent): void {
const touches = e.touches;
if (touches.length == 0) {
return;
}
const firstTouch = touches[0] as UniTouch;
tabTouchStartX.value = firstTouch.clientX;
tabTouchStartY.value = firstTouch.clientY;
tabTouchStartOffset.value = tabsOffset.value;
tabDragging.value = true;
tabHorizontalIntent.value = false;
}
function onTabTouchMove(e: UniTouchEvent): void {
if (!tabDragging.value) {
return;
}
const touches = e.touches;
if (touches.length == 0) {
return;
}
const firstTouch = touches[0] as UniTouch;
const moveX = firstTouch.clientX;
const moveY = firstTouch.clientY;
const deltaX = moveX - tabTouchStartX.value;
const deltaY = moveY - tabTouchStartY.value;
if (!tabHorizontalIntent.value) {
const absX = deltaX >= 0 ? deltaX : -deltaX;
const absY = deltaY >= 0 ? deltaY : -deltaY;
if (absX > 6 && absX > absY) {
tabHorizontalIntent.value = true;
} else {
return;
}
}
const nextOffset = tabTouchStartOffset.value + deltaX;
tabsOffset.value = clampTabsOffset(nextOffset);
}
function onTabTouchEnd(e: UniTouchEvent): void {
const touchEvent = e;
if (touchEvent != null && touchEvent.type == "") {
// 占位分支:仅用于显式消费参数,规避 UTS/Kotlin 保留名与未使用告警
}
tabDragging.value = false;
tabHorizontalIntent.value = false;
}
// ── 快捷操作 ─────────────────────────────────────────────────────────────────
function onQualityReport(): void {
quickActionMode.value = "quality";
uni.showToast({ title: "质检报告", icon: "none" });
}
function onDialogue(): void {
quickActionMode.value = "dialogue";
uni.showToast({ title: "对话", icon: "none" });
}
function onShare(): void {
uni.showToast({ title: "分享", icon: "none" });
}
......@@ -204,6 +343,9 @@ function onSend(): void {
uni.showToast({ title: "请输入内容", icon: "none" });
}
}
const pageInfo = uni.getWindowInfo();
windowWidth.value = pageInfo.windowWidth;
</script>
<style>
......@@ -214,24 +356,53 @@ function onSend(): void {
flex-direction: column;
width: 100%;
height: 100%;
overflow-x: hidden;
background-color: #F8FAFC;
}
.detail-header {
margin-top:5px;
}
.back-btn {
}
.back-icon {
font-size: 16px;
font-weight: 700;
color: #2563EB;
margin-right: 8px;
}
.back-text {
font-size: 14px;
font-weight: 700;
color: #2563EB;
}
/* ── 主滚动区 ───────────────────────────────────────────────────────────────── */
.main-scroll {
display: flex;
flex-direction: column;
flex: 1;
overflow-x: hidden;
width: 100%;
}
/* ── 客户卡片 ───────────────────────────────────────────────────────────────── */
/* 避免 width:100% + margin 导致总宽度超出:用 margin 即可,flex 子项会正确收缩 */
.customer-card {
height: 145px;
margin: 12px;
display: flex;
flex-direction: column;
width: 100%;
height: auto;
box-sizing: border-box;
margin: 12px 0;
padding: 16px;
background-color: #FFFFFF;
border-radius: 16px;
opacity: 1;
border-radius: 12px;
background-color: #ffffff;
background-image: linear-gradient(to bottom, #f0f6ff 0%, #ffffff 100%);
backdrop-filter: blur(8px);
box-shadow: inset 0 0 8px 0 #ffffff;
border-width: 1px;
border-style: solid;
border-color: #EFF6FF;
......@@ -255,9 +426,9 @@ function onSend(): void {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
margin-bottom: 8px;
min-width: 0;
overflow: hidden;
}
.customer-name {
......@@ -276,11 +447,13 @@ function onSend(): void {
.tag-row {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-top: 4px;
}
.tag-item {
margin-right: 8px;
margin-bottom: 6px;
padding: 2px 8px;
background-color: #F3F4F6;
border-radius: 4px;
......@@ -325,34 +498,51 @@ function onSend(): void {
.quick-actions {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
margin-top: 16px;
padding: 0 16px;
margin: 10px 0;
}
.primary-btn {
flex: 1;
.quick-actions-right {
display: flex;
flex-direction: row;
align-items: center;
margin-left: auto;
}
.action-btn {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 8px 16px;
width: 96px;
height: 40px;
border-radius: 8px;
margin-right: 8px;
}
.action-btn-active {
background-color: #2563EB;
border-radius: 12px;
margin-right: 12px;
}
.action-icon {
font-size: 14px;
color: #FFFFFF;
margin-right: 8px;
.action-btn-inactive {
background-color: #EFF6FF;
}
.action-text {
font-size: 14px;
font-weight: 600;
}
.action-text-active {
color: #FFFFFF;
}
.action-text-inactive {
color: #2563EB;
}
.action-icon-btn {
width: 48px;
height: 40px;
......@@ -361,7 +551,8 @@ function onSend(): void {
justify-content: center;
background-color: #EFF6FF;
border-radius: 12px;
margin-right: 12px;
margin-right: 8px;
margin-top: 8px;
}
.action-icon-btn:last-child {
......@@ -373,12 +564,60 @@ function onSend(): void {
color: #2563EB;
}
.action-icon-img {
width: 30px;
height: 30px;
}
.play-record-wrap {
width: 72px;
height: 30px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
border-width: 1px;
border-style: solid;
border-color: #F0F6FF;
border-radius: 14px;
background-color: #FFFFFF;
}
.play-icon-img {
width: 30px;
height: 30px;
margin-right: 4px;
}
.play-time {
color: #757980;
font-size: 13px;
}
.analysis-section-container {
display: flex;
flex-direction: column;
width: 100%;
margin-top: 16px;
border-radius: 16px;
border-width: 1px;
border-style: solid;
border-color: #FFFFFF;
opacity: 1;
background: #ffffff33;
backdrop-filter: blur(8px);
box-shadow: inset 0 0 8px 0 #ffffff;
overflow: hidden;
}
/* ── Tab 切换 ───────────────────────────────────────────────────────────────── */
/* scroll-view 横向滚动需明确高度,否则在 uni-app x 中可能不显示 */
.analysis-tabs-wrap {
display: flex;
flex-direction: column;
flex-shrink: 0;
width: 100%;
min-height: 56px;
background-color: #FFFFFF;
border-top-width: 1px;
border-top-style: solid;
......@@ -387,9 +626,10 @@ function onSend(): void {
border-color: #F3F4F6;
}
.tabs-scroll {
.tabs-pan {
width: 100%;
height: 48px;
height: 56px;
overflow: hidden;
}
.tabs-row {
......@@ -398,16 +638,18 @@ function onSend(): void {
flex-wrap: nowrap;
align-items: center;
padding: 0 16px;
height: 48px;
height: 56px;
}
.tab-item {
flex-shrink: 0;
display: flex;
flex-direction: row;
align-items: center;
padding: 0 16px;
height: 48px;
flex-direction: column;
align-items: flex-start;
justify-content: center;
width: 112px;
margin-right: 8px;
height: 56px;
}
.tab-active {
......@@ -429,9 +671,90 @@ function onSend(): void {
color: #3B82F6;
}
.tab-value {
margin-top: 2px;
font-size: 12px;
font-weight: 400;
color: #9CA3AF;
white-space: nowrap;
}
.tab-value-active {
color: #3B82F6;
}
/* ── 分析标题栏 ─────────────────────────────────────────────────────────────── */
.analysis-title-wrap {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 100%;
height: 40px;
padding: 0 16px;
box-sizing: border-box;
background-color: #eef4ff;
/* #ifdef APP */
/* App 端使用简化渐变语法,兼容性更稳 */
background-image: linear-gradient(to right, #e1f7fc, #f7f2ff);
/* #endif */
/* #ifdef H5 */
background-image: linear-gradient(to right, #e1f7fc 0%, #f3f7ff 27%, #f7f2ff 41%, #e8f1ff 66%, #f7f2ff 100%);
/* #endif */
}
.analysis-title-left {
display: flex;
flex-direction: row;
align-items: center;
}
.analysis-title-dot {
font-size: 16px;
font-weight: 700;
color:#000000;
margin-right: 6px;
}
.analysis-title-text {
font-size: 14px;
font-weight: 700;
color: #1F2937;
}
.analysis-title-value {
margin-left: 4px;
color: #347bff;
font-size: 14px;
font-weight: 700;
}
.analysis-match-btn {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
min-width: 78px;
height: 28px;
padding: 0 12px;
border-radius: 14px;
opacity: 1;
border-width: 1px;
border-style: solid;
border-color:#ffffff;
background: #ffffff;
}
.analysis-match-btn-text {
font-size: 12px;
color: #35c376;
font-weight: 400;
}
/* ── 分析内容 ───────────────────────────────────────────────────────────────── */
.analysis-content {
padding: 16px;
display: flex;
flex-direction: column;
}
.dialogue-list {
......@@ -443,7 +766,18 @@ function onSend(): void {
display: flex;
flex-direction: row;
align-items: flex-start;
margin-bottom: 16px;
padding: 12px 0;
}
.dialogue-item-selectable {
width: 100%;
padding: 8px;
border-radius: 8px;
box-sizing: border-box;
}
.dialogue-item-selected {
background: #ffffff;
}
.dialogue-item:last-child {
......@@ -461,6 +795,18 @@ function onSend(): void {
margin-right: 12px;
}
.avatar-with-time {
display: flex;
flex-direction: column;
align-items: center;
flex-shrink: 0;
margin-right: 12px;
}
.avatar-with-time .avatar {
margin-right: 0;
}
.bubble-wrap {
flex: 1;
min-width: 0;
......@@ -482,6 +828,10 @@ function onSend(): void {
word-break: break-all;
}
.bubble-text-selected {
font-weight: 700;
}
.bubble-time {
display: block;
font-size: 10px;
......@@ -489,47 +839,45 @@ function onSend(): void {
margin-top: 4px;
}
.bubble-time-under-avatar {
margin-top: 6px;
text-align: center;
}
/* ── 话术推荐框 ───────────────────────────────────────────────────────────────── */
.suggestion-box {
display: flex;
flex-direction: column;
position: relative;
margin-top: 16px;
padding: 16px;
padding-top: 32px;
background-color: #EFF6FF;
border-radius: 16px;
padding: 12px;
border: 1px solid #e8f0ff;
background: #ffffff;
border-radius: 8px;
border-width: 1px;
border-style: solid;
border-color: #DBEAFE;
}
.suggestion-tag {
position: absolute;
top: 0;
right: 0;
padding: 8px;
background-color: #DBEAFE;
border-bottom-left-radius: 12px;
}
.suggestion-tag-text {
font-size: 10px;
font-weight: 700;
color: #2563EB;
margin: 12px;
}
.suggestion-header {
display: flex;
flex-direction: row;
align-items: center;
align-items: flex-start;
margin-bottom: 8px;
}
.suggestion-icon {
font-size: 14px;
color: #2563EB;
.suggestion-icon-with-time {
display: flex;
flex-direction: column;
align-items: center;
margin-right: 8px;
}
.suggestion-icon {
width: 14px;
height: 14px;
margin-right: 0;
}
.suggestion-title {
font-size: 14px;
font-weight: 700;
......@@ -543,130 +891,6 @@ function onSend(): void {
word-break: break-all;
}
/* ── AI 导师 ───────────────────────────────────────────────────────────────── */
.mentor-section {
margin-top: 8px;
padding: 0 4px;
}
.mentor-header {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
padding: 0 4px;
}
.mentor-title-wrap {
display: flex;
flex-direction: row;
align-items: center;
}
.title-bar {
width: 4px;
height: 16px;
border-radius: 2px;
background-color: #2563EB;
margin-right: 8px;
}
.mentor-title {
font-size: 14px;
font-weight: 700;
color: #1F2937;
}
.mentor-status {
font-size: 10px;
color: #9CA3AF;
}
.chat-list {
display: flex;
flex-direction: column;
}
.chat-item {
display: flex;
flex-direction: row;
align-items: flex-start;
margin-bottom: 16px;
}
.chat-ai {
justify-content: flex-start;
}
.chat-user {
justify-content: flex-end;
}
.chat-avatar {
width: 32px;
height: 32px;
border-radius: 16px;
flex-shrink: 0;
}
.chat-avatar-ai {
display: flex;
align-items: center;
justify-content: center;
background-color: #2563EB;
margin-right: 12px;
}
.avatar-icon {
font-size: 16px;
}
.chat-avatar-user {
margin-left: 12px;
}
.chat-bubble {
flex: 1;
min-width: 0;
padding: 12px;
border-radius: 16px;
}
.chat-bubble-ai {
background-color: #FFFFFF;
border-top-left-radius: 2px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.chat-bubble-user {
background-color: #DBEAFE;
border-top-right-radius: 2px;
}
.chat-text {
font-size: 14px;
color: #374151;
line-height: 1.5;
word-break: break-all;
}
.chat-list-wrap {
display: flex;
flex-direction: column;
margin-top: 8px;
}
.chat-list-item {
font-size: 12px;
color: #6B7280;
margin-bottom: 4px;
}
.chat-list-item:last-child {
margin-bottom: 0;
}
/* ── 底部占位 ───────────────────────────────────────────────────────────────── */
.bottom-spacer {
height: 100px;
......@@ -682,7 +906,7 @@ function onSend(): void {
flex-direction: row;
align-items: center;
padding: 16px;
padding-bottom: 34px;
padding-bottom: 54px;
background-color: #FFFFFF;
border-top-width: 1px;
border-top-style: solid;
......
......@@ -56,7 +56,7 @@
<ReceptionCenterCenter @show-reception-detail="onShowReceptionDetail" />
</view>
<view v-show="showReceptionDetail" class="reception-detail-inner">
<ReceptionDetail :item="receptionDetailItem" />
<ReceptionDetail :item="receptionDetailItem" @close="onReceptionDetailClose" />
</view>
</view>
</view>
......@@ -110,9 +110,11 @@
<view v-show="!showReceptionDetail" class="reception-center-inner">
<ReceptionCenterCenter :only-right="true" @show-reception-detail="onShowReceptionDetail" />
</view>
<view v-show="showReceptionDetail" class="reception-detail-inner">
<ReceptionDetail :item="receptionDetailItem" />
</view>
<transition name="reception-detail-right-slide">
<view v-if="showReceptionDetail" class="reception-detail-inner">
<ReceptionDetail :item="receptionDetailItem" @close="onReceptionDetailClose" />
</view>
</transition>
</view>
</view>
......@@ -219,6 +221,12 @@ function onShowReceptionDetail(item: UTSJSONObject): void {
showReceptionDetail.value = true;
}
function onReceptionDetailClose(): void {
showReceptionDetail.value = false;
// 复用原 ref 类型:这里用 {} 作为空态,避免模板里读取到 null 引发显示问题
receptionDetailItem.value = {};
}
function onStartClick(): void {
emit("start");
}
......@@ -436,6 +444,23 @@ defineExpose({
flex-direction: column;
}
/* 接待详情:向右滑动进出动画 */
.reception-detail-right-slide-enter-active,
.reception-detail-right-slide-leave-active {
transition: transform 260ms ease;
will-change: transform;
}
.reception-detail-right-slide-enter-from,
.reception-detail-right-slide-leave-to {
transform: translateX(100%);
}
.reception-detail-right-slide-enter-to,
.reception-detail-right-slide-leave-from {
transform: translateX(0);
}
/* 底部门店信息,与旧项目 store-addr 一致:居中、无通栏背景、两侧渐变线 */
.store-addr {
position: absolute;
......
<template>
<view class="page-wrap">
<reception-detail />
<reception-detail @close="onClose" />
</view>
</template>
<script setup lang="uts">
// 接待详情页:使用 receptionDetail 组件统一维护
function onClose(): void {
uni.navigateBack();
}
</script>
<style>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!