Browse Source

Merge branch 'milestone-20251031-简版功能开发' of http://39.101.133.168:8807/qimaohong/deepChartVueApp into hongxilin/feature-20251023103318-行情数据及页面

lihuilin/feature-20251024095243-我的
hongxilin 3 weeks ago
parent
commit
1075d2d419
  1. 4
      pages/blank/institutionalTrendsBriefing.vue
  2. 5
      pages/blank/notice.vue
  3. 101
      pages/deepMate/deepMate.vue
  4. 10
      pages/home/member.vue
  5. 4
      pages/start/Registration/Registration.vue
  6. 4
      pages/start/login/login.vue
  7. 4
      pages/start/recoverPassword/recoverPassword.vue

4
pages/blank/institutionalTrendsBriefing.vue

@ -24,9 +24,7 @@
<script setup>
// deepMate
const goBack = () => {
uni.navigateTo({
url: '/pages/deepMate/deepMate'
});
uni.navigateBack({ delta: 1 })
};
</script>

5
pages/blank/notice.vue

@ -24,9 +24,8 @@
<script setup>
// deepMate
const goBack = () => {
uni.navigateTo({
url: '/pages/deepMate/deepMate'
});
//
uni.navigateBack({ delta: 1 })
};
</script>

101
pages/deepMate/deepMate.vue

@ -232,6 +232,7 @@
@touchmove="onBackTopTouchMove"
@touchend="onBackTopTouchEnd"
@click="onBackTopClick"
v-if="messages.length > 0"
></image>
<!-- 搜索历史侧拉框 -->
@ -249,7 +250,7 @@
<view class="delete-all-container">
<image
class="delete-icon"
src="/static/icons/Group_48095481.svg"
src="/static/icons/Group_48095481.svg" @click="clearAllHistory"
></image>
<text class="delete-all" @click="clearAllHistory">删除全部</text>
</view>
@ -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;

10
pages/home/member.vue

@ -1,5 +1,5 @@
<template>
<LoginPrompt ref="loginPrompt"></LoginPrompt>
<LoginPrompt ref="loginwPrompt"></LoginPrompt>
<view class="main">
<view class="top">
<view class="bell">
@ -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'
})

4
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,
});

4
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,
});

4
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,

Loading…
Cancel
Save