12.17 事件详情相关概念,概念中心增加下拉刷新,分页加载,增加新闻详情展示
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user