fix: 修改海外先机接口查询参数

This commit is contained in:
傅光孟 2026-02-09 17:45:52 +08:00
parent 71062c8e13
commit 9934aba290
5 changed files with 19 additions and 12 deletions

View File

@ -93,7 +93,7 @@ export const fetchEtfDetail = (data: any) => {
// 海外先机 // 海外先机
export const getForeignList = (data: any) => { export const getForeignList = (data: any) => {
return Request.get("/news/exclusiveList", data); return Request.get("/news/exclusiveList", {params: data});
}; };
// 编辑精选 // 编辑精选

View File

@ -115,7 +115,6 @@
> >
<text class="etf_title">关联个股</text> <text class="etf_title">关联个股</text>
<view class="etfs"> <view class="etfs">
<template>
<view v-for="(item, index) in data.stocks" class="stock_item" :key="index"> <view v-for="(item, index) in data.stocks" class="stock_item" :key="index">
<view class="name">{{ item.name }}</view> <view class="name">{{ item.name }}</view>
<view class="code">{{ item.code }}</view> <view class="code">{{ item.code }}</view>
@ -128,7 +127,6 @@
<view class="percent up">-0.28%</view> <view class="percent up">-0.28%</view>
</view> --> </view> -->
</view> </view>
</template>
<template v-if="intoType == 'etf'"> <template v-if="intoType == 'etf'">
<view <view
v-for="(item, index) in data.etfs" v-for="(item, index) in data.etfs"

View File

@ -48,7 +48,7 @@
</view> </view>
<view class="recommend-industry"> <view class="recommend-industry">
<view class="recommend-industry-top"> <view class="recommend-industry-top">
<view class="label">推荐行业</view> <view class="label">预期风口</view>
<view class="right" @click="selectRandomTags"> <view class="right" @click="selectRandomTags">
<view class="icon"></view> <view class="icon"></view>
<view class="text">换一换</view> <view class="text">换一换</view>

View File

@ -60,7 +60,7 @@
<view class="news-content"> <view class="news-content">
{{ news.summary }} {{ news.summary }}
</view> </view>
<view class="tags" v-if="news.companyName"> <view class="tags">
<text class="tag">{{ news.companyName }}</text> <text class="tag">{{ news.companyName }}</text>
</view> </view>
<view class="stocks" v-if="news.stocks?.length > 0"> <view class="stocks" v-if="news.stocks?.length > 0">
@ -142,7 +142,9 @@ function goDetail(item: any) {
const data = ref([]); const data = ref([]);
const getList = async () => { const getList = async () => {
const result = await getForeignList({}); const result = await getForeignList({
keyword: keyword.value,
});
if (result.code === 200) { if (result.code === 200) {
const { list, total } = result.data; const { list, total } = result.data;
data.value = list; data.value = list;
@ -151,6 +153,11 @@ const getList = async () => {
} }
}; };
const keyword = ref("");
const handleSearch = () => {
getList();
};
onMounted(async () => { onMounted(async () => {
if (!userStore.isLogin) { if (!userStore.isLogin) {
handleShowLogin(); handleShowLogin();
@ -397,6 +404,7 @@ onMounted(async () => {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
word-break: break-all; word-break: break-all;
margin-bottom: 20rpx;
} }
} }

View File

@ -463,6 +463,7 @@ onMounted(async () => {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
word-break: break-all; word-break: break-all;
margin-bottom: 20rpx;
} }
} }