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;
|
||||
|
||||
79
pages/concept/conceptNewsDetails/conceptNewsDetails.vue
Normal file
79
pages/concept/conceptNewsDetails/conceptNewsDetails.vue
Normal 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>
|
||||
@@ -63,7 +63,7 @@
|
||||
<text class="report" decode> {{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))
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取时间序列数据
|
||||
*/
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<navBar leftText="历史时间轴" :hideNavBg="true"></navBar>
|
||||
<image class="topBg absolute" src="/static/image/index/conceptTopBg.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script >
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
page
|
||||
{
|
||||
background-color: #070707;
|
||||
}
|
||||
.topBg
|
||||
{
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -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
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,8 +10,20 @@
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="type==1&&tradeData" class="volumeAmountC flex">
|
||||
<text class="volume">成交量:{{tradeData.volume}}</text>
|
||||
<text class="amount">成交金额:{{tradeData.amount}}</text>
|
||||
<block v-if="tradeData.volume>100000000">
|
||||
<text class="volume">成交量:{{(tradeData.volume/100000000).toFixed(2)}}亿</text>
|
||||
</block>
|
||||
<block v-else>
|
||||
<text v-if="tradeData.volume>10000" class="volume">成交量:{{(tradeData.volume/10000).toFixed(2)}}万</text>
|
||||
<text v-else class="volume">成交量:{{tradeData.volume}}</text>
|
||||
</block>
|
||||
<block v-if="tradeData.amount>100000000">
|
||||
<text class="amount">成交金额:{{(tradeData.amount/100000000).toFixed(2)}}亿元</text>
|
||||
</block>
|
||||
<block v-else>
|
||||
<text v-if="tradeData.amount>10000" class="amount">成交金额:{{(tradeData.amount/10000).toFixed(2)}}万元</text>
|
||||
<text v-else class="amount">成交金额:{{tradeData.amount}}元</text>
|
||||
</block>
|
||||
</view>
|
||||
<view v-if="type==1" style="width:700rpx; height:400rpx">
|
||||
<l-echart ref="chartRef"></l-echart>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<view class="date">{{item.day}}</view>
|
||||
<view class="eventNum">{{item.eventCount}}</view>
|
||||
</view>
|
||||
<view v-if="item.className=='bg-gradient-success'" :class="'item flexColumnCenter success'+(selectDate==item.date?'select':'')" @click="clickSelectDate(item)">
|
||||
<view v-if="item.className=='bg-gradient-success'" :class="'item flexColumnCenter success '+(selectDate==item.date?'select':'')" @click="clickSelectDate(item)">
|
||||
<view class="date">{{item.day}}</view>
|
||||
<view class="eventNum">{{item.eventCount}}</view>
|
||||
</view>
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<uni-popup ref="popup" type="center">
|
||||
<view class="popup">
|
||||
<image class="icon" src="/static/image/mine/service.png" mode="widthFix" show-menu-by-longpress></image>
|
||||
<view class="title">企业二维码</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
@@ -323,10 +324,17 @@ page
|
||||
}
|
||||
.popup
|
||||
{
|
||||
background-color: white;
|
||||
.icon
|
||||
{
|
||||
width: 560rpx;
|
||||
height: auto;
|
||||
}
|
||||
.title
|
||||
{
|
||||
margin-top: 10rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user