浏览代码

report初步完成

jwyu 3 年之前
父节点
当前提交
65aba36d45

+ 67 - 0
api/report.js

@@ -23,4 +23,71 @@ export const apiChapterDetail=params=>{
  */
 export const apiReportIndexPageAuthList=()=>{
     return httpGet('/company/getPermissionList',{})
+}
+
+/**
+ * 研报首页报告列表
+ * @param chart_permission_id
+ */
+export const apiReportIndexPageList=params=>{
+    return httpGet('/report/collect',params)
+}
+
+/**
+ * 研报搜索
+ * @param key_word
+ */
+export const apiReportSearch=params=>{
+    return httpGet('/report/search',params)
+}
+
+/**
+ * 分类数据
+ */
+export const apiReportClassify=()=>{
+    return httpGet('/classify/ficc',{})
+}
+
+/**
+ * 研报列表
+ * @param classify_id_first
+ * @param key_word
+ */
+export const apiReportList=params=>{
+    return httpGet('/report/list',params)
+}
+
+/**
+ * 二级分类列表
+ * @param classify_id_first
+ * @param classify_id_second
+ */
+export const apiSubClassifyList=params=>{
+    return httpGet('/classify/simple/list',params)
+}
+
+/**
+ * 专栏列表
+ * @param classify_id_first
+ */
+export const apiSpecialColumnList=params=>{
+    return httpGet('/classify/list',params)
+}
+
+/**
+ * 专栏详情
+ * @param classify_id_second
+ */
+export const apiSpecialColumnDetail=params=>{
+    return httpGet('/classify/detail',params)
+}
+
+/**
+ * 专栏详情中目录
+ * @param classify_id_second
+ * @param current_index
+ * @param page_size
+ */
+export const apiSpecialColumnReportList=params=>{
+    return httpGet('/classify/detail/reports',params)
 }

+ 8 - 0
mixin/index.js

@@ -44,7 +44,15 @@ module.exports = {
       let minus=parseInt(e/60)
       let sec=e%60
       return `${minus>9?minus:'0'+minus}分${sec>9?sec:'0'+sec}秒`
+    },
+
+    /**
+     * 报告时间格式化
+     */
+    formatReportTime(e){
+      return moment(e).format('YYYY-MM-DD HH:mm:ss')
     }
+
   },
   data() {
     return {

+ 4 - 3
pages-buy/detail.vue

@@ -4,7 +4,7 @@
             <view class="item" v-for="item in list" :key="item" :id="`msg${item.report_id}${item.activity_id}`" >
                 <view class="msg-time">{{formatMsgTime(item.time)}}</view>
                 <view class="content" @click="goDetail(item)">
-                    <view class="top-img" :style="'backgroundImage:url('+item.img_url+')'">
+                    <view class="top-img" :style="'background-image:url('+item.img_url+')'">
                         <text class="name">{{item.top_name}}</text>
                     </view>
                     <view class="title">{{item.title}}</view>
@@ -157,8 +157,9 @@ page{
                     display: block;
                     width: 90%;
                     text-align: center;
-                    color: #FFFFFF;
-                    font-size: 28rpx;
+                    color: #CFC09F;
+                    font-size: 32rpx;
+                    font-weight: 600;
                     position: absolute;
                     top: 50%;
                     left: 50%;

+ 42 - 39
pages-report/classify.vue

@@ -2,58 +2,56 @@
   <view class="classify-page">
     <swiper class="swiper" autoplay interval>
       <swiper-item>
-        <image src="https://hzstatic.hzinsights.com/static/icon/hzyb/idcard_exp.jpg" mode="aspectFill"/>
+        <image @click="goFiccService" :src="globalImgUrls.ficcServiceImg" mode="aspectFill"/>
       </swiper-item>
     </swiper>
     <view class="list">
       <van-row gutter="10">
-        <van-col span="6">
-          <view class="item">
-            
+        <van-col span="6" v-for="item in list" :key="item">
+          <view class="item" @click="goDetail(item)">
+            <image :src="item.icon_img_url" mode="aspectFill"/>
+            <view>{{item.classify_name_first}}</view>
           </view>
         </van-col>
-        <van-col span="6">
-          <view class="item"></view>
-        </van-col>
-        <van-col span="6">
-          <view class="item"></view>
-        </van-col>
-        <van-col span="6">
-          <view class="item"></view>
-        </van-col>
-        <van-col span="6">
-          <view class="item"></view>
-        </van-col>
-        <van-col span="6">
-          <view class="item"></view>
-        </van-col>
       </van-row>
     </view>
   </view>
 </template>
 
 <script>
+import {apiReportClassify} from '@/api/report'
 export default {
   data () {
     return {
-      list:[
-        {
-          name:"晨报",
-          img:''
-        },
-        {
-          name:"周报",
-          img:''
-        },
-        {
-          name:"双周报",
-          img:''
-        },
-        {
-          name:"月报",
-          img:''
-        },
-      ]
+      list:[]
+    }
+  },
+  onLoad(options) {
+    this.getClassifyList()
+  },
+  methods: {
+    async getClassifyList(){
+      const res=await apiReportClassify()
+      if(res.code===200){
+        this.list=res.data
+      }
+    },
+
+    goDetail(item){
+      //redirect_type : 跳转页面类型:1,专栏列表,2报告列表,3专栏详情
+      if(item.redirect_type==1){
+        uni.navigateTo({ url: `/pages-report/specialColumn/list?classifyId=${item.classify_id_first}&classifyName=${item.classify_name_first}` })
+      }
+      if(item.redirect_type==2){
+        uni.navigateTo({url:`/pages-report/reportList?classifyId=${item.classify_id_first}&classifyName=${item.classify_name_first}`})
+      }
+      if(item.redirect_type==3){
+        uni.navigateTo({url:'/pages-report/specialColumn/detail?columnId='+item.classify_id_second})
+      }
+    },
+
+    goFiccService(){
+      uni.navigateTo({url:'/pages-report/ficcService'})
     }
   }
 };
@@ -69,15 +67,20 @@ export default {
       width: 100%;
       height: 100%;
       display: block;
+      border-radius: 8rpx;
     }
   }
   .list{
     margin-top: 40rpx;
     .item{
       width: 100%;
-      height: 150rpx;
-      background-color: #ccc;
       margin-bottom: 30rpx;
+      text-align: center;
+      image{
+        width: 128rpx;
+        height: 128rpx;
+        // background-color: #f5f5f5;
+      }
     }
   }
 }

+ 29 - 0
pages-report/ficcService.vue

@@ -0,0 +1,29 @@
+<template>
+    <view class="ficc-service-page">
+        <image
+            :src="globalImgUrls.ficcServicePage"
+            mode="widthFix"
+        />
+    </view>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style>
+page{
+    padding-bottom: 0;
+}
+</style>
+<style lang="scss" scoped>
+
+.ficc-service-page{
+    image{
+        width: 100%;
+        display: block;
+    }
+}
+</style>

+ 125 - 24
pages-report/reportList.vue

@@ -3,20 +3,25 @@
     <van-sticky style="background: #fff">
       <view class="flex search-wrap">
         <searchBox style="flex: 1" :focus="focus" placeholder="请输入报告标题或关键字" :hasRightBtn="false" @change="onChange" @search="onSearch"></searchBox>
-        <view class="filter-box" @click="showFilter=true">
+        <view class="filter-box" @click="showFilter=true" v-if="classifyList.length>0">
           <image src="./static/filter-icon.png" mode="aspectFill"></image>
           <text>筛选</text>
         </view>
       </view>
     </van-sticky>
-    <view class="report-list-wrap">
-      <view class="flex item" v-for="item in 10" :key="item">
-        <image class="img" src="" mode="aspectFill" />
+    <view class="report-empty-box" v-if="finished&&list.length==0">
+      <image :src="globalImgUrls.chartEmpty" mode="widthFix" />
+      <view>找不到对应报告,试试别的搜索词吧</view>
+    </view>
+    <view class="report-list-wrap" v-else>
+      <view class="flex item" v-for="item in list" :key="item.report_id" @click="goReportDetail(item)">
+        <image class="img" :src="item.report_img_url" mode="aspectFill" />
         <view class="con">
-          <view class="title">【第16期|FICC】宏观商品复盘</view>
-          <view class="tips">摘要:市场风险偏好正面</view>
-          <view class="time">2021.11.22 18:00</view>
-          <view class="audio-box grey-audio-box">
+          <view class="title">【第{{item.stage}}期|FICC】{{item.title}}</view>
+          <view class="van-ellipsis tips">摘要:{{item.abstract}}</view>
+          <view class="time">{{item.publish_time|formatReportTime}}</view>
+          <view class="audio-box">
+            <image src="./static/audio.png" mode="aspectFill"/>
             <text>播放</text>
           </view>
         </view>
@@ -24,7 +29,7 @@
     </view>
 
     <!-- 筛选 -->
-    <van-popup :show="showFilter" position="bottom" round>
+    <van-popup :show="showFilter" position="bottom" :safe-area-inset-bottom="false" round @close="showFilter=false">
         <view class="filter-wrap">
             <view class="flex top">
                 <text style="color:#000">筛选</text>
@@ -32,12 +37,14 @@
             </view>
             <view class="list-box">
                 <van-row gutter="10">
-                    <van-col span="8" v-for="item in 17" :key="item">
-                        <view class="item active">item</view>
+                    <van-col span="8" v-for="item in classifyList" :key="item">
+                        <view 
+                          :class="['item',item.classify_id_second==selectSecClassifyId&&'active']" 
+                          @click="handleSelectSecClassifyId(item)"
+                        >{{item.classify_second_simple}}</view>
                     </van-col>
                 </van-row>
             </view>
-            <view class="btn">完成</view>
         </view>
     </van-popup>
   </view>
@@ -45,33 +52,119 @@
 
 <script>
 import searchBox from "./components/searchBox.vue";
+import {apiReportList,apiSubClassifyList} from '@/api/report'
 export default {
   components: {
     searchBox,
   },
   data() {
     return {
+      classifyId:0,
+
+      classifyList:[],
+      selectSecClassifyId:0,
+
       searchVal: "",
-      showFilter:true
+      showFilter:false,
+
+      list:[],
+      finished:false,
+      page:1,
+      pageSize:20
     };
   },
+  onLoad(options) {
+    this.classifyId=options.classifyId
+    // 设置title
+    uni.setNavigationBarTitle({ title: decodeURIComponent(options.classifyName)+'列表' })
+    this.getList()
+    this.getClassifyList()
+  },
+  onPullDownRefresh() {
+    this.page=1
+    this.list=[]
+    this.finished=false
+    this.getList()
+    this.getClassifyList()
+    setTimeout(() => {
+      uni.stopPullDownRefresh()
+    }, 1500);
+  },
+  onReachBottom() {
+    if(this.finished) return
+    this.page++
+    this.getList()
+  },
   methods: {
+    //获取研报列表
+    async getList(){
+      const res=await apiReportList({
+        classify_id_first:Number(this.classifyId),
+        classify_id_second:Number(this.selectSecClassifyId),
+        key_word:this.searchVal,
+        current_index:this.page,
+        page_size:this.pageSize
+      })
+      if(res.code===200){
+        let arr=res.data.list||[]
+        this.list=[...this.list,...arr]
+        if(res.data.paging.is_end){
+          this.finished=true
+        }
+      }
+    },
+
+    //分类数据
+    async getClassifyList(){
+      const res=await apiSubClassifyList({classify_id_first:Number(this.classifyId)})
+      if(res.code===200){
+        this.classifyList=res.data
+      }
+    },
+
+    handleSelectSecClassifyId(item){
+      this.selectSecClassifyId=item.classify_id_second
+      this.showFilter=false
+      this.page=1
+      this.finished=false
+      this.list=[]
+      this.getList()
+    },
+
+
     onChange(e) {
       this.searchVal = e;
     },
+
     onSearch() {
       console.log("搜索", this.searchVal);
+      this.page=1
+      this.finished=false
+      this.list=[]
+      this.getList()
     },
+
+    goReportDetail(item){
+      uni.navigateTo({ url: '/pages-report/reportDetail?reportId='+item.report_id })
+    }
+
+
   },
 };
 </script>
 
+<style>
+page{
+  padding-bottom: 0;
+}
+</style>
 <style lang="scss" scoped>
 .search-wrap {
   background-color: #fff;
   padding: 30rpx 34rpx;
   align-items: center;
   .filter-box {
+    margin-left: 20rpx;
     image {
       width: 52rpx;
       height: 52rpx;
@@ -99,6 +192,7 @@ export default {
     .con {
       flex: 1;
       position: relative;
+      overflow: hidden;
       .title {
         font-size: 32rpx;
         font-weight: bold;
@@ -121,6 +215,14 @@ export default {
         border-radius: 20rpx;
         color: #fff;
         font-size: 24rpx;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        image{
+          width: 30rpx;
+          height: 30rpx;
+          margin-right: 4rpx;
+        }
       }
       .grey-audio-box {
         background: linear-gradient(114deg, #b0b0b0 0%, #e5e2e2 100%);
@@ -129,7 +231,6 @@ export default {
   }
 }
 .filter-wrap{
-    min-height: 30vh;
     background-color: #fff;
     padding-top: 53rpx;
     .top{
@@ -139,25 +240,25 @@ export default {
         padding: 0 34rpx;
     }
     .list-box{
+        min-height: 30vh;
+        max-height: 60vh;
+        overflow-y: auto;
         padding: 0 34rpx;
         .item{
             background-color: #F6F6F6;
             color: #000000;
-            text-align: center;
-            line-height: 76rpx;
+            // text-align: center;
+            height: 76rpx;
+            overflow: hidden;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            // line-height: 76rpx;
             margin-bottom: 20rpx;
         }
         .active{
             background-color: #FAEEDE;
         }
     }
-    .btn{
-        text-align: center;
-        color: #fff;
-        font-size: 32rpx;
-        background-color: #E6B77D;
-        line-height: 80rpx;
-        margin-top: 50rpx;
-    }
 }
 </style>

+ 43 - 22
pages-report/search.vue

@@ -10,13 +10,20 @@
             ></searchBox>
             </view>
         </van-sticky>
-        <view class="list-wrap">
-            <view class="item" v-for="item in list" :key="item">
-                <view class="van-ellipsis title">{{item.title}}</view>
-                <view class="van-multi-ellipsis--l3 desc">{{item.desc}}</view>
+        <view class="empty-box" v-if="finished&&list.length==0">
+            <image :src="globalImgUrls.chartEmpty" mode="widthFix" />
+            <view>找不到对应报告,试试别的搜索词吧</view>
+        </view>
+        <view class="list-wrap" v-else>
+            <view class="item" v-for="item in list" :key="item" @click="goReportDetail(item)">
+                <view class="van-ellipsis title" v-html="item.title"></view>
+                <view class="van-multi-ellipsis--l3 desc" v-html="item.content_sub"></view>
                 <view class="flex bot">
-                    <view class="tags"><text>#双周报</text><text>#双周报</text></view>
-                    <view class="time">{{item.time}}</view>
+                    <view class="tags">
+                        <text v-if="item.classify_name_first">#{{item.classify_name_first}}</text>
+                        <text v-if="item.classify_name_second">#{{item.classify_name_second}}</text>
+                    </view>
+                    <view class="time">{{item.publish_time|formatReportTime}}</view>
                 </view>
             </view>
         </view>
@@ -25,6 +32,7 @@
 
 <script>
 import searchBox from './components/searchBox.vue'
+import {apiReportSearch} from '@/api/report'
 export default {
     components: {
         searchBox
@@ -33,28 +41,31 @@ export default {
         return {
             searchVal:'',
             focus:true,
-            list:[
-                {
-                    title:"关注中美领导交流地产",
-                    desc:'地产政策的拐点肯定是看到了,由小及大的趋势。目前按揭和开发贷放松,属于对前面过紧政策的修补。政策的影响是把之前过于悲观的预期做了纠正。市场把贴水修复一下。',
-                    tags:['双周报','煤炭双周报'],
-                    time:'2021年8月31日 15:30'
-                },
-                {
-                    title:"关注中美领导交流地产",
-                    desc:'地产政策的拐点肯定是看到了。',
-                    tags:['双周报'],
-                    time:'2021年8月31日 15:30'
-                }
-            ]
+            list:[],
+            finished:false
         }
     },
     methods: {
         onChange(e){
             this.searchVal=e
         },
-        onSearch(){
-            console.log('搜索',this.searchVal);
+
+        async onSearch(){
+            this.finished=false
+            if(!this.searchVal){
+                this.list=[]
+                this.finished=true
+                return
+            }
+            const res=await apiReportSearch({key_word:this.searchVal})
+            if(res.code===200){
+                this.list=res.data.list||[]
+                this.finished=true
+            }
+        },
+
+        goReportDetail(item){
+            uni.navigateTo({ url: '/pages-report/reportDetail?reportId='+item.report_id })
         }
     }
 }
@@ -66,6 +77,16 @@ export default {
 }
 </style>
 <style lang="scss" scoped>
+.empty-box{
+    text-align: center;
+    font-size: 32rpx;
+    color: #999;
+    padding-top: 150rpx;
+    image{
+        width: 346rpx;
+        margin-bottom: 57rpx;
+    }
+}
 .list-wrap{
     padding: 34rpx;
     .item{

+ 80 - 14
pages-report/specialColumn/detail.vue

@@ -1,14 +1,14 @@
 <template>
     <view class="special-column-info-page">
         <image class="top-bg" src="../static/bg-1.png" mode="aspectFill"/>
-        <view class="user-wrap">
-            <image src="" mode="aspectFill" class="avatar"/>
+        <view class="user-wrap" v-if="info">
+            <image :src="info.avatar_img_url" mode="aspectFill" class="avatar"/>
             <view class="user-name">
-                <text>王沛</text>
-                <text class="tag">弘则研究董事长</text>
+                <text>{{info.report_author}}</text>
+                <text class="tag" v-if="vip_title">{{info.vip_title}}</text>
             </view>
-            <view class="user-title">首席宏观商品分析师</view>
-            <view class="user-intro">北京航空航天大学获得学士学位,清华大学获得硕士学位。负责弘则研究的周期品研究和大类资产配置,并与商品私募、国内大型大宗商品贸易企业有深入的沟通与合作。</view>
+            <view class="user-title">{{info.author_descript}}</view>
+            <view class="user-intro">{{info.abstract}}</view>
         </view>
         <van-sticky>
         <view class="flex tab-box">
@@ -17,16 +17,17 @@
         </view>
         </van-sticky>
         <view class="section column-intro-wrap" v-if="tabActive=='专栏介绍'">
-            专栏介绍
+            <view v-html="info.descript"></view>
         </view>
         <view class="section report-list-wrap" v-if="tabActive=='报告目录'">
-            <view class="flex item" v-for="item in 10" :key="item">
-                <image class="img" src="" mode="aspectFill"/>
+            <view class="flex item" v-for="item in list" :key="item" @click="goDetail(item)">
+                <image class="img" :src="item.report_img_url" mode="aspectFill"/>
                 <view class="con">
-                    <view class="title">【第16期|FICC】宏观商品复盘</view>
-                    <view class="tips">摘要:市场风险偏好正面</view>
-                    <view class="time">2021.11.22  18:00</view>
-                    <view class="audio-box grey-audio-box">
+                    <view class="title">【第{{item.stage}}期|FICC】{{item.classify_name_second}}</view>
+                    <view class="van-ellipsis tips">摘要:{{item.abstract}}</view>
+                    <view class="time">{{item.publish_time|formatReportTime}}</view>
+                    <view class="audio-box">
+                        <image src="../static/audio.png" mode="aspectFill"/>
                         <text>播放</text>
                     </view>
                 </view>
@@ -37,15 +38,71 @@
 </template>
 
 <script>
+import {apiSpecialColumnDetail,apiSpecialColumnReportList} from '@/api/report'
 export default {
     data () {
         return {
-            tabActive:'报告目录'
+            tabActive:'专栏介绍',
+            columnId:0,
+            info:null,
+
+            list:[],
+            page:1,
+            pageSize:20,
+            finished:false
+        }
+    },
+    onLoad(options) {
+        this.columnId=options.columnId
+        this.getDetail()
+        this.getList()
+    },
+    onPullDownRefresh() {
+        this.getDetail()
+        this.list=[]
+        this.page=1
+        this.finished=false
+        this.getList()
+        setTimeout(()=>{
+            uni.stopPullDownRefresh()
+        },1500)
+    },
+    onReachBottom() {
+        if(!this.finished&&this.tabActive=='专栏介绍'){
+            this.page++
+            this.getList()
         }
     },
     methods: {
+        async getDetail(){
+            const res=await apiSpecialColumnDetail({classify_id_second:Number(this.columnId)})
+            if(res.code===200){
+                this.info=res.data
+                uni.setNavigationBarTitle({ title: res.data.classify_name_second })
+            }
+        },
+
+        async getList(){
+            const res=await apiSpecialColumnReportList({
+                classify_id_second:Number(this.columnId),
+                current_index:this.page,
+                page_size:this.pageSize
+            })
+            if(res.code===200){
+                let arr=res.data.list||[]
+                this.list=[...this.list,...arr]
+                if(res.data.paging.is_end){
+                    this.finished=true
+                }
+            }
+        },
+
         tabChange(e){
             this.tabActive=e
+        },
+
+        goDetail(item){
+            uni.navigateTo({ url: '/pages-report/reportDetail?reportId='+item.report_id })
         }
     }
 }
@@ -152,6 +209,7 @@ export default {
             .con{
                 flex: 1;
                 position: relative;
+                overflow: hidden;
                 .title{
                     font-size: 32rpx;
                     font-weight: bold;
@@ -174,6 +232,14 @@ export default {
                     border-radius: 20rpx;
                     color: #fff;
                     font-size: 24rpx;
+                    display: flex;
+                    justify-content: center;
+                    align-items: center;
+                    image{
+                        width: 30rpx;
+                        height: 30rpx;
+                        margin-right: 4rpx;
+                    }
                 }
                 .grey-audio-box{
                     background: linear-gradient(114deg, #B0B0B0 0%, #E5E2E2 100%);

+ 40 - 10
pages-report/specialColumn/list.vue

@@ -1,13 +1,17 @@
 <template>
     <view class="special-column-list-page">
-      <view class="list">
-        <view class="flex item" v-for="item in 4" :key="item" @click="goDetail">
-          <image class="avatar" src="" mode="aspectFill" lazyload/>
+      <view class="report-empty-box" v-if="finished&&list.length==0">
+        <image :src="globalImgUrls.chartEmpty" mode="widthFix" />
+        <view>暂无数据</view>
+      </view>
+      <view class="list" v-else>
+        <view class="flex item" v-for="item in list" :key="item" @click="goDetail(item)">
+          <image class="avatar" :src="item.home_img_url" mode="aspectFill" lazyload/>
           <view class="content">
-            <view class="name">股债日评</view>
-            <view class="author">主讲人:王沛</view>
-            <view class="job">弘则研究董事长/首席宏观商品分析师</view>
-            <view class="num">第35期 | FICC</view>
+            <view class="name">{{classifyName}}</view>
+            <view class="author">主讲人:{{item.report_author}}</view>
+            <view class="job">{{item.author_descript}}</view>
+            <view class="num">第{{item.stage}}期 | {{item.product_name}}</view>
           </view>
         </view>
       </view>
@@ -16,15 +20,41 @@
 </template>
 
 <script>
+import {apiSpecialColumnList} from '@/api/report'
 export default {
   data () {
     return {
-      
+      classifyId:0,
+      classifyName:'',
+
+      list:[],
+      finished:false
     }
   },
+  onLoad(options) {
+    this.classifyId=options.classifyId
+    // 设置title
+    this.classifyName=decodeURIComponent(options.classifyName)
+    uni.setNavigationBarTitle({ title: decodeURIComponent(options.classifyName) })
+    this.getList()
+  },
+  onPullDownRefresh() {
+    this.list=[]
+    this.getList()
+  },
   methods: {
-    goDetail(){
-      uni.navigateTo({ url: '/pages-report/specialColumn/detail' })
+    async getList(){
+      this.finished=false
+      const res=await apiSpecialColumnList({classify_id_first:Number(this.classifyId)})
+      if(res.code===200){
+        this.list=res.data||[]
+        this.finished=true
+      }
+    },
+
+
+    goDetail(item){
+      uni.navigateTo({ url: '/pages-report/specialColumn/detail?columnId='+item.classify_id_second })
     }
   }
 }

二进制
pages-report/static/audio.png


+ 19 - 6
pages.json

@@ -153,17 +153,26 @@
 						"navigationBarTitleText":"FICC研报"
 					}
 				},
-				// 专栏列表
+				// 专栏列表 classifyId 
 				{
-					"path": "specialColumn/list"
+					"path": "specialColumn/list",
+					"style":{
+						"enablePullDownRefresh": true
+					}
 				},
-				// 专栏详情
+				// 专栏详情 columnId
 				{
-					"path": "specialColumn/detail"
+					"path": "specialColumn/detail",
+					"style":{
+						"enablePullDownRefresh": true
+					}
 				},
-				// 报告列表
+				// 报告列表 classifyId
 				{
-					"path": "reportList"
+					"path": "reportList",
+					"style":{
+						"enablePullDownRefresh": true
+					}
 				},
 				//报告详情
 				{
@@ -172,6 +181,10 @@
 				// 章节详情
 				{
 					"path": "chapterDetail"
+				},
+				//ficc介绍页面
+				{
+					"path": "ficcService"
 				}
 			]
 		}

+ 2 - 1
pages/buy/buy.vue

@@ -2,7 +2,7 @@
   <view class="buy-page">
     <view class="list-wrap">
       <view class="flex item" v-for="item in list" :key="item.report_id" @click="goDetail(item)">
-        <view class="img">
+        <view class="img" :style="'background-image:url('+item.img_url+')'">
           <text class="num" v-if="item.unread">{{item.unread}}</text>
         </view>
         <view class="content-box">
@@ -75,6 +75,7 @@ export default {
         width: 120rpx;
         height: 120rpx;
         background-color: $global-bg-color-grey;
+        background-size: cover;
         position: relative;
         border-radius: 14rpx;
         .num{

+ 87 - 59
pages/report/report.vue

@@ -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;
     }
   }
 }

+ 12 - 0
style/common.scss

@@ -79,4 +79,16 @@ view{
             border: none;
         }
     }
+}
+
+/* 报告模块公共空白页 */
+.report-empty-box{
+    text-align: center;
+    font-size: 32rpx;
+    color: #999;
+    padding-top: 150rpx;
+    image{
+        width: 346rpx;
+        margin-bottom: 57rpx;
+    }
 }

+ 2 - 0
utils/config.js

@@ -29,6 +29,8 @@ const globalImgUrls={
     loginTop:'https://hzstatic.hzinsights.com/static/icon/hzyb/login_top_img.png',
     idCardExp:'https://hzstatic.hzinsights.com/static/icon/hzyb/idcard_exp.jpg',
     defaultAvatar:'https://hzstatic.hzinsights.com/static/icon/hzyb/default_avatar.png',
+    ficcServiceImg:'https://hzstatic.hzinsights.com/static/icon/hzyb/ficc_service.png',
+    ficcServicePage:'https://hzstatic.hzinsights.com/static/icon/hzyb/ficc_service_page.png',
 }
 
 // 默认tabbar数据