12.17 事件详情相关概念,概念中心增加下拉刷新,分页加载,增加新闻详情展示

This commit is contained in:
尚政杰
2025-12-17 17:42:24 +08:00
parent 13c783a0ad
commit e24b4000fb
106 changed files with 1583 additions and 1143 deletions

View File

@@ -1,6 +1,6 @@
<template>
<view>
<navBar leftText="概念中心" :hideNavBg="true"></navBar>
<navBar leftText="概念中心" :hideNavBg="true" :hideBack="true"></navBar>
<image class="topBg absolute" src="/static/image/index/conceptTopBg.png" mode="widthFix"></image>
<view class="topC fixed" :style="'top: '+navH+'px;'">
<view class="searchRankC flex">
@@ -25,7 +25,7 @@
</view>
</view>
</view>
<scroll-view scroll-y direction="vertical" class="conceptList fixed" :style="'top: '+listTop+'px;'">
<scroll-view scroll-y direction="vertical" class="conceptList fixed" :style="'top: '+listTop+'px;'" refresher-enabled :refresher-triggered="isRefreshing" @refresherrefresh="pullDownRefresh()" @scrolltolower="loadMoreData()">
<view class="list">
<view class="item" v-for="(item,index) in conceptList" :key="index">
<view class="titleChgStockNumC flex">
@@ -36,7 +36,7 @@
<view class="content">{{item.description}}</view>
<view class="hotStockC flex">
<view class="title">热门个股</view>
<view v-if="memberInfo.is_member&&memberInfo.subscription_type=='pro'" class="stockList flex">
<view v-if="memberInfo&&memberInfo.is_member&&memberInfo.subscription_type=='pro'" class="stockList flex">
<view class="stockItem" v-for="(sitem,sindex) in item.stocks.slice(0,3)" :key="sindex">{{sitem.stock_name}}</view>
<view class="more" @click.stop="clickStockMore(item)">+{{item.stock_count-3}}更多</view>
</view>
@@ -329,6 +329,8 @@
quickTimeList:['今天','昨天','一周前','一月前'],
conceptList:[],
page:1,
isRefreshing:false, //下拉刷新
loadAll:false, //是否加载完毕
getRateUpOrDown:getRateUpOrDown,
getChgRateStr:getChgRateStr,
memberInfo:null, //会员信息
@@ -433,6 +435,24 @@
}
this.monthDateList = monthDateList
},
/**
* 下拉刷新
*/
pullDownRefresh(){
this.isRefreshing = true
this.clickSearch()
},
/**
* 上拉加载
*/
loadMoreData()
{
if(!this.loadAll)
{
this.page ++
this.getConceptCenterData()
}
},
/**
* 点击搜索
*/
@@ -765,9 +785,17 @@
{
let param = {query:this.keywords,size:10,page:this.page,sort_by:this.sortType,isJson:1,trade_date:this.selectDateStr}
eventRelatedConcept(param).then(res=>{
this.conceptList = res.results
this.isRefreshing = false
if (res.page == 1) {
this.conceptList = res.results
}else {
this.conceptList = this.conceptList.concat(res.results)
}
if (res.page==res.total_pages) {
this.loadAll = true
}
}).catch(error=>{
this.isRefreshing = false
})
},
/**
@@ -933,7 +961,7 @@ page
{
left: 0;
right: 0;
bottom:0;
bottom: calc(55px + env(safe-area-inset-bottom));
.list
{
padding: 0 25rpx;
@@ -951,6 +979,7 @@ page
font-size: 30rpx;
font-weight: bold;
color: #3D3D3D;
word-break: break-all;
}
.chg
{
@@ -972,6 +1001,7 @@ page
}
.stockNum
{
flex-shrink: 0;
padding: 0 16rpx;
line-height: 36rpx;
border-radius: 20rpx;
@@ -1214,6 +1244,8 @@ page
{
margin-top: 22rpx;
padding: 0 25rpx;
max-height: 500rpx;
overflow-y: scroll;
.item
{
margin-bottom: 20rpx;

View File

@@ -0,0 +1,79 @@
<template>
<view>
<navBar leftText="历史时间轴" :hideNavBg="true"></navBar>
<image class="topBg absolute" src="/static/image/index/conceptTopBg.png" mode="widthFix"></image>
<view v-if="newsInfo" class="contentC fixed" :style="'top: '+navH+'px;'">
<view class="title">{{newsInfo.title}}</view>
<view class="labelTimeC ">
<text class="time">{{getLocalTime(newsInfo.published_time)}}</text>
</view>
<view class="content">
<ua-markdown :source="newsInfo.detail" />
</view>
</view>
</view>
</template>
<script>
import { inject } from 'vue';
import { getLocaleTime } from '@/utils/util';
export default {
data() {
return {
navH:inject('navHeight'),
newsInfo:null,
getLocalTime:getLocaleTime
}
},
onLoad(e) {
this.newsInfo = JSON.parse(decodeURIComponent(e.info))
}
}
</script>
<style lang="less">
page
{
background-color: #070707;
}
.topBg
{
top: 0;
left: 0;
width: 100%;
height: auto;
}
.contentC
{
background-color: #FFF9F5;
margin: 20rpx 25rpx 0;
padding: 28rpx 30rpx;
left: 0;
right: 0;
bottom: 100rpx;
border-radius: 10rpx;
overflow-y: scroll;
.title
{
margin: 0 10rpx;
font-size: 30rpx;
font-weight: bold;
color: #2B2B2B;
}
.labelTimeC {
margin: 0 10rpx;
.time
{
font-size: 24rpx;
font-weight: 500;
color: #666;
}
}
.content
{
margin-top: 30rpx;
}
}
</style>

View File

@@ -63,7 +63,7 @@
<text class="report" decode>&nbsp{{reportList.length}} 份研报</text>
</view>
<view class="list">
<view class="item" v-for="(item,index) in newsList" :key="index">
<view class="item" v-for="(item,index) in newsList" :key="index" @click="clickNewsItem(item)">
<view class="flex">
<view class="type news">新闻</view>
<view class="title flex1">{{item.title}}</view>
@@ -311,6 +311,15 @@
this.getReportData()
}
},
/**
* 点击查看新闻详情
* @param {Object} item
*/
clickNewsItem(item) {
uni.navigateTo({
url:'/pages/concept/conceptNewsDetails/conceptNewsDetails?info='+encodeURIComponent(JSON.stringify(item))
})
},
/**
* 获取时间序列数据
*/