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> <script setup>
// deepMate // deepMate
const goBack = () => { const goBack = () => {
uni.navigateTo({
url: '/pages/deepMate/deepMate'
});
uni.navigateBack({ delta: 1 })
}; };
</script> </script>

5
pages/blank/notice.vue

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

101
pages/deepMate/deepMate.vue

@ -232,6 +232,7 @@
@touchmove="onBackTopTouchMove" @touchmove="onBackTopTouchMove"
@touchend="onBackTopTouchEnd" @touchend="onBackTopTouchEnd"
@click="onBackTopClick" @click="onBackTopClick"
v-if="messages.length > 0"
></image> ></image>
<!-- 搜索历史侧拉框 --> <!-- 搜索历史侧拉框 -->
@ -249,7 +250,7 @@
<view class="delete-all-container"> <view class="delete-all-container">
<image <image
class="delete-icon" class="delete-icon"
src="/static/icons/Group_48095481.svg"
src="/static/icons/Group_48095481.svg" @click="clearAllHistory"
></image> ></image>
<text class="delete-all" @click="clearAllHistory">删除全部</text> <text class="delete-all" @click="clearAllHistory">删除全部</text>
</view> </view>
@ -595,8 +596,21 @@ const groupedHistory = computed(() => {
}); });
const clearAllHistory = () => { 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 || "请求失败,请稍后重试"; const errorMessage = res.message || "请求失败,请稍后重试";
let responseText = `我已经收到您的消息: "${userMessage}"。错误信息: "${errorMessage}"`;
let responseText = `我已经收到您的消息: "${userMessage}"。"${errorMessage}"`;
// //
let index = 0; let index = 0;
@ -677,26 +691,48 @@ const simulateBotResponse = async (userMessage) => {
const typeWriter = () => { const typeWriter = () => {
if (index < responseText.length) { 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]; const current = messages.value[botIndex];
// //
messages.value.splice(botIndex, 1, { messages.value.splice(botIndex, 1, {
...current, ...current,
content: current.content + ch,
content: current.content + charsToAdd,
isTyping: true, isTyping: true,
}); });
index++;
index = newIndex;
scrollToBottom(); scrollToBottom();
// //
const baseDelay = 5; // const baseDelay = 5; //
const slowPunct = /[。!?!?;;]/; // const slowPunct = /[。!?!?;;]/; //
const midPunct = /[,、,::]/; // 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); setTimeout(typeWriter, delay);
} else { } else {
// //
@ -786,22 +822,33 @@ const simulateBotResponse = async (userMessage) => {
const typeWriter = () => { const typeWriter = () => {
if (index < responseText.length) { 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]; const current = messages.value[botIndex];
// //
messages.value.splice(botIndex, 1, { messages.value.splice(botIndex, 1, {
...current, ...current,
content: current.content + ch,
content: current.content + charsToAdd,
isTyping: true, isTyping: true,
}); });
index++;
index = newIndex;
scrollToBottom(); scrollToBottom();
const delay = slowPunct.test(ch)
? 220
: midPunct.test(ch)
? 120
: baseDelay;
setTimeout(typeWriter, delay); setTimeout(typeWriter, delay);
} else { } else {
const current = messages.value[botIndex]; const current = messages.value[botIndex];
@ -1157,7 +1204,7 @@ async function itemClick(item) {
.welcome-section { .welcome-section {
/* 灰色卡片(recommend-card)之后展示背景图 */ /* 灰色卡片(recommend-card)之后展示背景图 */
margin-top: 10rpx;
margin-top: 2rem;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -1769,9 +1816,21 @@ async function itemClick(item) {
} }
.thinking-content { .thinking-content {
transition: transform 1s ease; /* 添加过渡效果 */
transform-origin: top center; /* 设置变换原点 */
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
} }
@keyframes transform {
from {
transform: scaleY(0);
}
to {
transform: scaleY(1);
}
}
.thinking-item { .thinking-item {
display: flex; display: flex;
align-items: center; align-items: center;

10
pages/home/member.vue

@ -1,5 +1,5 @@
<template> <template>
<LoginPrompt ref="loginPrompt"></LoginPrompt>
<LoginPrompt ref="loginwPrompt"></LoginPrompt>
<view class="main"> <view class="main">
<view class="top"> <view class="top">
<view class="bell"> <view class="bell">
@ -129,6 +129,14 @@ const goToAbout = () => {
} }
const goToShare = () => { const goToShare = () => {
console.log('用户信息==========',userInfoRes.value.data)
if (!userInfoRes.value.data) {
uni.showToast({
title: '请先登录',
icon: 'none'
})
return
}
uni.navigateTo({ uni.navigateTo({
url: '../setting/share' url: '../setting/share'
}) })

4
pages/start/Registration/Registration.vue

@ -326,7 +326,7 @@ function changeAccount() {
} }
if (switchType.value === "Phone") { if (switchType.value === "Phone") {
account.value = `${country.value}${phone.value}`;
account.value = `${country.value}-${phone.value}`;
} }
if (switchType.value === "Email") { if (switchType.value === "Email") {
account.value = email.value; account.value = email.value;
@ -511,7 +511,7 @@ async function sendCode() {
if (switchType.value === "Phone") { if (switchType.value === "Phone") {
// //
const phoneAll = `${country.value}${phone.value}`;
const phoneAll = `${country.value}-${phone.value}`;
const res = await SendPhoneCodeApi({ const res = await SendPhoneCodeApi({
phone: phoneAll, phone: phoneAll,
}); });

4
pages/start/login/login.vue

@ -536,7 +536,7 @@ function changeAccount() {
} }
if (switchType.value === "Phone") { if (switchType.value === "Phone") {
account.value = `${country.value}${phone.value}`;
account.value = `${country.value}-${phone.value}`;
} }
if (switchType.value === "Email") { if (switchType.value === "Email") {
account.value = email.value; account.value = email.value;
@ -652,7 +652,7 @@ async function sendCode() {
if (switchType.value === "Phone") { if (switchType.value === "Phone") {
// //
const phoneAll = `${country.value}${phone.value}`;
const phoneAll = `${country.value}-${phone.value}`;
const res = await SendPhoneCodeApi({ const res = await SendPhoneCodeApi({
phone: phoneAll, phone: phoneAll,
}); });

4
pages/start/recoverPassword/recoverPassword.vue

@ -451,7 +451,7 @@ function changeAccount() {
} }
if (switchType.value === "Phone") { if (switchType.value === "Phone") {
account.value = `${country.value}${phone.value}`;
account.value = `${country.value}-${phone.value}`;
} }
if (switchType.value === "Email") { if (switchType.value === "Email") {
account.value = email.value; account.value = email.value;
@ -570,7 +570,7 @@ function sendCode() {
} }
} }
if (switchType.value === "Phone") { if (switchType.value === "Phone") {
const phoneAll = `${country.value}${phone.value}`;
const phoneAll = `${country.value}-${phone.value}`;
const res = SendPhoneCodeApi({ const res = SendPhoneCodeApi({
phone: phoneAll, phone: phoneAll,

Loading…
Cancel
Save