diff --git a/pages/blank/institutionalTrendsBriefing.vue b/pages/blank/institutionalTrendsBriefing.vue
index ca1133c..13cae23 100644
--- a/pages/blank/institutionalTrendsBriefing.vue
+++ b/pages/blank/institutionalTrendsBriefing.vue
@@ -24,9 +24,7 @@
diff --git a/pages/blank/notice.vue b/pages/blank/notice.vue
index f64f90d..b273154 100644
--- a/pages/blank/notice.vue
+++ b/pages/blank/notice.vue
@@ -24,9 +24,8 @@
diff --git a/pages/deepMate/deepMate.vue b/pages/deepMate/deepMate.vue
index d887782..a894035 100644
--- a/pages/deepMate/deepMate.vue
+++ b/pages/deepMate/deepMate.vue
@@ -232,6 +232,7 @@
@touchmove="onBackTopTouchMove"
@touchend="onBackTopTouchEnd"
@click="onBackTopClick"
+ v-if="messages.length > 0"
>
@@ -249,7 +250,7 @@
删除全部
@@ -595,8 +596,21 @@ const groupedHistory = computed(() => {
});
const clearAllHistory = () => {
- searchHistory.value = [];
- // uni.setStorageSync("search_history", []);
+ uni.showModal({
+ title: '确认删除',
+ content: '确定要删除全部历史记录吗?该操作不可撤销。',
+ confirmText: '删除',
+ cancelText: '取消',
+ success: (res) => {
+ if (res.confirm) {
+ // 当前历史面板依赖 historyList,而非 searchHistory
+ historyList.value = [];
+ // 同步清空本地旧缓存(如果曾使用)
+ // uni.setStorageSync("search_history", []);
+ uni.showToast({ title: '历史已清空', icon: 'none' });
+ }
+ }
+ })
};
// 发送消息
@@ -669,7 +683,7 @@ const simulateBotResponse = async (userMessage) => {
// 更新机器人的消息内容
const errorMessage = res.message || "请求失败,请稍后重试";
- let responseText = `我已经收到您的消息: "${userMessage}"。错误信息: "${errorMessage}"`;
+ let responseText = `我已经收到您的消息: "${userMessage}"。"${errorMessage}"`;
// 开始打字机效果显示错误信息
let index = 0;
@@ -677,26 +691,48 @@ const simulateBotResponse = async (userMessage) => {
const typeWriter = () => {
if (index < responseText.length) {
- const ch = responseText.charAt(index);
+ let ch = responseText.charAt(index);
+ let charsToAdd = ch;
+ let newIndex = index + 1;
+
+ // 检查是否遇到HTML标签开始
+ if (ch === '<') {
+ // 寻找标签结束位置
+ let tagEndIndex = responseText.indexOf('>', index);
+ if (tagEndIndex !== -1) {
+ // 完整获取标签内容
+ charsToAdd = responseText.substring(index, tagEndIndex + 1);
+ newIndex = tagEndIndex + 1;
+ }
+ }
+
const current = messages.value[botIndex];
// 通过数组替换触发渲染,避免部分平台对子项属性变更不响应
messages.value.splice(botIndex, 1, {
...current,
- content: current.content + ch,
+ content: current.content + charsToAdd,
isTyping: true,
});
- index++;
+ index = newIndex;
scrollToBottom();
// 字符间延迟,模拟打字效果
const baseDelay = 5; // 普通字符基础延迟(毫秒)
const slowPunct = /[。!?!?;;]/; // 句号、感叹号、分号等较长停顿
const midPunct = /[,、,::]/; // 逗号、顿号、冒号等中等停顿
- const delay = slowPunct.test(ch)
- ? 220
- : midPunct.test(ch)
- ? 120
- : baseDelay;
+
+ // 如果是标签,使用更短的延迟或者立即显示
+ let delay;
+ if (charsToAdd.startsWith('<')) {
+ delay = 1; // 标签快速显示
+ } else {
+ delay = slowPunct.test(ch)
+ ? 220
+ : midPunct.test(ch)
+ ? 120
+ : baseDelay;
+ }
+
setTimeout(typeWriter, delay);
} else {
// 打字完成,更新状态
@@ -786,22 +822,33 @@ const simulateBotResponse = async (userMessage) => {
const typeWriter = () => {
if (index < responseText.length) {
- const ch = responseText.charAt(index);
+ let ch = responseText.charAt(index);
+ let charsToAdd = ch;
+ let newIndex = index + 1;
+ let delay = baseDelay;
+
+ // 检查是否遇到HTML标签开始
+ if (ch === '<') {
+ // 寻找标签结束位置
+ let tagEndIndex = responseText.indexOf('>', index);
+ if (tagEndIndex !== -1) {
+ // 完整获取标签内容
+ charsToAdd = responseText.substring(index, tagEndIndex + 1);
+ newIndex = tagEndIndex + 1;
+ delay = 1; // 标签快速显示
+ }
+ }
+
const current = messages.value[botIndex];
// 通过数组替换触发渲染,避免部分平台对子项属性变更不响应
messages.value.splice(botIndex, 1, {
...current,
- content: current.content + ch,
+ content: current.content + charsToAdd,
isTyping: true,
});
- index++;
+ index = newIndex;
scrollToBottom();
- const delay = slowPunct.test(ch)
- ? 220
- : midPunct.test(ch)
- ? 120
- : baseDelay;
setTimeout(typeWriter, delay);
} else {
const current = messages.value[botIndex];
@@ -1157,7 +1204,7 @@ async function itemClick(item) {
.welcome-section {
/* 灰色卡片(recommend-card)之后展示背景图 */
- margin-top: 10rpx;
+ margin-top: 2rem;
display: flex;
align-items: center;
justify-content: center;
@@ -1769,9 +1816,21 @@ async function itemClick(item) {
}
.thinking-content {
+ transition: transform 1s ease; /* 添加过渡效果 */
+ transform-origin: top center; /* 设置变换原点 */
padding: 20rpx 30rpx;
}
+@keyframes transform {
+ from {
+ transform: scaleY(0);
+ }
+ to {
+ transform: scaleY(1);
+ }
+
+}
+
.thinking-item {
display: flex;
align-items: center;
diff --git a/pages/home/member.vue b/pages/home/member.vue
index f1ffd25..988b972 100644
--- a/pages/home/member.vue
+++ b/pages/home/member.vue
@@ -1,5 +1,5 @@
-
+
@@ -129,6 +129,14 @@ const goToAbout = () => {
}
const goToShare = () => {
+ console.log('用户信息==========',userInfoRes.value.data)
+ if (!userInfoRes.value.data) {
+ uni.showToast({
+ title: '请先登录',
+ icon: 'none'
+ })
+ return
+ }
uni.navigateTo({
url: '../setting/share'
})
diff --git a/pages/start/Registration/Registration.vue b/pages/start/Registration/Registration.vue
index b4d205a..994a2c3 100644
--- a/pages/start/Registration/Registration.vue
+++ b/pages/start/Registration/Registration.vue
@@ -326,7 +326,7 @@ function changeAccount() {
}
if (switchType.value === "Phone") {
- account.value = `${country.value}${phone.value}`;
+ account.value = `${country.value}-${phone.value}`;
}
if (switchType.value === "Email") {
account.value = email.value;
@@ -511,7 +511,7 @@ async function sendCode() {
if (switchType.value === "Phone") {
// 发送验证码
- const phoneAll = `${country.value}${phone.value}`;
+ const phoneAll = `${country.value}-${phone.value}`;
const res = await SendPhoneCodeApi({
phone: phoneAll,
});
diff --git a/pages/start/login/login.vue b/pages/start/login/login.vue
index 5cd0fc6..dd41da7 100644
--- a/pages/start/login/login.vue
+++ b/pages/start/login/login.vue
@@ -536,7 +536,7 @@ function changeAccount() {
}
if (switchType.value === "Phone") {
- account.value = `${country.value}${phone.value}`;
+ account.value = `${country.value}-${phone.value}`;
}
if (switchType.value === "Email") {
account.value = email.value;
@@ -652,7 +652,7 @@ async function sendCode() {
if (switchType.value === "Phone") {
// 发送验证码
- const phoneAll = `${country.value}${phone.value}`;
+ const phoneAll = `${country.value}-${phone.value}`;
const res = await SendPhoneCodeApi({
phone: phoneAll,
});
diff --git a/pages/start/recoverPassword/recoverPassword.vue b/pages/start/recoverPassword/recoverPassword.vue
index 9644a18..4c1915e 100644
--- a/pages/start/recoverPassword/recoverPassword.vue
+++ b/pages/start/recoverPassword/recoverPassword.vue
@@ -451,7 +451,7 @@ function changeAccount() {
}
if (switchType.value === "Phone") {
- account.value = `${country.value}${phone.value}`;
+ account.value = `${country.value}-${phone.value}`;
}
if (switchType.value === "Email") {
account.value = email.value;
@@ -570,7 +570,7 @@ function sendCode() {
}
}
if (switchType.value === "Phone") {
- const phoneAll = `${country.value}${phone.value}`;
+ const phoneAll = `${country.value}-${phone.value}`;
const res = SendPhoneCodeApi({
phone: phoneAll,