Browse Source

Merge branch 'milestone-20251031-简版功能开发' of http://39.101.133.168:8807/qimaohong/deepChartVueApp into milestone-20251031-简版功能开发

dongqian/feature-20251022181325-deepmate简版
宋杰 3 weeks ago
parent
commit
7359e08343
  1. 13
      api/deepMate/deepMate.js
  2. 4
      pages/deepExploration/deepExploration.vue
  3. 45
      pages/deepMate/deepMate.vue
  4. 4
      pages/home/member.vue

13
api/deepMate/deepMate.js

@ -54,6 +54,19 @@ export const postHistory = (data) => {
/**
* 删除历史记录
*/
export const postDeleteHistory = (data) => {
return http({
method: 'POST',
url: '/api/deepMate/deleteRecord',
data
})
}
/**
* 历史记录详情
*/

4
pages/deepExploration/deepExploration.vue

@ -46,7 +46,7 @@
</view>
<view class="stockSelection_content">
<view class="selectionItem">
<view class="selectionItem" @click="viewAll">
<view class="header">
<view class="left">
<image src="/static/deepExploration-images/plus.png" mode="aspectFill"></image>
@ -75,7 +75,7 @@
</view>
<view class="stockSelection_content">
<view class="selectionItem">
<view class="selectionItem" @click="viewAll">
<view class="header">
<view class="left">
<image src="/static/deepExploration-images/plus.png" mode="aspectFill"></image>

45
pages/deepMate/deepMate.vue

@ -250,7 +250,8 @@
<view class="delete-all-container">
<image
class="delete-icon"
src="/static/icons/Group_48095481.svg" @click="clearAllHistory"
src="/static/icons/Group_48095481.svg"
@click="clearAllHistory"
></image>
<text class="delete-all" @click="clearAllHistory">删除全部</text>
</view>
@ -312,6 +313,7 @@ import {
postIntent,
postHistory,
postHistoryDetail,
postDeleteHistory,
} from "../../api/deepMate/deepMate";
import { useUserStore } from "../../stores/modules/userInfo";
@ -597,21 +599,35 @@ const groupedHistory = computed(() => {
const clearAllHistory = () => {
uni.showModal({
title: '确认删除',
content: '确定要删除全部历史记录吗?该操作不可撤销。',
confirmText: '删除',
cancelText: '取消',
title: "确认删除",
content: "确定要删除全部历史记录吗?该操作不可撤销。",
confirmText: "删除",
cancelText: "取消",
success: (res) => {
if (res.confirm) {
deleteHistory();
}
},
});
};
//
async function deleteHistory(historyId) {
// historyList searchHistory
historyList.value = [];
// 使
const res = await postDeleteHistory({
model: 5,
});
if (res.code === 200) {
historyList.value = [];
// uni.setStorageSync("search_history", []);
uni.showToast({ title: '历史已清空', icon: 'none' });
uni.showToast({ title: "历史已清空", icon: "none" });
}
else {
uni.showToast({ title: res.message, icon: "none" });
}
})
};
}
//
const sendMessage = () => {
@ -696,9 +712,9 @@ const simulateBotResponse = async (userMessage) => {
let newIndex = index + 1;
// HTML
if (ch === '<') {
if (ch === "<") {
//
let tagEndIndex = responseText.indexOf('>', index);
let tagEndIndex = responseText.indexOf(">", index);
if (tagEndIndex !== -1) {
//
charsToAdd = responseText.substring(index, tagEndIndex + 1);
@ -723,7 +739,7 @@ const simulateBotResponse = async (userMessage) => {
// 使
let delay;
if (charsToAdd.startsWith('<')) {
if (charsToAdd.startsWith("<")) {
delay = 1; //
} else {
delay = slowPunct.test(ch)
@ -828,9 +844,9 @@ const simulateBotResponse = async (userMessage) => {
let delay = baseDelay;
// HTML
if (ch === '<') {
if (ch === "<") {
//
let tagEndIndex = responseText.indexOf('>', index);
let tagEndIndex = responseText.indexOf(">", index);
if (tagEndIndex !== -1) {
//
charsToAdd = responseText.substring(index, tagEndIndex + 1);
@ -1841,7 +1857,6 @@ async function itemClick(item) {
to {
transform: scaleY(1);
}
}
.thinking-item {

4
pages/home/member.vue

@ -129,8 +129,8 @@ const goToAbout = () => {
}
const goToShare = () => {
console.log('用户信息==========',userInfoRes.value.data)
if (!userInfoRes.value.data) {
console.log('用户信息==========',userStore.userInfo.isVisitor)
if (userStore.userInfo.isVisitor) {
uni.showToast({
title: '请先登录',
icon: 'none'

Loading…
Cancel
Save