12.17 事件详情相关概念,概念中心增加下拉刷新,分页加载,增加新闻详情展示
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<view>
|
||||
<navBar leftText="事件详情" :hideNavBg="true"></navBar>
|
||||
<image class="topBg absolute" src="/static/image/index/conceptTopBg.png" mode="widthFix"></image>
|
||||
<view v-if="eventDetails" class="eventDetailsC fixed" :style="'top:'+navH+'px;'">
|
||||
<scroll-view v-if="eventDetails" scroll-y class="eventDetailsC fixed" :style="'top:'+navH+'px;'" @scrolltolower="loadMoreData()">
|
||||
<view class="eventIntroC">
|
||||
<view class="categoryTitleC">
|
||||
<view class="category">{{eventDetails.event_type}}</view>
|
||||
@@ -14,7 +14,6 @@
|
||||
【风险提示:解析内容由价值前沿人工采集整理自新闻、公告、研报等公开信息,团队辛苦编写,未经许可严禁转载。本产品内容内容均不构成投资建议,请投资者注意风险,独立审慎决策。】
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-x class="categoryList">
|
||||
<view :class="'item relative '+(selectCategory==index?'select':'')" v-for="(item,index) in categoryList" :key="index" @click="clickCategoryItem(index)">
|
||||
{{item}}
|
||||
@@ -116,7 +115,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view v-if="eventDetails" class="bottomC fixed flex">
|
||||
<view class="inputC flex1">
|
||||
<input type="text" v-model="eventComment" placeholder="我来说两句..." placeholder-style="color:#666" confirm-type="send" @confirm="sendEventComment()"/>
|
||||
@@ -309,6 +308,8 @@
|
||||
categoryList:['相关标的','相关概念','历史事件'],
|
||||
targetList:[], //相关标的
|
||||
conceptList:[], //相关概念
|
||||
page:1,
|
||||
loadAll:false, //是否加载完毕
|
||||
historyEventList:[], //历史事件
|
||||
historyEventRelatedStockList:[], //历史事件相关股票
|
||||
selectCategory:0,
|
||||
@@ -393,6 +394,7 @@
|
||||
this.getEventCommentListData()
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
async init() {
|
||||
// chart 图表实例不能存在data里
|
||||
@@ -437,6 +439,14 @@
|
||||
})
|
||||
}, 300);
|
||||
},
|
||||
loadMoreData() {
|
||||
if (this.selectCategory==1) {
|
||||
if (!this.loadAll) {
|
||||
this.page ++
|
||||
this.getEventRelatedConceptData()
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击切换分类
|
||||
*/
|
||||
@@ -452,6 +462,8 @@
|
||||
}else if(index==1)
|
||||
{
|
||||
//相关概念
|
||||
this.page = 1
|
||||
this.loadAll = false
|
||||
this.getEventRelatedConceptData()
|
||||
}else if(index==2)
|
||||
{
|
||||
@@ -682,16 +694,16 @@
|
||||
getEventRelatedConceptData()
|
||||
{
|
||||
let eventDetails = this.eventDetails
|
||||
let param = {query:eventDetails.event_title,size:10,page:1,sort_by:"_score",isJson:1}
|
||||
let param = {query:eventDetails.event_title,size:10,page:this.page,sort_by:"_score",isJson:1}
|
||||
eventRelatedConcept(param).then(res=>{
|
||||
// if(res.code==200)
|
||||
// {
|
||||
if (res.page == 1) {
|
||||
this.conceptList = res.results
|
||||
// }else
|
||||
// uni.showToast({
|
||||
// title:res.message,
|
||||
// icon:'none'
|
||||
// })
|
||||
}else {
|
||||
this.conceptList = this.conceptList.concat(res.results)
|
||||
}
|
||||
if (res.page==res.total_pages) {
|
||||
this.loadAll = true
|
||||
}
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
@@ -928,6 +940,7 @@ page
|
||||
}
|
||||
.stockNum
|
||||
{
|
||||
flex-shrink: 0;
|
||||
padding: 0 16rpx;
|
||||
line-height: 36rpx;
|
||||
border-radius: 20rpx;
|
||||
@@ -1207,7 +1220,7 @@ page
|
||||
{
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
color: #bdbdbd;
|
||||
text-align: center;
|
||||
.icon
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user