|
@@ -2,36 +2,35 @@
|
|
|
<view class="report-page">
|
|
|
<view class="top-sticky" style="background: #fff">
|
|
|
<!-- 导航 -->
|
|
|
- <!-- <view class="nav-bar-wrap" :style="{height:navBarStyle.height,paddingTop:navBarStyle.paddingTop,paddingBottom:navBarStyle.paddingBottom}">
|
|
|
+ <view class="nav-bar-wrap" :style="{height:navBarStyle.height,paddingTop:navBarStyle.paddingTop,paddingBottom:navBarStyle.paddingBottom}">
|
|
|
<view class="content">
|
|
|
+ <view class="avatar" @click="goUser">
|
|
|
+ <image style="width:100%;height:100%;border-radius: 50%" :src="userInfo.head_img_url" mode="aspectFill"/>
|
|
|
+ </view>
|
|
|
<van-icon custom-class="search-icon" name="search" size="24px" @click="goSearch" />
|
|
|
<view class="text">FICC研报</view>
|
|
|
</view>
|
|
|
- </view> -->
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- card -->
|
|
|
+ <view class="tab-card">
|
|
|
+ <view
|
|
|
+ class="card-item"
|
|
|
+ v-for="(tab,index) in tabCards"
|
|
|
+ :key="index"
|
|
|
+ @click="linkPage(tab)"
|
|
|
+ >
|
|
|
+ <image :src="tab.icon" mode="aspectFill" class="card-ico"/>
|
|
|
+ <view class="title">{{tab.tab}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<!-- 分类 -->
|
|
|
<view class="type-wrap">
|
|
|
- <view style="display:flex;align-items: center;margin-bottom: 20rpx;">
|
|
|
- <view class="avatar" @click="goUser">
|
|
|
- <image style="width:100%;height:100%" :src="userInfo.head_img_url" mode="aspectFill"/>
|
|
|
- </view>
|
|
|
- <view style="flex:1" @click="goSearch">
|
|
|
- <van-search
|
|
|
- shape="round"
|
|
|
- disabled
|
|
|
- placeholder="请输入报告标题或关键字"
|
|
|
- />
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
<view class="flex first-type-box">
|
|
|
- <view class="item" v-for="(item,index) in topFirstList" :key="item.classify_name" @click="handleClickTopFirst(item,index)">
|
|
|
- <image :src="selectTopFirstId==item.classify_name?item.select_icon_url:item.icon_url" mode="aspectFill"/>
|
|
|
+ <view :class="['item',{ act: selectTopFirstId==item.classify_name }]" v-for="(item,index) in topFirstList" :key="item.classify_name" @click="handleClickTopFirst(item,index)">
|
|
|
<view>{{item.classify_name}}</view>
|
|
|
</view>
|
|
|
- <!-- <view class="item" @click="goClassify">
|
|
|
- <image src="@/static/report-menu.png" mode="aspectFill"/>
|
|
|
- <view>查看更多</view>
|
|
|
- </view> -->
|
|
|
</view>
|
|
|
<view class="flex sub-type-box">
|
|
|
<view
|
|
@@ -88,6 +87,7 @@
|
|
|
const moment=require('@/utils/moment-with-locales.min')
|
|
|
moment.locale('zh-cn');
|
|
|
import {apiReportIndexPageAuthList,apiReportIndexPageList} from '@/api/report'
|
|
|
+import { apiHomeTab } from '@/api/user.js';
|
|
|
export default {
|
|
|
filters: {
|
|
|
getListTime(e){
|
|
@@ -115,12 +115,20 @@ export default {
|
|
|
dateArr:[],
|
|
|
page:1,
|
|
|
pageSize:20,
|
|
|
- finished:false
|
|
|
+ finished:false,
|
|
|
+
|
|
|
+ tabPathMap: new Map([
|
|
|
+ ['report','/pages-report/classify'],
|
|
|
+ ['chart','/pages/chart/chart'],
|
|
|
+ ['buy','/pages/buy/buy'],
|
|
|
+ ]),
|
|
|
+ tabCards: []
|
|
|
}
|
|
|
},
|
|
|
onLoad(){
|
|
|
this.initNavBar()
|
|
|
this.getTopAuthList()
|
|
|
+ this.getTopTab();
|
|
|
},
|
|
|
onShow() {
|
|
|
uni.getSystemInfo({
|
|
@@ -167,10 +175,18 @@ export default {
|
|
|
if(res.code===200){
|
|
|
this.authData.isBuy=res.data.check_flag
|
|
|
this.authData.contactInfo=res.data.contact_info
|
|
|
- this.topFirstList=res.data.permission_list
|
|
|
+ this.topFirstList=res.data.permission_list.slice(0,4)
|
|
|
this.handleClickTopFirst(this.topFirstList[0],0)
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
+ /* 顶部tab */
|
|
|
+ async getTopTab() {
|
|
|
+ const { code,data } = await apiHomeTab()
|
|
|
+
|
|
|
+ if(code !== 200) return
|
|
|
+ this.tabCards = data;
|
|
|
+ },
|
|
|
|
|
|
//点击顶部一级分类
|
|
|
handleClickTopFirst(item,index){
|
|
@@ -244,6 +260,18 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ //跳转
|
|
|
+ linkPage({mark}) {
|
|
|
+ const url = this.tabPathMap.get(mark);
|
|
|
+ uni.navigateTo({ url,
|
|
|
+ fail () {
|
|
|
+ uni.switchTab({
|
|
|
+ url,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
// 跳转分类
|
|
|
goClassify(){
|
|
|
uni.navigateTo({ url: '/pages-report/classify' })
|
|
@@ -260,7 +288,7 @@ export default {
|
|
|
url: '/pages/user/user',
|
|
|
fail () {
|
|
|
uni.switchTab({
|
|
|
- url:'/pages/user/user'
|
|
|
+ url:'/pages/user/user',
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -308,10 +336,19 @@ export default {
|
|
|
height: 100%;
|
|
|
.search-icon{
|
|
|
position: absolute;
|
|
|
- left: 34rpx;
|
|
|
+ left: 134rpx;
|
|
|
top: 50%;
|
|
|
transform: translateY(-50%);
|
|
|
}
|
|
|
+ .avatar {
|
|
|
+ width: 60rpx;
|
|
|
+ height: 60rpx;
|
|
|
+ border-radius: 50%;
|
|
|
+ position: absolute;
|
|
|
+ left: 34rpx;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -363,13 +400,18 @@ movable-area{
|
|
|
height:78rpx;
|
|
|
border-radius: 50%;
|
|
|
overflow: hidden;
|
|
|
- margin-right: 15rpx;
|
|
|
+ margin-right: 30rpx;
|
|
|
}
|
|
|
.first-type-box{
|
|
|
justify-content: space-between;
|
|
|
.item{
|
|
|
+ min-width: 120rpx;
|
|
|
flex-shrink: 0;
|
|
|
text-align: center;
|
|
|
+ padding: 16rpx 0;
|
|
|
+ text-align: center;
|
|
|
+ background-color: #F5F5F5;
|
|
|
+ border-radius: 8rpx;
|
|
|
font-size: $global-font-size-sm;
|
|
|
image{
|
|
|
width: 100rpx;
|
|
@@ -378,6 +420,10 @@ movable-area{
|
|
|
margin: 0 auto 15rpx auto;
|
|
|
}
|
|
|
}
|
|
|
+ .act {
|
|
|
+ background: #FDF8F2;
|
|
|
+ color: #E3B377;
|
|
|
+ }
|
|
|
}
|
|
|
.sub-type-box{
|
|
|
margin-top: 40rpx;
|
|
@@ -494,4 +540,23 @@ movable-area{
|
|
|
z-index: 50;
|
|
|
}
|
|
|
|
|
|
+.tab-card {
|
|
|
+ display: flex;
|
|
|
+ padding: 40rpx 34rpx 20rpx;
|
|
|
+ align-items: center;
|
|
|
+ // justify-content: space-between;
|
|
|
+ .card-item {
|
|
|
+ margin-right: 40rpx;
|
|
|
+ &:last-child { margin-right: 0; }
|
|
|
+ .card-ico {
|
|
|
+ width: 100rpx;
|
|
|
+ height: 100rpx;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
</style>
|