1.14 概念中心模块调整,战略分析模块界面完善
This commit is contained in:
@@ -59,24 +59,28 @@
|
||||
</view>
|
||||
<view class="newsReportC flex">
|
||||
<image class="icon" src="/static/icon/home/conceptCenter/newsReport.png" mode="widthFix"></image>
|
||||
<text class="news">{{newsList.length}} 条新闻 · </text>
|
||||
<text class="report" decode> {{reportList.length}} 份研报</text>
|
||||
<text :class="'num '+(selectNewsOrReport==0?'select':'')" @click="clickNewsOrReportItem(0)">{{newsList.length}} 条新闻 · </text>
|
||||
<text :class="'num '+(selectNewsOrReport==1?'select':'')" decode @click="clickNewsOrReportItem(1)"> {{reportList.length}} 份研报</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<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>
|
||||
<block v-if="selectNewsOrReport==0">
|
||||
<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>
|
||||
</view>
|
||||
<view class="content">{{item.detail}}</view>
|
||||
</view>
|
||||
<view class="content">{{item.detail}}</view>
|
||||
</view>
|
||||
<view class="item" v-for="(item,index) in reportList" :key="index">
|
||||
<view class="flex">
|
||||
<view class="type report">研报</view>
|
||||
<view class="title flex1">{{item.report_title}}</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="item" v-for="(item,index) in reportList" :key="index" @click="clickReportItem(item)">
|
||||
<view class="flex">
|
||||
<view class="type report">研报</view>
|
||||
<view class="title flex1">{{item.report_title}}</view>
|
||||
</view>
|
||||
<view class="content">{{JSON.parse(item.content).content}}</view>
|
||||
</view>
|
||||
<view class="content">坚定看好锂电材料,建议继续加配坚定六氟、添加剂,关注隔膜更加坚定的看好六氟:下游传导如期</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -105,6 +109,7 @@
|
||||
chgStockData:null, //涨跌幅和股票数据
|
||||
newsList:[], //新闻数据
|
||||
reportList:[], //研报数据
|
||||
selectNewsOrReport: 0, //0新闻1研报
|
||||
getRateUpOrDown:getRateUpOrDown,
|
||||
getChgRateStr:getChgRateStr,
|
||||
}
|
||||
@@ -311,13 +316,32 @@
|
||||
this.getReportData()
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击切换新闻或研报
|
||||
* @param {Object} index
|
||||
*/
|
||||
clickNewsOrReportItem(index)
|
||||
{
|
||||
if(this.selectNewsOrReport!=index) {
|
||||
this.selectNewsOrReport = index;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击查看新闻详情
|
||||
* @param {Object} item
|
||||
*/
|
||||
clickNewsItem(item) {
|
||||
uni.navigateTo({
|
||||
url:'/pages/concept/conceptNewsDetails/conceptNewsDetails?info='+encodeURIComponent(JSON.stringify(item))
|
||||
url:'/pages/concept/newsDetails/newsDetails?info='+encodeURIComponent(JSON.stringify(item))
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 点击查看研报详情
|
||||
* @param {Object} item
|
||||
*/
|
||||
clickReportItem(item) {
|
||||
uni.navigateTo({
|
||||
url:'/pages/concept/reportDetails/reportDetails?info='+encodeURIComponent(JSON.stringify(item))
|
||||
})
|
||||
},
|
||||
/**
|
||||
@@ -369,6 +393,9 @@
|
||||
{
|
||||
let param = {query:this.conceptName,start_date:this.selectDateStr,mode:'text',exact_match:1}
|
||||
conceptReport(param).then(res=>{
|
||||
for (let item of res.data.results) {
|
||||
item.content = item.content.replace(/'/g, '"')
|
||||
}
|
||||
this.reportList = res.data.results
|
||||
}).catch(error=>{
|
||||
|
||||
@@ -579,14 +606,14 @@ page
|
||||
width: 24rpx;
|
||||
height: auto;
|
||||
}
|
||||
.news
|
||||
{
|
||||
color: #FF7723;
|
||||
}
|
||||
.report
|
||||
.num
|
||||
{
|
||||
color: #333;
|
||||
}
|
||||
.num.select
|
||||
{
|
||||
color: #FF7723;
|
||||
}
|
||||
}
|
||||
.list
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user