8.28 修改事件详情相关概念模块样式,增加股票详情信息来源展示
This commit is contained in:
@@ -8,23 +8,43 @@
|
||||
<view v-if="selectCategory==index" class="line absolute"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentC fixed" :style="'top:'+contentTop+'px;'">
|
||||
<view v-if="selectCategory==3" class="stockC">
|
||||
<view v-if="investDetails" class="contentC fixed" :style="'top:'+contentTop+'px;'">
|
||||
<view v-if="selectCategory==0" class="former">
|
||||
<ua-markdown :source="former" />
|
||||
</view>
|
||||
<view v-if="selectCategory==1" class="former">
|
||||
<ua-markdown :source="investDetails.forecast" />
|
||||
</view>
|
||||
<!-- <view v-if="selectCategory==2" class="former">
|
||||
<ua-markdown :source="investDetails.fact" />
|
||||
</view> -->
|
||||
<view v-if="selectCategory==2" class="stockC">
|
||||
<view class="stockCategoryList flexWrap">
|
||||
<view class="item flexColumnCenter" :style="'background-color:'+item.bgColor+';color:'+item.color+';'" v-for="(item,index) in stockCategoryList" :key="index">
|
||||
<view class="num">23</view>
|
||||
<view class="num">{{item.num}}</view>
|
||||
<view class="title">{{item.title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="stockList">
|
||||
<view class="item">
|
||||
<view class="item" v-for="(item,index) in investDetails.related_stocks" :key="index" @click="clickLookRelatedStockItem(item)">
|
||||
<view class="titleCorrelationC flex">
|
||||
<view class="title flex1">000065.SZ 北方国际</view>
|
||||
<view class="correlation">相关度: 98%</view>
|
||||
<view class="title flex1">{{item.code+' '+item.name}} </view>
|
||||
<view class="correlation">相关度: {{accMul(item.score,100)}}%</view>
|
||||
</view>
|
||||
<view class="category">石油石化</view>
|
||||
<view class="content">
|
||||
海外订单占比70%-80%,在俄语区矿产资源开发(蒙古矿山)、电力运营经验丰富,是乌克兰重建核心受益标的。公司在俄语区的深厚积累使其直接获益于区域经济复苏和能源合作深化。
|
||||
<view v-if="item.sw_primary_sector" class="category">{{item.sw_primary_sector}}</view>
|
||||
<view class="content">{{item.description}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="selectCategory==4" class="">
|
||||
<view class="conceptList">
|
||||
<view class="item relative" v-for="(item,index) in investDetails.extracted_concepts" :key="index" @click="clickConceptItem()">
|
||||
<image class="cover" :src="item.first_image" mode="aspectFill"></image>
|
||||
<view class="infoC absolute">
|
||||
<view class="title">{{item.name}}</view>
|
||||
<view class="content relative">{{item.reason}}
|
||||
<text class="lookDetails absolute">查看详情</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -35,48 +55,58 @@
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { investEventDetails } from '@/request/api';
|
||||
|
||||
import { investEventDetails, stockCategoryList } from '@/request/api';
|
||||
import { accMul } from '@/utils/util';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navH:inject('navHeight'),
|
||||
eventId:'', //事件id
|
||||
contentTop:'',
|
||||
categoryList:['背景','推演','实际','相关股票','相关概念'],
|
||||
investDetails:null,
|
||||
former:'', //背景
|
||||
categoryList:['背景','推演','相关股票'],
|
||||
selectCategory:0,
|
||||
stockCategoryList:[
|
||||
{
|
||||
title:'全部股票',
|
||||
num:0,
|
||||
bgColor:'#C00000',
|
||||
color:'white'
|
||||
},
|
||||
{
|
||||
title:'大周期',
|
||||
num:0,
|
||||
bgColor:'#305496',
|
||||
color:'white'
|
||||
},
|
||||
{
|
||||
title:'TMT板块',
|
||||
num:0,
|
||||
bgColor:'#FFBF00',
|
||||
color:'white',
|
||||
},
|
||||
{
|
||||
title:'大金融地产',
|
||||
num:0,
|
||||
bgColor:'#FFF4D3',
|
||||
},
|
||||
{
|
||||
title:'大消费',
|
||||
num:0,
|
||||
bgColor:'#CDEEEE',
|
||||
},
|
||||
{
|
||||
title:'公共产业板块',
|
||||
num:0,
|
||||
bgColor:'#DEEBF7'
|
||||
}]
|
||||
}],
|
||||
accMul:accMul
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.contentTop = this.navH+(30+74)/750*inject('windowWidth')
|
||||
this.contentTop = this.navH+(30+72)/750*inject('windowWidth')
|
||||
if(e.id)
|
||||
{
|
||||
this.eventId = e.id
|
||||
@@ -94,13 +124,35 @@
|
||||
this.selectCategory = index
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击相关股票
|
||||
* @param {Object} item 股票数据
|
||||
*/
|
||||
clickLookRelatedStockItem(item)
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/stockDetails/stockDetails?type=2&code='+item.code+'&des='+item.description+'&name='+item.name
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取事件详情数据
|
||||
*/
|
||||
getEventDetailsData()
|
||||
{
|
||||
investEventDetails(this.eventId).then(res=>{
|
||||
|
||||
if(res.code==200)
|
||||
{
|
||||
let detail = res.data.detail
|
||||
for (let item of this.stockCategoryList) {
|
||||
item.num = detail.sector_stats[item.title]
|
||||
}
|
||||
this.investDetails = detail
|
||||
this.former = detail.former.replace('<answer>','').replace('</answer>','')
|
||||
}else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
@@ -155,6 +207,10 @@
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow-y: scroll;
|
||||
.former
|
||||
{
|
||||
padding: 40rpx 25rpx;
|
||||
}
|
||||
.stockCategoryList
|
||||
{
|
||||
margin-top: 18rpx;
|
||||
@@ -184,9 +240,10 @@
|
||||
.stockList
|
||||
{
|
||||
padding: 22rpx 25rpx 30rpx;
|
||||
border-bottom: solid 1rpx #E4E4E4;
|
||||
.item
|
||||
{
|
||||
padding: 22rpx 0 30rpx;
|
||||
border-bottom: solid 1rpx #E4E4E4;
|
||||
.title
|
||||
{
|
||||
font-size: 30rpx;
|
||||
@@ -224,5 +281,51 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.conceptList
|
||||
{
|
||||
padding: 30rpx 25rpx;
|
||||
.item
|
||||
{
|
||||
margin-bottom: 20rpx;
|
||||
.cover
|
||||
{
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 350rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.infoC
|
||||
{
|
||||
background: linear-gradient(to bottom,#00000080,#000);
|
||||
padding: 20rpx 23rpx;
|
||||
left:0;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
border-radius: ;
|
||||
color: white;
|
||||
.title
|
||||
{
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.content
|
||||
{
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
margin-top: 10rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
line-height: 1.2rem;
|
||||
.lookDetails
|
||||
{
|
||||
right: 0;
|
||||
color: #F97316;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user