Commit 87299d8a authored by 水玉婷's avatar 水玉婷
Browse files

feat:细节优化

parent 2dcda17f
...@@ -48,11 +48,11 @@ export default { ...@@ -48,11 +48,11 @@ export default {
onMounted(() => { onMounted(() => {
// 检查是否已登录 // 检查是否已登录
// const status = wechat.checkLoginStatus() const status = wechat.checkLoginStatus()
// if (status.isLoggedIn) { if (status.isLoggedIn) {
// router.replace('/') router.replace('/')
// return return
// } }
// 执行静默登录 // 执行静默登录
handleLogin() handleLogin()
......
...@@ -44,8 +44,6 @@ body { ...@@ -44,8 +44,6 @@ body {
padding: 0; padding: 0;
margin: 0; margin: 0;
box-sizing: border-box; box-sizing: border-box;
// 跨浏览器滚动条隐藏方案
// Webkit浏览器滚动条样式(Chrome, Safari, Edge) // Webkit浏览器滚动条样式(Chrome, Safari, Edge)
&::-webkit-scrollbar { &::-webkit-scrollbar {
......
...@@ -293,33 +293,6 @@ export class ContentTemplateService { ...@@ -293,33 +293,6 @@ export class ContentTemplateService {
case 3: // 图表数据 case 3: // 图表数据
if (updatedResponse) { if (updatedResponse) {
switch (contentType) { switch (contentType) {
case 0: // 普通文本内容
// 检查最后一个块是否是普通文本块,如果是则合并,否则创建新块
const isLastText = isLastBlockText(updatedResponse.contentBlocks);
if (isLastText) {
// 合并到现有的普通文本块
const lastTextIndex = getLastTextBlockIndex(updatedResponse.contentBlocks);
if (lastTextIndex !== -1) {
updatedResponse.contentBlocks[lastTextIndex].content =
mergeTextContent(
updatedResponse.contentBlocks[lastTextIndex].content,
messageContent
);
}
} else {
// 创建新的内容块
updatedBlockIndex = updatedResponse.contentBlocks.length;
updatedResponse.contentBlocks.push({
content: this.templates.text(messageContent),
hasThinkBox: false,
thinkContent: '',
thinkBoxExpanded: false,
});
}
break;
case 2: case 2:
// 图表数据处理 // 图表数据处理
updatedResponse.contentBlocks.push({ updatedResponse.contentBlocks.push({
...@@ -416,6 +389,14 @@ export class ContentTemplateService { ...@@ -416,6 +389,14 @@ export class ContentTemplateService {
updatedResponse.showRecommendations = true; updatedResponse.showRecommendations = true;
} }
break; break;
default: // 默认处理
updatedResponse.contentBlocks.push({
content: this.templates.text(messageContent || ''),
hasThinkBox: false,
thinkContent: '',
thinkBoxExpanded: false,
});
break;
} }
} }
break; break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment