Browse Source

Merge branch 'milestone-20251031-简版功能开发' of http://39.101.133.168:8807/qimaohong/deepChartVueApp into wangyi/feature-20251026183100-deepmate王毅

lihuilin/feature-20251024095243-我的
wangyi 4 weeks ago
parent
commit
d3866f3b7f
  1. 2
      components/deepExploration_header.vue
  2. 4
      pages/blank/institutionalTrendsBriefing.vue
  3. 4
      pages/blank/notice.vue
  4. 5
      pages/deepExploration/MainForceActions.vue
  5. 132
      pages/deepExploration/deepExploration.vue
  6. 5
      pages/deepExploration/stockSelectDetail.vue
  7. 12
      pages/deepMate/deepMate.vue
  8. 0
      static/icons/Left.png
  9. 0
      static/icons/close-two.svg
  10. 0
      static/icons/robot.svg
  11. 0
      static/images/blank.png
  12. 0
      static/images/robot (1).svg
  13. 16
      utils/http.js

2
components/deepExploration_header.vue

@ -391,7 +391,7 @@ onMounted(() => {});
}
.drawer-close {
background: url("../static/icons/关闭2.svg");
background: url("../static/icons/close-two.svg");
width: 48rpx;
height: 48rpx;
border-radius: 24rpx;

4
pages/blank/institutionalTrendsBriefing.vue

@ -4,7 +4,7 @@
<view class="header" :style="{ paddingTop: safeAreaInsets?.top + 'px' }">
<!-- 返回按钮 -->
<view class="head-left">
<image class="back-button" @click="goBack" src="/static/icons/Left_(左).png">
<image class="back-button" @click="goBack" src="/static/icons/Left.png">
<!-- <text class="tip">当前特斯拉该如何布局</text> -->
@ -16,7 +16,7 @@
>
</view>
</view>
<image class="picture" src="/static/images/缺省.png" />
<image class="picture" src="/static/images/blank.png" />
<text class="tip">暂无内容~</text>
</view>
</template>

4
pages/blank/notice.vue

@ -4,7 +4,7 @@
<view class="header" :style="{ paddingTop: safeAreaInsets?.top + 'px' }">
<!-- 返回按钮 -->
<view class="head-left">
<image class="back-button" @click="goBack" src="/static/icons/Left_(左).png">
<image class="back-button" @click="goBack" src="/static/icons/Left.png">
<!-- <text class="tip">当前特斯拉该如何布局</text> -->
@ -16,7 +16,7 @@
>
</view>
</view>
<image class="picture" src="/static/images/缺省.png" />
<image class="picture" src="/static/images/blank.png" />
<text class="tip">暂无内容~</text>
</view>
</template>

5
pages/deepExploration/MainForceActions.vue

@ -1,4 +1,5 @@
<template>
<LoginPrompt ref="loginPrompt"></LoginPrompt>
<view class="main">
<!-- 顶部状态栏占位 -->
<view class="top" :style="{height:iSMT+'px'}"></view>
@ -89,6 +90,9 @@
import {
useDeepExplorationStore
} from '@/stores/modules/deepExploration'
import {
getUserInfo
} from "@/api/member"
const deepExplorationStore = useDeepExplorationStore()
@ -546,6 +550,7 @@
// onReady
onMounted(async () => {
iSMT.value = uni.getSystemInfoSync().statusBarHeight
getUserInfo()
await getServerData() //
await handleModels()

132
pages/deepExploration/deepExploration.vue

@ -1,57 +1,33 @@
<template>
<LoginPrompt ref="loginPrompt"></LoginPrompt>
<view class="main">
<!-- 顶部状态栏占位 -->
<view class="top" :style="{ height: iSMT + 'px' }"></view>
<!-- 标题图标部分 -->
<deepExploration_header></deepExploration_header>
<view class="search">
<input
v-model="stockName"
class="searchInput"
type="text"
placeholder="请输入股票名称、股票代码"
placeholder-style="color: #A6A6A6; font-size: 22rpx;"
/>
<image
@click="searchStock"
class="seachIcon"
src="/static/deepExploration-images/search.png"
mode="aspectFill"
></image>
<input v-model="stockName" class="searchInput" type="text" placeholder="请输入股票名称、股票代码"
placeholder-style="color: #A6A6A6; font-size: 22rpx;" />
<image @click="searchStock" class="seachIcon" src="/static/deepExploration-images/search.png"
mode="aspectFill"></image>
</view>
<!-- 四大功能模块 -->
<view class="select">
<view class="selectItem" @click="toMain('主力追踪')">
<image
class="img"
src="/static/deepExploration-images/icon3.png"
mode="aspectFill"
></image>
<image class="img" src="/static/deepExploration-images/icon3.png" mode="aspectFill"></image>
<view class="txt">主力追踪</view>
</view>
<view class="selectItem" @click="toMain('主力雷达')">
<image
class="img"
src="/static/deepExploration-images/icon2.png"
mode="aspectFill"
></image>
<image class="img" src="/static/deepExploration-images/icon2.png" mode="aspectFill"></image>
<view class="txt">主力雷达</view>
</view>
<view class="selectItem" @click="toMain('主力解码')">
<image
class="img"
src="/static/deepExploration-images/icon1.png"
mode="aspectFill"
></image>
<image class="img" src="/static/deepExploration-images/icon1.png" mode="aspectFill"></image>
<view class="txt">主力解码</view>
</view>
<view class="selectItem" @click="toMain('主力资金流')">
<image
class="img"
src="/static/deepExploration-images/icon4.png"
mode="aspectFill"
></image>
<image class="img" src="/static/deepExploration-images/icon4.png" mode="aspectFill"></image>
<view class="txt">主力资金流</view>
</view>
</view>
@ -73,17 +49,11 @@
<view class="selectionItem">
<view class="header">
<view class="left">
<image
src="/static/deepExploration-images/plus.png"
mode="aspectFill"
></image>
<image src="/static/deepExploration-images/plus.png" mode="aspectFill"></image>
<text>抄底卖顶</text>
</view>
<view class="right">
<image
src="/static/deepExploration-images/Americle.png"
mode="aspectFill"
></image>
<image src="/static/deepExploration-images/Americle.png" mode="aspectFill"></image>
<text>美股</text>
</view>
</view>
@ -108,17 +78,11 @@
<view class="selectionItem">
<view class="header">
<view class="left">
<image
src="/static/deepExploration-images/plus.png"
mode="aspectFill"
></image>
<image src="/static/deepExploration-images/plus.png" mode="aspectFill"></image>
<text>波段行情</text>
</view>
<view class="right">
<image
src="/static/deepExploration-images/Americle.png"
mode="aspectFill"
></image>
<image src="/static/deepExploration-images/Americle.png" mode="aspectFill"></image>
<text>美股</text>
</view>
</view>
@ -140,7 +104,6 @@
</view>
</view>
<footerBar class="static-footer" :type="type"></footerBar>
<LoginPrompt ref="loginPrompt"></LoginPrompt>
</view>
</template>
@ -151,13 +114,24 @@
} from 'vue'
import footerBar from '@/components/footerBar.vue'
import deepExploration_header from '@/components/deepExploration_header.vue'
import { stocSelectApi, stocSelectByNameApi } from '@/api/deepExploration/deepExploration.js'
import {
stocSelectApi,
stocSelectByNameApi
} from '@/api/deepExploration/deepExploration.js'
import {
useUserStore
} from '@/stores/modules/userInfo.js'
import {
getUserInfo
} from "@/api/member"
const type = ref("deepExploration");
const iSMT = ref(0);
const userInfo = ref({})
const type = ref("deepExploration");
const iSMT = ref(0);
//
const toMain = (val) => {
//
const toMain = (val) => {
if (val == "主力追踪") {
uni.navigateTo({
url: "/pages/deepExploration/MainForceActions?index=1",
@ -175,16 +149,24 @@ const toMain = (val) => {
url: "/pages/deepExploration/MainForceActions?index=4",
});
}
};
};
const stockName = ref("");
//
const searchStock = () => {
const stockName = ref("");
//
const searchStock = () => {
console.log("搜索参数:", stockName.value);
console.log(userInfo.value.isVisitor);
if (userInfo.value.isVisitor) {
uni.showToast({
title: '请登录',
icon: 'none'
})
return
}
uni.navigateTo({
url: `/pages/deepExploration/MainForceActions?stockName=${stockName.value}`,
});
};
};
//
const viewAll = () => {
@ -199,7 +181,10 @@ const searchStock = () => {
//
const loadStockSelection = async () => {
try {
const res = await stocSelectApi({ language: 'cn', size: 3 })
const res = await stocSelectApi({
language: 'cn',
size: 3
})
// console.log(':', typeof res === 'object' ? JSON.stringify(res) : res)
const raw = res?.data
const listCandidates = [
@ -232,14 +217,19 @@ const searchStock = () => {
}
} catch (e) {
console.error('选股策略接口调用失败', e)
uni.showToast({ title: '选股策略加载失败', icon: 'none' })
uni.showToast({
title: '选股策略加载失败',
icon: 'none'
})
}
}
//
const loadStockSelectionByName = async () => {
try {
const res = await stocSelectByNameApi({ name: '安徽' })
const res = await stocSelectByNameApi({
name: '安徽'
})
const raw = res?.data
const dataObj = raw?.data || raw
let list = []
@ -268,7 +258,10 @@ const searchStock = () => {
}
} catch (e) {
console.error('按名称(安徽)接口调用失败', e)
uni.showToast({ title: '安徽板块加载失败', icon: 'none' })
uni.showToast({
title: '安徽板块加载失败',
icon: 'none'
})
}
}
@ -276,13 +269,16 @@ const searchStock = () => {
//
iSMT.value = uni.getSystemInfoSync().statusBarHeight;
//
getUserInfo()
loadStockSelection()
loadStockSelectionByName() //
userInfo.value = useUserStore().userInfo
console.log('用户信息', userInfo.value);
})
</script>
<style scoped lang="scss">
.main {
.main {
width: 100%;
min-height: 100vh; //
height: auto; //
@ -524,9 +520,9 @@ const searchStock = () => {
left: 0;
right: 0;
}
}
}
* {
* {
box-sizing: border-box;
}
}
</style>

5
pages/deepExploration/stockSelectDetail.vue

@ -1,4 +1,5 @@
<template>
<LoginPrompt ref="loginPrompt"></LoginPrompt>
<view class="main">
<view class="table">
<view class="tableHeader">
@ -53,6 +54,9 @@
import { useUserStore } from '@/stores/modules/userInfo.js'
import { useDeviceStore } from '@/stores/modules/deviceInfo.js'
import { LoginApi } from '@/api/start/login.js'
import {
getUserInfo
} from "@/api/member"
const tabsData = ref(['全部', '抄底卖顶', '波段行情', '价值投资', '资金及仓位管理', ])
const activeTab = ref('全部')
@ -223,6 +227,7 @@
onMounted(() => {
loadStrategy()
getUserInfo()
})
</script>

12
pages/deepMate/deepMate.vue

@ -46,7 +46,7 @@
<view class="contain">
<!-- 机器人头像和欢迎语 -->
<view class="robot-container" v-if="messages.length === 0">
<image src="/static/icons/机器人.svg" class="robot-avatar"></image>
<image src="/static/icons/robot.svg" class="robot-avatar"></image>
<view class="welcome-message">
<text class="greeting">Hi, 我是您的股市随身顾问~</text>
<text class="description"
@ -106,7 +106,7 @@
<!-- 顶部粘性欢迎块始终保留在聊天上方 -->
<view class="chat-header" v-if="messages.length > 0">
<view class="robot-container">
<image src="/static/icons/机器人.svg" class="robot-avatar"></image>
<image src="/static/icons/robot.svg" class="robot-avatar"></image>
<view class="welcome-message">
<text class="greeting">Hi, 我是您的股市随身顾问~</text>
</view>
@ -776,11 +776,11 @@ const simulateBotResponse = async (userMessage) => {
});
//
let responseText = `我已经收到您的消息: "${userMessage}"。+"${markdown}" `;
let responseText = `我已经收到您的消息: "${userMessage}"。"${markdown}" `;
let index = 0;
const botIndex = messages.value.length - 1;
const baseDelay = 5; //
const baseDelay = 165; //
const slowPunct = /[。!?!?;;]/; //
const midPunct = /[,、,::]/; //
@ -1287,7 +1287,7 @@ async function itemClick(item) {
}
.bot-message .message-icon {
background: url("/static/images/机器人 (1).svg");
background: url("/static/images/robot (1).svg");
color: white;
}
@ -1567,7 +1567,7 @@ async function itemClick(item) {
}
.drawer-close {
background: url("/static/icons/关闭2.svg");
background: url("/static/icons/close-two.svg");
width: 48rpx;
height: 48rpx;
border-radius: 24rpx;

0
static/icons/Left_(左).png → static/icons/Left.png

Before

Width: 20  |  Height: 20  |  Size: 247 B

After

Width: 20  |  Height: 20  |  Size: 247 B

0
static/icons/关闭2.svg → static/icons/close-two.svg

0
static/icons/机器人.svg → static/icons/robot.svg

0
static/images/缺省.png → static/images/blank.png

Before

Width: 213  |  Height: 228  |  Size: 16 KiB

After

Width: 213  |  Height: 228  |  Size: 16 KiB

0
static/images/机器人 (1).svg → static/images/robot (1).svg

16
utils/http.js

@ -75,10 +75,10 @@ export const http = (options) => {
loginStore.setLoginInfo("false")
console.log("2loginStore.loginInfo", loginStore.loginInfo);
uni.showToast({
title: '请先登录',
icon: 'none'
})
// uni.showToast({
// title: '请先登录',
// icon: 'none'
// })
}
resolve(result.data)
} else if (result.statusCode === 401) {
@ -91,10 +91,10 @@ export const http = (options) => {
})
reject(result)
} else {
uni.showToast({
title: (result.data).msg || '请求失败',
icon: 'none'
})
// uni.showToast({
// title: (result.data).msg || '请求失败',
// icon: 'none'
// })
reject(result)
}
},

Loading…
Cancel
Save