You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

276 lines
5.1 KiB

<template>
<view class="deepmate">
<view class="deepmate-container">
<view class="deepmate-header">
<view class="title-container">
<view class="title-left">
<text class="deepmate-title">DeepMate</text>
<text class="deepmate-subtitle">您的市场最佳顾问~</text>
</view>
<view class="title-right">
<view class="icon-container">
<view class="ripple-effect ripple-1"></view>
<view class="ripple-effect ripple-2"></view>
<view class="ripple-effect ripple-3"></view>
<image class="deepmate-icon" src="https://d31zlh4on95l9h.cloudfront.net/images/7faa683450cc071bcc746fea8191ff6b.png" mode="aspectFit"></image>
</view>
</view>
</view>
</view>
<view class="deepmate-content">
<view class="deepmate-hotspots">
<view class="deepmate-question">
<text class="question-text">今日股票策略晨报</text>
</view>
<view class="hotspot-item">
<text>热门股票分析</text>
</view>
<view class="hotspot-item">
<text>行业趋势预测</text>
</view>
<view class="hotspot-item">
<text>市场风险提示</text>
</view>
<!-- <view class="hotspot-item">
<text>投资策略建议</text>
</view>
<view class="hotspot-item">
<text>财经新闻解读</text>
</view> -->
</view>
<view class="deepmate-action">
<input class="stock-input" type="text" v-model="stockInput" placeholder="请输入股票代码/名称,获取AI洞察" />
<view class="send-button-container" @click="sendStockQuery">
<image class="send-button" src="https://d31zlh4on95l9h.cloudfront.net/images/3da018821a5c82b06a1d6ddc81b960ac.png" mode="aspectFit"></image>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'DeepMate',
data() {
return {
stockInput: ''
}
},
methods: {
sendStockQuery() {
// 检测输入内容是否为空
if (!this.stockInput.trim()) {
uni.showToast({
title: '请输入股票代码或名称',
icon: 'none'
});
return;
}
// 跳转到深度探索页面并携带用户输入的内容
uni.navigateTo({
url: `/pages/home/deepExploration?query=${encodeURIComponent(this.stockInput)}`
});
}
}
}
</script>
<style>
/* DeepMate样式 */
.deepmate-container {
background-color: #ffe6e6;
border-radius: 10px;
padding: 15px 15px 15px 15px;
margin: 0;
width: 100%;
box-sizing: border-box;
overflow: hidden;
}
.deepmate-header {
margin-bottom: 10px;
}
.title-container {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
.title-left {
width: 50%;
display: flex;
flex-direction: column;
}
.title-right {
width: 50%;
display: flex;
justify-content: center;
align-items: center;
}
.deepmate-title {
font-size: 18px;
font-weight: bold;
color: #ff4d4f;
display: block;
}
.deepmate-icon {
width: 50px;
height: 50px;
margin-left: 0;
}
.deepmate-subtitle {
font-size: 12px;
color: #666;
display: block;
margin-top: 5px;
}
.deepmate-hotspots {
margin: 10px 0;
background-color: #ffffff;
border-radius: 10px;
padding: 10px;
}
.deepmate-question {
display: flex;
align-items: center;
margin-bottom: 10px;
padding-left: 10px;
position: relative;
}
.deepmate-question:before {
content: "";
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 4px;
background-color: #ff4d4f;
border-radius: 2px;
}
.question-text {
font-size: 16px;
font-weight: bold;
color: #333;
}
.hotspot-item {
background-color: #f5f5f5;
padding: 8px 12px;
border-radius: 6px;
margin-bottom: 8px;
}
.hotspot-item text {
font-size: 14px;
color: #333;
}
.deepmate-action {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #ff4d4f;
padding: 8px 15px;
border-radius: 25px;
margin-top: 10px;
border: none;
}
.stock-input {
flex: 1;
height: 36px;
font-size: 14px;
color: #ffffff;
padding: 0 10px;
border: none;
background-color: transparent;
}
.stock-input::placeholder {
color: rgba(255, 255, 255, 0.8);
}
.send-button-container {
display: flex;
justify-content: center;
align-items: center;
width: 36px;
height: 36px;
background-color: #ffffff;
border-radius: 50%;
margin-left: 10px;
}
.send-button {
width: 20px;
height: 20px;
}
.icon-container {
position: relative;
width: 50px;
height: 50px;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
background-color: #f0f8ff;
}
.deepmate-icon {
width: 40px;
height: 40px;
border-radius: 50%;
}
.ripple-effect {
position: absolute;
border-radius: 50%;
background: radial-gradient(circle, rgba(255, 0, 0, 0.4) 0%, rgba(255, 0, 0, 0.1) 70%);
animation-name: ripple;
animation-duration: 3s;
animation-timing-function: ease-out;
animation-iteration-count: infinite;
}
.ripple-1 {
width: 100%;
height: 100%;
animation-delay: 0s;
}
.ripple-2 {
width: 100%;
height: 100%;
animation-delay: 1s;
}
.ripple-3 {
width: 100%;
height: 100%;
animation-delay: 2s;
}
@keyframes ripple {
0% {
transform: scale(0.8);
opacity: 1;
}
100% {
transform: scale(1.5);
opacity: 0;
}
}
</style>