|
@@ -1,77 +1,126 @@
|
|
|
<template>
|
|
|
- <view class="container Index-container">
|
|
|
- <view class="index-fixed">
|
|
|
- <view class="index-header">
|
|
|
- <input type="text" placeholder="搜索您想要的纪要" placeholder-class="sea_ipt_placeholder" class="sea_ipt" v-model="searchTxt" disabled @click="goSearch" />
|
|
|
- <icon type="search" size="15" class="search_ico" />
|
|
|
- </view>
|
|
|
- <!-- 导航条 -->
|
|
|
- <view class="tab-cont">
|
|
|
- <scroll-view scroll-x="true" scroll-with-animation class="scroll-tab" @scroll="scrollMove" :scroll-left="scrollLeft" :scroll-into-view="'_' + tabIndex">
|
|
|
- <block v-for="(item, index) in tabBars" :key="item.ChartPermissionId">
|
|
|
- <view :id="'_' + index" class="scroll-tab-item" :class="{ active: tabAct_id == item.ChartPermissionId }" @click.stop="toggleTab(item, index)">
|
|
|
- {{ item.PermissionName }}
|
|
|
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/border_act.png" mode="" class="border_act" v-if="tabAct_id == item.ChartPermissionId"></image>
|
|
|
+ <view class="container Index-container">
|
|
|
+ <view class="top-content-box">
|
|
|
+ <view class="nav-bar-wrap" :style="{ height: navBarStyle.height, paddingTop: navBarStyle.paddingTop, paddingBottom: navBarStyle.paddingBottom }">
|
|
|
+ <view class="content">
|
|
|
+ <van-icon name="search" size="28px" class="search-icon" @click="goSearch" />
|
|
|
+ <view class="top-tabs">
|
|
|
+ <view :class="['item', item.val == topTabsActive && 'tabs-active']" v-for="(item, index) in topTabBars" :key="item.val" @click="topTabsChange(item.val)">
|
|
|
+ {{ item.type }}
|
|
|
+ <block v-if="index === topTabBars.length - 1 && isShowChart">
|
|
|
+ <image class="limit-img tabs-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/limit_icon.png" mode=""></image>
|
|
|
+ </block>
|
|
|
+ <view class="active" v-if="item.val == topTabsActive"></view>
|
|
|
</view>
|
|
|
- </block>
|
|
|
- <view class="limit-box" v-if="limitIsShow">
|
|
|
- <image class="limit-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/limit_icon.png" mode=""></image>
|
|
|
</view>
|
|
|
- </scroll-view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ <view class="tabs-content">
|
|
|
+ <view class="second-tabs" v-if="topTabsActive == '2' || topTabsActive == '3'">
|
|
|
+ <view
|
|
|
+ :class="['item', item.ChartPermissionId == secondActive && 'tabs-active text_twoLine']"
|
|
|
+ v-for="(item, index) in secondBars"
|
|
|
+ :key="item.ChartPermissionId"
|
|
|
+ @click="handleClickTopSub(item)"
|
|
|
+ >
|
|
|
+ {{ item.PermissionName }}
|
|
|
+ <block v-if="index === secondBars.length - 1 && topTabsActive == '2' && isShowResearch">
|
|
|
+ <image class="limit-img tabs-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/limit_icon.png" mode=""></image>
|
|
|
+ </block>
|
|
|
+ <view class="active" v-if="item.ChartPermissionId == secondActive"></view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <block v-if="topTabsActive == '3'">
|
|
|
+ <view class="children-ul">
|
|
|
+ <view :class="['chart-children', chartChildrenActive == item.CtagId ? 'children-active' : '']" v-for="item in chartChildren" :key="item.CtagId" @click="handleChartChildren(item)">{{
|
|
|
+ item.Name
|
|
|
+ }}</view>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<block v-if="haveData">
|
|
|
<view class="data-cont">
|
|
|
<view class="report-ul">
|
|
|
<view class="report-item" v-for="(report, index) in dataList" :key="index" v-if="index % 2 === 0" @click="goDetail(report)">
|
|
|
<view class="item-content-img" v-if="report.BodyHtml">
|
|
|
- <!-- <mp-html :content="report.BodyHtml" /> -->
|
|
|
<image :src="report.BodyHtml" mode=""></image>
|
|
|
</view>
|
|
|
<view class="item-content" v-else>{{ report.Body }}</view>
|
|
|
<view class="line"></view>
|
|
|
- <text class="item-title">{{ report.Title }}</text>
|
|
|
+ <text :class="['item-title', report.Source != 1 && 'chart-title text_twoLine']">{{ report.Title }}</text>
|
|
|
<view class="item-abstract text_twoLine" v-if="report.ExpertBackground">
|
|
|
<image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/fenxi_ico.png" class="report_ico"></image>
|
|
|
{{ report.ExpertBackground }}
|
|
|
</view>
|
|
|
- <view class="item-createtime">
|
|
|
- <text>{{ report.PublishDate }}</text>
|
|
|
- <view class="item-examine" v-if="report.IsResearch">
|
|
|
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png"></image>
|
|
|
- <text>{{ report.Pv }}</text>
|
|
|
+ <block v-if="report.Source == 1">
|
|
|
+ <view class="item-createtime">
|
|
|
+ <text>{{ report.PublishDate }}</text>
|
|
|
+ <view class="item-examine" v-if="report.IsResearch">
|
|
|
+ <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png"></image>
|
|
|
+ <text>{{ report.Pv }}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <view class="item-createtime chart-tag">
|
|
|
+ <text class="tag-item" v-if="report.PtagName">{{ report.PtagName }}</text>
|
|
|
+ <text class="tag-item" v-if="report.CtagName">{{ report.CtagName }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="chart-collect" v-if="topTabsActive == 3 && secondActive == 0">
|
|
|
+ <text class="cancel" @click.stop="myChartIsTop(report.ChartId)">{{ report.IsTop ? "取消置顶" : "置顶" }}</text>
|
|
|
+ <text class="remove" @click.stop="myChartCollect(report.ChartId)">移除</text>
|
|
|
+ </view>
|
|
|
+ <view class="my-chart-collect" v-if="topTabsActive == 3 && secondActive == 0 && report.IsTop"></view>
|
|
|
+ </block>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="report-ul">
|
|
|
<view class="report-item" v-for="(report, index) in dataList" :key="index" v-if="index % 2 !== 0" @click="goDetail(report)">
|
|
|
<view class="item-content-img" v-if="report.BodyHtml">
|
|
|
- <!-- <mp-html :content="report.BodyHtml" /> -->
|
|
|
<image :src="report.BodyHtml"></image>
|
|
|
</view>
|
|
|
<view class="item-content" v-else>{{ report.Body }}</view>
|
|
|
<view class="line"></view>
|
|
|
- <text class="item-title">{{ report.Title }}</text>
|
|
|
+ <text :class="['item-title', report.Source != 1 && 'chart-title text_twoLine']">{{ report.Title }}</text>
|
|
|
<view class="item-abstract text_twoLine" v-if="report.ExpertBackground">
|
|
|
<image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/fenxi_ico.png" class="report_ico"></image>
|
|
|
{{ report.ExpertBackground }}
|
|
|
</view>
|
|
|
- <view class="item-createtime">
|
|
|
- <text>{{ report.PublishDate }}</text>
|
|
|
- <view class="item-examine" v-if="report.IsResearch">
|
|
|
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png"></image>
|
|
|
- <text>{{ report.Pv }}</text>
|
|
|
+ <block v-if="report.Source == 1">
|
|
|
+ <view class="item-createtime">
|
|
|
+ <text>{{ report.PublishDate }}</text>
|
|
|
+ <view class="item-examine" v-if="report.IsResearch">
|
|
|
+ <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png"></image>
|
|
|
+ <text>{{ report.Pv }}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <view class="item-createtime chart-tag">
|
|
|
+ <text class="tag-item" v-if="report.PtagName">{{ report.PtagName }}</text>
|
|
|
+ <text class="tag-item" v-if="report.CtagName">{{ report.CtagName }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="chart-collect" v-if="topTabsActive == 3 && secondActive == 0">
|
|
|
+ <text class="cancel" @click.stop="myChartIsTop(report.ChartId)">{{ report.IsTop ? "取消置顶" : "置顶" }}</text>
|
|
|
+ <text class="remove" @click.stop="myChartCollect(report.ChartId)">移除</text>
|
|
|
+ </view>
|
|
|
+ <view class="my-chart-collect" v-if="topTabsActive == 3 && secondActive == 0 && report.IsTop"></view>
|
|
|
+ </block>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" />
|
|
|
+ <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="pageNum > 1" />
|
|
|
</block>
|
|
|
<view class="nodata" v-else-if="haveData === false" style="padding-top: 400rpx">
|
|
|
- <image src="@/static/img/nodata.png" mode="" class="nodata_ico"></image>
|
|
|
- <text>暂时没有行业数据</text>
|
|
|
+ <block class="nodata" v-if="!isBindingMobile && secondActive == 0">
|
|
|
+ <text>请先绑定联系方式</text>
|
|
|
+ <view class="bind-mobile" @click="bindingMobile">绑定联系方式</view>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
|
|
|
+ <text>{{ topTabsActive == 3 && secondActive == 0 ? "暂无收藏的图表" : "暂时没有数据" }}</text>
|
|
|
+ </block>
|
|
|
</view>
|
|
|
<view class="content-intimate" v-if="reportShow">
|
|
|
<van-transition :show="showTransition" name="fade-right">
|
|
@@ -92,47 +141,58 @@
|
|
|
</van-transition>
|
|
|
<image @click="showTransition = !showTransition" src="https://hzstatic.hzinsights.com/cygx/czbk/intimate-icon.png" mode=""></image>
|
|
|
</view>
|
|
|
+ <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { Home, Reports } from "@/config/api.js";
|
|
|
-import { Throttle } from "@/config/util.js";
|
|
|
+import { Home, Reports, Chart } from "@/config/api.js";
|
|
|
+import { Throttle, deepCopy } from "@/config/util.js";
|
|
|
+import freeCharge from "@/components/freeCharge";
|
|
|
let app = getApp();
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ navBarStyle: {
|
|
|
+ height: 60 + "px",
|
|
|
+ paddingTop: 40 + "px",
|
|
|
+ paddingBottom: "20px",
|
|
|
+ },
|
|
|
+ topTabBars: [
|
|
|
+ //一级top
|
|
|
+ { type: "最新", val: 1 },
|
|
|
+ { type: "纪要", val: 2 },
|
|
|
+ { type: "图表", val: 3 },
|
|
|
+ ],
|
|
|
+ topTabsActive: 1, //一级top的tabs
|
|
|
+ secondActive: "", //二级的tabs
|
|
|
+ secondBars: [], //二级的tabs数组
|
|
|
+ chartChildren: [], //二级的tabs下的标签
|
|
|
+ chartChildrenActive: 0,
|
|
|
refresh: false,
|
|
|
pageSize: 10, //条数
|
|
|
pageNum: 1, //页码
|
|
|
haveMore: true, //是否有更多数据
|
|
|
haveData: null, //是否有数据
|
|
|
- tabAct_id: 0,
|
|
|
//数据列表
|
|
|
dataList: [],
|
|
|
- // tab
|
|
|
- tabBars: [],
|
|
|
status: "loadmore",
|
|
|
loadText: {
|
|
|
loadmore: "上拉加载更多",
|
|
|
loading: "加载中",
|
|
|
nomore: "已经到底了",
|
|
|
},
|
|
|
- totalPage: "",
|
|
|
- limitIsShow: false, //限免的隐现
|
|
|
- scrollLeft: 0,
|
|
|
showTransition: false, //点击绝密后的隐现
|
|
|
reportShow: false, //绝密标签的隐现
|
|
|
+ isShowChart: false, //图表限免
|
|
|
+ isShowResearch: false, //研选限免
|
|
|
+ isBindingMobile: true, //图表我的收藏是否绑定手机号
|
|
|
};
|
|
|
},
|
|
|
- watch: {
|
|
|
- tabAct_id: {
|
|
|
- handler() {
|
|
|
- this.getReportList();
|
|
|
- },
|
|
|
- immediate: true,
|
|
|
- },
|
|
|
+ components: {
|
|
|
+ freeCharge,
|
|
|
},
|
|
|
+ watch: {},
|
|
|
onLoad(optios) {
|
|
|
uni.getSystemInfo({
|
|
|
success: function (res) {
|
|
@@ -143,124 +203,273 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
});
|
|
|
- if (optios.tabid) {
|
|
|
- this.tabAct_id = optios.tabid;
|
|
|
+ if (optios.topTabsActive) {
|
|
|
+ this.topTabsActive = optios.topTabsActive;
|
|
|
+ this.getTabs();
|
|
|
}
|
|
|
- this.getTabs();
|
|
|
+ this.initNavBar();
|
|
|
this.reportIsShow();
|
|
|
+ this.getReportList();
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.$store.dispatch("statistics", { PageType: "Summary", ChartPermissionId: Number(this.tabAct_id) });
|
|
|
+ //进入页面的记录
|
|
|
+ this.$store.dispatch("statistics", { PageType: "Activit" });
|
|
|
// #ifdef MP-WEIXIN
|
|
|
uni.hideHomeButton();
|
|
|
// #endif
|
|
|
},
|
|
|
methods: {
|
|
|
- gopc(){
|
|
|
- uni.reLaunch({
|
|
|
- url: "/pages/pcWebViev/pcWebViev",
|
|
|
- });
|
|
|
- },
|
|
|
- goSecretDetail(type) {
|
|
|
- uni.navigateTo({
|
|
|
- url: "/reportPages/secretDetails/secretDetails?type=" + type,
|
|
|
- });
|
|
|
+ //获取胶囊位置
|
|
|
+ initNavBar() {
|
|
|
+ let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
|
|
+ this.navBarStyle = {
|
|
|
+ height: menuButtonInfo.height + menuButtonInfo.top + 8 + "px",
|
|
|
+ paddingTop: menuButtonInfo.top - 4 + "px",
|
|
|
+ paddingBottom: "4px",
|
|
|
+ };
|
|
|
},
|
|
|
- async reportIsShow() {
|
|
|
- const res = await Reports.reportIsShow();
|
|
|
- if (res.Ret === 200) {
|
|
|
- this.reportShow = res.Data.IsShow;
|
|
|
+ //点击顶部一级分类
|
|
|
+ topTabsChange(name) {
|
|
|
+ this.topTabsActive = name;
|
|
|
+ this.chartChildren = [];
|
|
|
+ this.chartChildrenActive = 0;
|
|
|
+ this.secondActive = "";
|
|
|
+ this.pageNum = 1;
|
|
|
+ this.dataList = [];
|
|
|
+ uni.pageScrollTo({
|
|
|
+ scrollTop: 0,
|
|
|
+ duration: 0,
|
|
|
+ });
|
|
|
+ if (this.topTabsActive == "2" || this.topTabsActive == "3") {
|
|
|
+ this.getTabs();
|
|
|
+ } else {
|
|
|
+ this.initData();
|
|
|
}
|
|
|
},
|
|
|
- /* 切换分类 */
|
|
|
- toggleTab(item, index) {
|
|
|
- if (this.tabAct_id !== item.ChartPermissionId) {
|
|
|
- this.tabAct_id = item.ChartPermissionId;
|
|
|
- this.pageNum = 1;
|
|
|
- uni.pageScrollTo({
|
|
|
- scrollTop: 0,
|
|
|
- duration: 0,
|
|
|
+ //点击顶部二级分类
|
|
|
+ handleClickTopSub(item) {
|
|
|
+ this.secondActive = item.ChartPermissionId;
|
|
|
+ this.chartChildren = [];
|
|
|
+ this.chartChildrenActive = 0;
|
|
|
+ this.childrenChartData();
|
|
|
+ this.initData();
|
|
|
+ },
|
|
|
+ //点击图标的二级分类 处理数据
|
|
|
+ childrenChartData() {
|
|
|
+ if (this.topTabsActive == 3 && this.secondActive != 0) {
|
|
|
+ let arr = [];
|
|
|
+ this.secondBars.forEach((item) => {
|
|
|
+ if (this.secondActive === item.ChartPermissionId) {
|
|
|
+ deepCopy(arr, item.List);
|
|
|
+ arr.unshift({
|
|
|
+ CtagId: 0,
|
|
|
+ Name: "全部",
|
|
|
+ });
|
|
|
+ this.chartChildren = arr;
|
|
|
+ }
|
|
|
});
|
|
|
- this.$store.dispatch("statistics", { PageType: "Summary", ChartPermissionId: Number(this.tabAct_id) });
|
|
|
+
|
|
|
+ this.chartChildrenActive = 0;
|
|
|
}
|
|
|
},
|
|
|
- scrollMove(e) {
|
|
|
- this.scrollLeft = e.detail.scrollLeft;
|
|
|
+ //点击图标的三级分类
|
|
|
+ handleChartChildren(item) {
|
|
|
+ this.chartChildrenActive = item.CtagId;
|
|
|
+ this.initData();
|
|
|
+ },
|
|
|
+ //点击
|
|
|
+ initData() {
|
|
|
+ this.pageNum = 1;
|
|
|
+ this.dataList = [];
|
|
|
+ uni.pageScrollTo({
|
|
|
+ scrollTop: 0,
|
|
|
+ duration: 0,
|
|
|
+ });
|
|
|
+ this.getReportList();
|
|
|
+ },
|
|
|
+ /* 获取tab分类 */
|
|
|
+ getTabs() {
|
|
|
+ this.secondBars = [];
|
|
|
+ this.topTabsActive == "2"
|
|
|
+ ? Home.Tab().then((res) => {
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ this.secondBars = res.Data.List;
|
|
|
+ this.secondActive = this.secondBars[0].ChartPermissionId;
|
|
|
+ this.getReportList();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ : Chart.getChartPatg().then((res) => {
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ let arr = res.Data;
|
|
|
+ arr.unshift({
|
|
|
+ ChartPermissionId: 0,
|
|
|
+ PermissionName: "我的收藏",
|
|
|
+ });
|
|
|
+ this.secondBars = arr;
|
|
|
+ this.secondActive = 0;
|
|
|
+ this.getReportList();
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
/* 获取列表 */
|
|
|
- getReportList() {
|
|
|
- Home.getList({
|
|
|
- PageSize: this.pageSize,
|
|
|
- CurrentIndex: this.pageNum,
|
|
|
- ChartPermissionId: Number(this.tabAct_id) || 0,
|
|
|
- }).then((res) => {
|
|
|
+ async getReportList() {
|
|
|
+ if (this.topTabsActive == "3" && this.secondActive == 0) {
|
|
|
+ const res = await Chart.getChartcollection({
|
|
|
+ PageSize: this.pageSize,
|
|
|
+ CurrentIndex: this.pageNum,
|
|
|
+ });
|
|
|
if (res.Ret === 200) {
|
|
|
- if (!res.Data.HaveResearch) {
|
|
|
- this.$util.modalShow("", "您暂无查看研选权限", "", () => {
|
|
|
- uni.reLaunch({
|
|
|
- url: "/pages/index/index",
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
this.status = this.pageNum < res.Data.Paging.Pages ? "loadmore" : "nomore";
|
|
|
- // this.totalPage = res.Data.Paging.Pages;//总页数
|
|
|
- if (res.Data.List && res.Data.List.length > 0) {
|
|
|
- res.Data.List.forEach((item) => {
|
|
|
- if (item.BodyHtml) {
|
|
|
- item.BodyHtml = item.BodyHtml.replace(/'\'/g, "");
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ this.isBindingMobile = res.Data.IsBindingMobile;
|
|
|
if (this.pageNum === 1) {
|
|
|
this.dataList = res.Data.List || [];
|
|
|
- this.haveData = this.dataList.length ? true : false;
|
|
|
+ this.haveData = this.dataList.length > 0 ? true : false;
|
|
|
} else {
|
|
|
this.dataList = this.dataList.concat(res.Data.List);
|
|
|
}
|
|
|
- if (this.refresh) {
|
|
|
- uni.stopPullDownRefresh();
|
|
|
- this.refresh = false;
|
|
|
- }
|
|
|
}
|
|
|
- });
|
|
|
- },
|
|
|
- /* 获取tab分类 */
|
|
|
- getTabs() {
|
|
|
- Home.Tab().then((res) => {
|
|
|
+ } else {
|
|
|
+ const res = await Home.getList({
|
|
|
+ PageSize: this.pageSize,
|
|
|
+ CurrentIndex: this.pageNum,
|
|
|
+ ChartPermissionId: this.secondActive,
|
|
|
+ CtagId: this.chartChildrenActive,
|
|
|
+ ListType: this.topTabsActive,
|
|
|
+ });
|
|
|
if (res.Ret === 200) {
|
|
|
- let arr = res.Data.List;
|
|
|
- arr.unshift({
|
|
|
- ChartPermissionId: 0,
|
|
|
- PermissionName: "最新",
|
|
|
+ this.processingData(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //处理数据
|
|
|
+ processingData(res) {
|
|
|
+ if (!res.Data.HaveResearch) {
|
|
|
+ this.$util.modalShow("", "您暂无查看研选权限", "", () => {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: "/pages/index/index",
|
|
|
});
|
|
|
- this.tabBars = arr;
|
|
|
- this.limitIsShow = this.tabBars.some((item) => item.IsShowSustainable);
|
|
|
- if (this.tabAct_id == 0) {
|
|
|
- this.getReportList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.status = this.pageNum < res.Data.Paging.Pages ? "loadmore" : "nomore";
|
|
|
+ res.Data.List &&
|
|
|
+ res.Data.List.forEach((item) => {
|
|
|
+ if (item.BodyHtml) {
|
|
|
+ item.BodyHtml = item.BodyHtml.replace(/'\'/g, "");
|
|
|
}
|
|
|
+ });
|
|
|
+ if (this.topTabsActive == "2") {
|
|
|
+ if (this.pageNum === 1) {
|
|
|
+ this.dataList = res.Data.List || [];
|
|
|
+ this.haveData = this.dataList.length ? true : false;
|
|
|
+ } else {
|
|
|
+ this.dataList = this.dataList.concat(res.Data.List);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.pageNum === 1) {
|
|
|
+ this.haveData = res.Data.List ? true : res.Data.ChartList ? true : false;
|
|
|
}
|
|
|
+ if (!res.Data.List) {
|
|
|
+ this.dataList = this.dataList.concat(res.Data.ChartList);
|
|
|
+ } else if (!res.Data.ChartList) {
|
|
|
+ this.dataList = this.dataList.concat(res.Data.List);
|
|
|
+ } else {
|
|
|
+ this.dataList.push(res.Data.List.shift());
|
|
|
+ let newArr = [];
|
|
|
+ let newArrTwo = [];
|
|
|
+ for (let i = 0; i < res.Data.List.length; i += 2) {
|
|
|
+ newArr.push(res.Data.List.slice(i, i + 2));
|
|
|
+ }
|
|
|
+ for (let i = 0; i < res.Data.ChartList.length; i += 2) {
|
|
|
+ newArrTwo.push(res.Data.ChartList.slice(i, i + 2));
|
|
|
+ }
|
|
|
+ let arr = [];
|
|
|
+ newArr.forEach((item, index) => {
|
|
|
+ if (newArrTwo[index]) {
|
|
|
+ arr.push(newArrTwo[index], item);
|
|
|
+ } else {
|
|
|
+ arr.push(item);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.dataList = this.dataList.concat(arr.flat(Infinity));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.refresh) {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ this.refresh = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //我的收藏的删除
|
|
|
+ myChartCollect(id) {
|
|
|
+ uni.showModal({
|
|
|
+ content: "确认要将该图表移除我的收藏吗?",
|
|
|
+ confirmColor: "#3385FF",
|
|
|
+ cancelColor: "#606266",
|
|
|
+ success: async (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ const res = await Chart.myChartCollect({
|
|
|
+ ChartId: id,
|
|
|
+ });
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ this.initData();
|
|
|
+ this.$util.toast("已取消收藏");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
});
|
|
|
},
|
|
|
+ //我的收藏 置顶
|
|
|
+ async myChartIsTop(id) {
|
|
|
+ const res = await Chart.myChartTop({
|
|
|
+ ChartId: id,
|
|
|
+ });
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ this.initData();
|
|
|
+ this.$util.toast(res.Msg);
|
|
|
+ }
|
|
|
+ },
|
|
|
/* 进入详情 校验是否有该品种权限 */
|
|
|
goDetail(item) {
|
|
|
- /* 无需授权且已绑定 检验是或否有权限 */
|
|
|
- this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId);
|
|
|
+ if (item.Source == 2) {
|
|
|
+ /* 无需授权且已绑定 检验是或否有权限 */
|
|
|
+ this.$store.dispatch("checkHandle", "/pageMy/chartPage/chartPage?id=" + item.ChartId);
|
|
|
+ } else {
|
|
|
+ /* 无需授权且已绑定 检验是或否有权限 */
|
|
|
+ this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId);
|
|
|
+ }
|
|
|
},
|
|
|
/* 搜索 */
|
|
|
goSearch() {
|
|
|
this.$store.dispatch("checkHandle", "/pageMy/search/search");
|
|
|
},
|
|
|
- adviceHandle() {
|
|
|
- this.$store.dispatch("checkHandle", "/pageMy/advice/advice");
|
|
|
+ /* 绝密标签的隐现 */
|
|
|
+ async reportIsShow() {
|
|
|
+ const res = await Reports.reportIsShow();
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ this.reportShow = res.Data.IsShow;
|
|
|
+ this.isShowChart = res.Data.IsShowChart;
|
|
|
+ this.isShowResearch = res.Data.IsShowResearch;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /* 绝密标签点击后的跳转 */
|
|
|
+ goSecretDetail(type) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/reportPages/secretDetails/secretDetails?type=" + type,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /* 绑定联系方式 */
|
|
|
+ bindingMobile() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pageMy/login/login",
|
|
|
+ });
|
|
|
},
|
|
|
- },
|
|
|
- onShow() {
|
|
|
- this.$store.dispatch("statistics", { PageType: "Activit" });
|
|
|
},
|
|
|
/* 下拉刷新 */
|
|
|
onPullDownRefresh: Throttle(function () {
|
|
|
- this.pageNum = 1;
|
|
|
+ this.status = "loadmore";
|
|
|
this.refresh = true;
|
|
|
+ this.dataList = [];
|
|
|
+ this.pageNum = 1;
|
|
|
this.getReportList();
|
|
|
}),
|
|
|
// 上拉加载
|
|
@@ -270,23 +479,16 @@ export default {
|
|
|
this.pageNum++;
|
|
|
this.getReportList();
|
|
|
}),
|
|
|
- /**
|
|
|
- * 用户点击分享
|
|
|
- */
|
|
|
+ /** 用户点击分享*/
|
|
|
onShareAppMessage: function (res) {
|
|
|
return {
|
|
|
- title: "您手边的弘则研究素材检索库",
|
|
|
- path: "/pages/index/index?tabid=" + this.tabAct_id,
|
|
|
- imageUrl: this.tabAct_id == 0 ? "https://hzstatic.hzinsights.com/cygx/czbk/home_share.png" : "",
|
|
|
+ title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : "您手边的弘则研究素材检索库",
|
|
|
+ path: "/pages/index/index?topTabsActive=" + this.topTabsActive,
|
|
|
+ imageUrl: this.topTabsActive == 1 ? "https://hzstatic.hzinsights.com/cygx/czbk/home_share.png" : "",
|
|
|
success: (res) => {},
|
|
|
fail: (err) => {},
|
|
|
};
|
|
|
},
|
|
|
- onHide() {
|
|
|
- if (this.showTransition) {
|
|
|
- this.showTransition = false;
|
|
|
- }
|
|
|
- },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -294,90 +496,127 @@ export default {
|
|
|
.Index-container {
|
|
|
background-color: #f7f7f7;
|
|
|
font-size: 30rpx;
|
|
|
- .index-fixed {
|
|
|
- width: 750rpx;
|
|
|
- position: fixed;
|
|
|
- left: 0;
|
|
|
+ .top-content-box {
|
|
|
+ position: sticky;
|
|
|
top: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
z-index: 999;
|
|
|
- .index-header {
|
|
|
- background-color: #fff;
|
|
|
- padding: 32rpx 34rpx;
|
|
|
+ }
|
|
|
+ .nav-bar-wrap {
|
|
|
+ background-color: #fff;
|
|
|
+ width: 100%;
|
|
|
+ .content {
|
|
|
position: relative;
|
|
|
- .sea_ipt_placeholder {
|
|
|
- color: #8d8d8d;
|
|
|
- opacity: 0.7;
|
|
|
- }
|
|
|
- .sea_ipt {
|
|
|
- width: 100%;
|
|
|
- height: 70rpx;
|
|
|
- font-size: 30rpx;
|
|
|
- color: #707070;
|
|
|
- background-color: #f6f6f6;
|
|
|
- padding: 0 34rpx 0 70rpx;
|
|
|
- border-radius: 70rpx;
|
|
|
- border: 1rpx solid #e5e5e5;
|
|
|
- }
|
|
|
- .search_ico {
|
|
|
- display: block;
|
|
|
+ height: 90%;
|
|
|
+ .search-icon {
|
|
|
+ text-align: center;
|
|
|
position: absolute;
|
|
|
- color: #8d8d8d;
|
|
|
- left: 60rpx;
|
|
|
- top: 50%;
|
|
|
- z-index: 100;
|
|
|
+ left: 34rpx;
|
|
|
+ top: 60%;
|
|
|
transform: translateY(-50%);
|
|
|
}
|
|
|
- }
|
|
|
- .tab-cont {
|
|
|
- padding: 0 26rpx;
|
|
|
- background-color: #fff;
|
|
|
- font-size: 32rpx;
|
|
|
- box-shadow: 0 3rpx 6rpx rgba(187, 216, 255, 0.2);
|
|
|
- .scroll-tab {
|
|
|
- position: relative;
|
|
|
- width: 100%;
|
|
|
- white-space: nowrap;
|
|
|
- }
|
|
|
- .limit-box {
|
|
|
+ .top-tabs {
|
|
|
+ width: 460rpx;
|
|
|
position: absolute;
|
|
|
- text-align: center;
|
|
|
- display: inline-block;
|
|
|
- padding-right: 50rpx;
|
|
|
- top: -9rpx;
|
|
|
- margin-left: -38rpx;
|
|
|
- image {
|
|
|
- width: 46rpx;
|
|
|
- height: 26rpx;
|
|
|
- }
|
|
|
- }
|
|
|
- .scroll-tab-item {
|
|
|
- // flex-grow: 1;
|
|
|
- text-align: center;
|
|
|
- display: inline-block;
|
|
|
- padding: 10rpx 8rpx 20rpx 8rpx;
|
|
|
- margin-right: 35rpx;
|
|
|
- border-bottom: 8rpx solid transparent;
|
|
|
- position: relative;
|
|
|
- &:last-child {
|
|
|
- margin-right: 0;
|
|
|
+ left: 55%;
|
|
|
+ top: 60%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 34rpx;
|
|
|
+ &::-webkit-scrollbar {
|
|
|
+ width: 0;
|
|
|
+ height: 0;
|
|
|
+ display: none;
|
|
|
}
|
|
|
- &.active {
|
|
|
- border-bottom: none;
|
|
|
- color: #2c83ff;
|
|
|
- font-weight: 700;
|
|
|
+ .item {
|
|
|
+ position: relative;
|
|
|
+ padding-bottom: 16rpx;
|
|
|
+ margin-right: 50rpx;
|
|
|
+ flex-shrink: 0;
|
|
|
+ .limit-img {
|
|
|
+ position: absolute;
|
|
|
+ top: -15rpx;
|
|
|
+ right: -50rpx;
|
|
|
+ }
|
|
|
+ .active {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ height: 4rpx;
|
|
|
+ width: 100%;
|
|
|
+ border-radius: 1rpx;
|
|
|
+ background: linear-gradient(90deg, #2e85ff 0%, #7eeaf6 100%);
|
|
|
+ }
|
|
|
}
|
|
|
- .border_act {
|
|
|
- width: 100%;
|
|
|
- height: 8rpx;
|
|
|
- position: absolute;
|
|
|
- bottom: 0;
|
|
|
- left: 0;
|
|
|
+ .tabs-active {
|
|
|
+ color: #3385ff;
|
|
|
+ font-weight: 500;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .tabs-content {
|
|
|
+ padding: 0 30rpx;
|
|
|
+ background-color: #fff;
|
|
|
+ .children-ul {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ .children-active {
|
|
|
+ background-color: #3385ff;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .chart-children {
|
|
|
+ padding: 10rpx 20rpx;
|
|
|
+ margin: 0rpx 20rpx 20rpx 0;
|
|
|
+ background-color: #f9f9f9;
|
|
|
+ color: #666666;
|
|
|
+ font-size: 26rpx;
|
|
|
+ border-radius: 4rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .second-tabs {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ overflow-x: auto;
|
|
|
+ background-color: #fff;
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: #999999;
|
|
|
+ padding: 20rpx 0;
|
|
|
+ &::-webkit-scrollbar {
|
|
|
+ width: 0;
|
|
|
+ height: 0;
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .item {
|
|
|
+ position: relative;
|
|
|
+ padding-bottom: 16rpx;
|
|
|
+ margin-right: 50rpx;
|
|
|
+ flex-shrink: 0;
|
|
|
+ .limit-img {
|
|
|
+ position: absolute;
|
|
|
+ top: -15rpx;
|
|
|
+ right: -50rpx;
|
|
|
+ }
|
|
|
+ .active {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ height: 4rpx;
|
|
|
+ width: 100%;
|
|
|
+ border-radius: 1rpx;
|
|
|
+ background: linear-gradient(90deg, #2e85ff 0%, #7eeaf6 100%);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .tabs-active {
|
|
|
+ color: #3385ff;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+ }
|
|
|
.data-cont {
|
|
|
- padding: 228rpx 20rpx 10rpx;
|
|
|
+ padding: 28rpx 20rpx 10rpx;
|
|
|
display: flex;
|
|
|
.report-ul {
|
|
|
width: 50%;
|
|
@@ -390,12 +629,28 @@ export default {
|
|
|
border-radius: 8rpx;
|
|
|
box-shadow: 0 3rpx 6rpx rgba($color: #000000, $alpha: 0.16);
|
|
|
background: #fff;
|
|
|
+ position: relative;
|
|
|
+ overflow: hidden;
|
|
|
+ .my-chart-collect {
|
|
|
+ content: "";
|
|
|
+ display: block;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 0;
|
|
|
+ height: 0;
|
|
|
+ border-top: 60rpx solid #3385ff;
|
|
|
+ border-right: 60rpx solid transparent;
|
|
|
+ }
|
|
|
.item-content-img {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
+ width: 330rpx;
|
|
|
+ margin-left: -6rpx;
|
|
|
+ margin-bottom: -20rpx;
|
|
|
image {
|
|
|
width: 100%;
|
|
|
- height: 232rpx;
|
|
|
+ height: 262rpx;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
}
|
|
@@ -431,6 +686,10 @@ export default {
|
|
|
color: #4a4a4a;
|
|
|
margin-bottom: 10rpx;
|
|
|
}
|
|
|
+ .chart-title {
|
|
|
+ height: 72rpx;
|
|
|
+ padding-bottom: 10rpx;
|
|
|
+ }
|
|
|
.item-abstract {
|
|
|
font-size: 26rpx;
|
|
|
color: #6a6a6a;
|
|
@@ -458,16 +717,47 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .chart-tag {
|
|
|
+ padding-top: 1rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ .tag-item {
|
|
|
+ width: 148rpx;
|
|
|
+ border-radius: 28rpx;
|
|
|
+ border: 2rpx solid rgba(49, 137, 255, 1);
|
|
|
+ overflow: hidden;
|
|
|
+ color: #3385ff;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 30rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .chart-collect {
|
|
|
+ margin-top: 20rpx;
|
|
|
+ padding-top: 20rpx;
|
|
|
+ padding: 20rpx 0 0 20rpx;
|
|
|
+ border-top: 1rpx solid #dcdfe6;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .cancel {
|
|
|
+ background: #3385ff;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+ .remove {
|
|
|
+ border: 1px solid #3385ff;
|
|
|
+ color: #3385ff;
|
|
|
+ }
|
|
|
+ text {
|
|
|
+ width: 130rpx;
|
|
|
+ height: 46rpx;
|
|
|
+ line-height: 46rpx;
|
|
|
+ border-radius: 4rpx;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 24rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .advice_ico {
|
|
|
- width: 81rpx;
|
|
|
- height: 81rpx;
|
|
|
- position: fixed;
|
|
|
- right: 30rpx;
|
|
|
- bottom: 214rpx;
|
|
|
- }
|
|
|
.content-intimate {
|
|
|
position: fixed;
|
|
|
display: flex;
|
|
@@ -501,17 +791,23 @@ export default {
|
|
|
z-index: 99;
|
|
|
}
|
|
|
}
|
|
|
- // .rich-text {
|
|
|
- // width: 315rpx;
|
|
|
- // height: 272rpx;
|
|
|
- // image {
|
|
|
- // width: 315rpx;
|
|
|
- // height: 272rpx;
|
|
|
- // }
|
|
|
- // img {
|
|
|
- // width: 315rpx;
|
|
|
- // height: 272rpx;
|
|
|
- // }
|
|
|
- // }
|
|
|
+ .tabs-img {
|
|
|
+ width: 46rpx;
|
|
|
+ height: 26rpx;
|
|
|
+ }
|
|
|
+ .nodata {
|
|
|
+ font-size: 40rpx;
|
|
|
+ .bind-mobile {
|
|
|
+ width: 244rpx;
|
|
|
+ height: 58rpx;
|
|
|
+ background: #3385ff;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ line-height: 58rpx;
|
|
|
+ text-align: center;
|
|
|
+ color: #fff;
|
|
|
+ margin: 50rpx auto;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|