feat: 上线ai股市模块
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
- 部分股票可能对某些新闻更敏感,价格会大幅度变化
|
||||
- 一天24小时下来整体价格变化的趋势应该比较连贯,可以部分小时的价格大幅度变化
|
||||
- 变化幅度可以大一些,为了更吸引用户
|
||||
- 可能下跌,可能上涨
|
||||
- 最低价值为1,最高价值为100
|
||||
|
||||
请确保数据格式正确,以便系统能够自动处理。
|
||||
@@ -1,15 +1,19 @@
|
||||
基于以下最近的新闻背景,生成一条新的股市相关新闻。
|
||||
基于以下最近的新闻背景,预测趋势生成一条其他新闻。
|
||||
|
||||
{{newsContext}}
|
||||
|
||||
请生成一条有关联性的新闻,包含以下要素:
|
||||
1. 新闻标题:吸引人且简短,涉及不同行业
|
||||
2. 新闻内容:详细且符合逻辑的报道,篇幅适中,重点内容需要通俗易懂
|
||||
包含以下要素:
|
||||
1. 新闻标题:吸引人且简短,涉及不同行业
|
||||
2. 新闻内容:详细且符合逻辑的报道,篇幅不要太多,并且内容需要通俗易懂
|
||||
3. 新闻简介:简明扼要的总结
|
||||
4. 新闻来源:提供一个虚拟的媒体或机构名称
|
||||
|
||||
注意:
|
||||
- 新闻内容应当与前面的新闻可以有一定关联性
|
||||
- 内容应当暗示可能对不同行业公司产生某种影响(积极或消极)
|
||||
- 新闻内容需要以一件具体的事件为内容,可以是现实中发生的进行修改
|
||||
- 新闻内容不要以某公司为主题,应该是一件有趣的事件
|
||||
- 内容应当暗示可能对不同行业公司产生某种影响(积极或消极),不能太过于明显
|
||||
- 行业焦点可以包括娱乐、科技、金融、医疗、食品等多个领域
|
||||
- 新闻有很小的概率造假,如果是造假的,新闻来源就得来自小的工作室
|
||||
- 不要一直重复着一个公司、一个行业的新闻
|
||||
- 可以加一些很离谱的元素增加新闻的趣味性
|
||||
- 只需生成一次即可
|
||||
@@ -14,7 +14,7 @@
|
||||
<el-menu-item index="2" @click="enterStart"
|
||||
>开始</el-menu-item>
|
||||
<el-menu-item index="3" @click="enterTemp" style="color: red;font-weight: bolder;font-size: large;"
|
||||
>Ai股票</el-menu-item>
|
||||
>Ai炒股</el-menu-item>
|
||||
<el-menu-item index="4" @click="enterShop"
|
||||
>商城</el-menu-item>
|
||||
<!-- <el-sub-menu index="4">-->
|
||||
@@ -234,7 +234,7 @@ const enterStart = () => {
|
||||
}
|
||||
|
||||
const enterTemp=()=>{
|
||||
alert("即将上线,敬请期待!请多攒一些钱钱吧,最低入场需100钱钱哦")
|
||||
router.push("/stock");
|
||||
}
|
||||
const enterShop=()=>{
|
||||
router.push("/shop");
|
||||
|
||||
@@ -311,10 +311,11 @@ const activeList = [
|
||||
{name: "排行榜", path: "/money", icon: "Money"},
|
||||
{name: "开始", path: "/start", icon: "Position"},
|
||||
{name: "聊天室", path: "/chat", icon: "ChatRound"},
|
||||
|
||||
|
||||
{name: "商城", path: "/shop", icon: "ShoppingCart"},
|
||||
{name: "数字藏品", path: "/dc", icon: "Trophy"},
|
||||
{name: "面试宝典", path: "/book", icon: "Memo"},
|
||||
{name: "AI炒股", path: "/stock", icon: "TrendCharts"},
|
||||
// {name: "小程序", path: "/", icon: "Position"},
|
||||
// {name: "公众号", path: "/", icon: "ChatRound"},
|
||||
];
|
||||
@@ -431,7 +432,6 @@ const registerLogOptins = computed(() => {
|
||||
});
|
||||
|
||||
const onClickMoneyTop = () => {
|
||||
|
||||
router.push("/money");
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- 顶部选择器区域 -->
|
||||
<div class="stock-header">
|
||||
<div class="title-area">
|
||||
<h2 class="title">意社区股市</h2>
|
||||
<h2 class="title">意社区股市v1.0 <span class="title-desc">本模块全部由AI 100% 调教生成</span></h2>
|
||||
</div>
|
||||
|
||||
<div class="selector-area">
|
||||
@@ -99,6 +99,18 @@
|
||||
|
||||
<!-- 股票图表 -->
|
||||
<div class="stock-chart">
|
||||
<div class="chart-header">
|
||||
<el-button
|
||||
type="primary"
|
||||
circle
|
||||
size="small"
|
||||
class="refresh-button"
|
||||
@click="refreshStockChart"
|
||||
:loading="isLoadingChart"
|
||||
>
|
||||
<el-icon><Refresh /></el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
<div v-if="isLoadingChart" class="loading-chart">
|
||||
<el-skeleton animated />
|
||||
</div>
|
||||
@@ -194,7 +206,7 @@
|
||||
<span class="news-detail-time">{{ dayjs(currentNewsDetail.publishTime).format('YYYY-MM-DD HH:mm:ss') }}</span>
|
||||
<span class="news-detail-source" v-if="currentNewsDetail.source">来源: {{ currentNewsDetail.source }}</span>
|
||||
</div>
|
||||
<div class="news-detail-content">{{ currentNewsDetail.content }}</div>
|
||||
<div class="news-detail-content" style=" font-size: large">{{ currentNewsDetail.content }}</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -561,6 +573,12 @@ onMounted(async () => {
|
||||
// 加载用户信息
|
||||
await loadUserInfo();
|
||||
});
|
||||
|
||||
// 刷新股票图表
|
||||
const refreshStockChart = async () => {
|
||||
await fetchStockPriceRecords();
|
||||
ElMessage.success('股票数据已刷新');
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -608,6 +626,16 @@ onMounted(async () => {
|
||||
color: #58a6ff;
|
||||
text-shadow: 0 0 5px rgba(88, 166, 255, 0.3);
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title-desc {
|
||||
font-size: 0.6em;
|
||||
color: #8b949e;
|
||||
font-style: italic;
|
||||
margin-left: 10px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
@@ -924,35 +952,33 @@ onMounted(async () => {
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
.stock-dashboard :deep(.el-empty__image) {
|
||||
:deep(.stock-dashboard .el-empty__image) {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.stock-dashboard :deep(.el-empty__description) {
|
||||
:deep(.stock-dashboard .el-empty__description) {
|
||||
margin-top: 5px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* 新闻详情弹窗样式 */
|
||||
.news-detail-dialog :deep(.el-dialog__header) {
|
||||
:deep(.news-detail-dialog .el-dialog__header) {
|
||||
padding: 15px 20px;
|
||||
border-bottom: 1px solid #30363d;
|
||||
}
|
||||
|
||||
.news-detail-dialog :deep(.el-dialog__title) {
|
||||
:deep( .news-detail-dialog .el-dialog__title) {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #ffffff !important;
|
||||
text-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.news-detail-dialog :deep(.el-dialog__body) {
|
||||
:deep(.news-detail-dialog .el-dialog__body) {
|
||||
padding: 20px;
|
||||
color: #e6edf3;
|
||||
}
|
||||
|
||||
|
||||
.news-detail-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -963,9 +989,10 @@ onMounted(async () => {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.news-detail-content {
|
||||
.news-detail-dialog .news-detail-content {
|
||||
line-height: 1.6;
|
||||
white-space: pre-line;
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
/* 修改Element弹窗适应深色主题 */
|
||||
@@ -1013,4 +1040,25 @@ onMounted(async () => {
|
||||
color: #7ee787;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.chart-header {
|
||||
position: relative;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.refresh-button {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
z-index: 2;
|
||||
background-color: #21262d;
|
||||
border-color: #30363d;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.refresh-button:hover {
|
||||
background-color: #58a6ff;
|
||||
border-color: #58a6ff;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user