|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view class="report-page">
|
|
|
- <van-sticky style="background: #fff">
|
|
|
+ <view class="top-sticky" style="background: #fff">
|
|
|
<!-- 导航 -->
|
|
|
<view class="nav-bar-wrap" :style="{height:navBarStyle.height,paddingTop:navBarStyle.paddingTop,paddingBottom:navBarStyle.paddingBottom}">
|
|
|
<view class="content">
|
|
@@ -15,11 +15,10 @@
|
|
|
<image :src="selectTopFirstId==item.classify_name?item.select_icon_url:item.icon_url" mode="aspectFill"/>
|
|
|
<view>{{item.classify_name}}</view>
|
|
|
</view>
|
|
|
- <view class="item" @click="goClassify">
|
|
|
+ <!-- <view class="item" @click="goClassify">
|
|
|
<image src="@/static/report-menu.png" mode="aspectFill"/>
|
|
|
<view>查看更多</view>
|
|
|
- </view>
|
|
|
-
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
<view class="flex sub-type-box">
|
|
|
<view
|
|
@@ -29,19 +28,20 @@
|
|
|
>{{item.chart_permission_name}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </van-sticky>
|
|
|
+ </view>
|
|
|
<view class="list-wrap">
|
|
|
<view class="list-item" v-for="item in list" :key="item">
|
|
|
- <view class="time">{{item.time}}</view>
|
|
|
+ <view class="time">{{item.date}}</view>
|
|
|
<view class="content-list">
|
|
|
- <view class="content-item" v-for="citem in item.list" :key="citem">
|
|
|
- <view class="content-box" @click="goDetail">
|
|
|
+ <view class="content-item" v-for="citem in item.sub_list" :key="citem">
|
|
|
+ <view class="content-box" @click="goDetail(citem)">
|
|
|
<view class="all-btn">全部</view>
|
|
|
- <view class="c-time">{{citem.time}}</view>
|
|
|
+ <view class="c-time">{{citem.publish_time|getListTime}}</view>
|
|
|
<view class="title">{{citem.title}}</view>
|
|
|
- <view class="van-multi-ellipsis--l3 desc">{{citem.desc}}</view>
|
|
|
+ <view class="van-multi-ellipsis--l3 desc" v-html="citem.content_sub"></view>
|
|
|
<view class="tags">
|
|
|
- <text style="margin-right:15px" v-for="tag in citem.tags" :key="tag">#{{tag}}</text>
|
|
|
+ <text style="margin-right:15px" v-if="citem.classify_name_first">#{{citem.classify_name_first}}</text>
|
|
|
+ <text style="margin-right:15px" v-if="citem.classify_name_second">#{{citem.classify_name_second}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -53,8 +53,24 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {apiReportIndexPageAuthList} from '@/api/report'
|
|
|
+const moment=require('@/utils/moment-with-locales.min')
|
|
|
+moment.locale('zh-cn');
|
|
|
+import {apiReportIndexPageAuthList,apiReportIndexPageList} from '@/api/report'
|
|
|
export default {
|
|
|
+ filters: {
|
|
|
+ getListTime(e){
|
|
|
+ return moment(e).format('HH:mm:ss')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ selectTopSubId(){
|
|
|
+ this.list=[]
|
|
|
+ this.dateArr=[]
|
|
|
+ this.page=1
|
|
|
+ this.finished=false
|
|
|
+ this.getReportList()
|
|
|
+ }
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
navBarStyle:{
|
|
@@ -68,53 +84,22 @@ export default {
|
|
|
topSubList:[],
|
|
|
selectTopSubId:0,
|
|
|
|
|
|
- list:[
|
|
|
- {
|
|
|
- time:'1.13 周四da',
|
|
|
- list:[
|
|
|
- {
|
|
|
- time:'17:25:08',
|
|
|
- desc:'地产政策的拐点肯定是看到了,由小及大的趋势。目前按揭和开发贷放松,属于对前面过紧政策的修补。政策的影响是把之前过于悲观的预期做了纠正。市场把贴水修复一下',
|
|
|
- title:"地产政策的变化和影响",
|
|
|
- tags:['双周报','煤炭双周报']
|
|
|
- },
|
|
|
- {
|
|
|
- time:'17:25:08',
|
|
|
- desc:'地产政策的拐点肯定是看到了,由小及大的趋势。目前按揭和开发贷放松,属于对前面过紧政策的修补。政策的影响是把之前过于悲观的预期做了纠正。市场把贴水修复一下',
|
|
|
- title:"地产政策的变化和影响",
|
|
|
- tags:['双周报','煤炭双周报']
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- time:'1.13 周四f',
|
|
|
- list:[
|
|
|
- {
|
|
|
- time:'17:25:08',
|
|
|
- desc:'地产政策的拐点肯定是看到了,由小及大的趋势。目前按揭和开发贷放松,属于对前面过紧政策的修补。政策的影响是把之前过于悲观的预期做了纠正。市场把贴水修复一下',
|
|
|
- title:"地产政策的变化和影响",
|
|
|
- tags:['双周报','煤炭双周报']
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- time:'1.13 周四d',
|
|
|
- list:[
|
|
|
- {
|
|
|
- time:'17:25:08',
|
|
|
- desc:'地产政策的拐点肯定是看到了,由小及大的趋势。目前按揭和开发贷放松,属于对前面过紧政策的修补。政策的影响是把之前过于悲观的预期做了纠正。市场把贴水修复一下',
|
|
|
- title:"地产政策的变化和影响",
|
|
|
- tags:['双周报','煤炭双周报']
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- ]
|
|
|
+ list:[],
|
|
|
+ dateArr:[],
|
|
|
+ page:1,
|
|
|
+ pageSize:20,
|
|
|
+ finished:false
|
|
|
}
|
|
|
},
|
|
|
onLoad(){
|
|
|
this.initNavBar()
|
|
|
this.getTopAuthList()
|
|
|
},
|
|
|
+ onReachBottom() {
|
|
|
+ if(this.finished) return
|
|
|
+ this.page++
|
|
|
+ this.getReportList()
|
|
|
+ },
|
|
|
methods: {
|
|
|
initNavBar(){
|
|
|
let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
|
|
@@ -138,6 +123,10 @@ export default {
|
|
|
|
|
|
//点击顶部一级分类
|
|
|
handleClickTopFirst(item,index){
|
|
|
+ if(item.sort==100000){
|
|
|
+ this.goClassify()
|
|
|
+ return
|
|
|
+ }
|
|
|
this.selectTopFirstId=item.classify_name
|
|
|
this.topSubList=this.topFirstList[index].list
|
|
|
this.selectTopSubId=this.topSubList[0].chart_permission_id
|
|
@@ -148,6 +137,45 @@ export default {
|
|
|
this.selectTopSubId=item.chart_permission_id
|
|
|
},
|
|
|
|
|
|
+ //获取报告列表
|
|
|
+ async getReportList(){
|
|
|
+ const res=await apiReportIndexPageList({
|
|
|
+ chart_permission_id:this.selectTopSubId,
|
|
|
+ current_index:this.page,
|
|
|
+ page_size:this.pageSize
|
|
|
+ })
|
|
|
+ if(res.code===200){
|
|
|
+ if(res.data.list){
|
|
|
+ if(this.list.length==0){
|
|
|
+ this.list=res.data.list
|
|
|
+ res.data.list.forEach(item=>{
|
|
|
+ this.dateArr.push(item.date)
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ //判断是否前面已经有相同日期数据 有的话添加合并
|
|
|
+ let arr=[]
|
|
|
+ let temTimearr=[]
|
|
|
+ res.data.list.forEach(item => {
|
|
|
+ if(this.dateArr.includes(item.date)){
|
|
|
+ this.list.forEach(_item=>{
|
|
|
+ if(item.date===_item.date){
|
|
|
+ _item.sub_list=[..._item.sub_list,...item.sub_list]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ arr.push(item)
|
|
|
+ temTimearr.push(item.date)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.list=[...this.list,...arr]
|
|
|
+ this.dateArr=[...this.dateArr,...temTimearr]
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.finished=true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
// 跳转分类
|
|
|
goClassify(){
|
|
|
uni.navigateTo({ url: '/pages-report/classify' })
|
|
@@ -159,8 +187,8 @@ export default {
|
|
|
},
|
|
|
|
|
|
//跳转报告详情
|
|
|
- goDetail(){
|
|
|
- uni.navigateTo({url:'/pages-report/reportDetail'})
|
|
|
+ goDetail(item){
|
|
|
+ uni.navigateTo({url:'/pages-report/reportDetail?reportId='+item.report_id})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -186,13 +214,11 @@ export default {
|
|
|
</style>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.fix-top{
|
|
|
- position: fixed;
|
|
|
+.top-sticky{
|
|
|
+ position: sticky;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
- right: 0;
|
|
|
z-index: 99;
|
|
|
- background-color: #fff;
|
|
|
}
|
|
|
.nav-bar-wrap{
|
|
|
border-bottom: 1px solid $global-border-color;
|
|
@@ -276,6 +302,7 @@ export default {
|
|
|
position: relative;
|
|
|
&:last-child{
|
|
|
border-bottom: none;
|
|
|
+ padding-bottom: 0rpx;
|
|
|
}
|
|
|
&::before{
|
|
|
content: '';
|
|
@@ -323,6 +350,7 @@ export default {
|
|
|
.tags{
|
|
|
margin-top: 20rpx;
|
|
|
color: #E3B377;
|
|
|
+ min-height: 40rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|