|
@@ -3,7 +3,6 @@ import {
|
|
|
apiReportIndexPageAuthList,
|
|
|
apiReportIndexPageList,
|
|
|
apiReportIndexNewbanner,
|
|
|
- apiReportIndexNew,
|
|
|
apiLatestNews
|
|
|
} from '@/api/report'
|
|
|
import { onActivated, onMounted, reactive, ref } from "vue"
|
|
@@ -28,6 +27,15 @@ const handleDataToXcx=()=>{
|
|
|
wx.miniProgram.postMessage({ data: postData })
|
|
|
}
|
|
|
|
|
|
+// 获取最新资讯
|
|
|
+let latestNewsList=ref([])
|
|
|
+const getLatestNews=async ()=>{
|
|
|
+ const res=await apiLatestNews({chart_permission_id:Number(selectSubType.value)})
|
|
|
+ if(res.code===200){
|
|
|
+ latestNewsList.value=res.data||[]
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// 获取顶部权限分类数据
|
|
|
let authData=reactive({
|
|
|
isBuy:false,
|
|
@@ -115,6 +123,7 @@ const clickSubType = (item) => {
|
|
|
reportState.finished = false
|
|
|
getReportList()
|
|
|
handleShowAuthData(item)
|
|
|
+ getLatestNews()
|
|
|
}
|
|
|
|
|
|
// 判断是否要为已购用户且点击的品种没有权限
|
|
@@ -141,29 +150,48 @@ const onLoad=()=>{
|
|
|
}
|
|
|
|
|
|
// 获取上新公告
|
|
|
+let newAnnounce=ref(null)
|
|
|
const getNewAnnounce=async ()=>{
|
|
|
- const res1=await apiReportIndexNewbanner()
|
|
|
- if(res1.code===200){
|
|
|
- const res2=await apiReportIndexNew({ClassifyId:res1.data.ClassifyId})
|
|
|
- }
|
|
|
-}
|
|
|
-getNewAnnounce()
|
|
|
-
|
|
|
-// 获取最新资讯
|
|
|
-let LatestNewsList=ref([])
|
|
|
-const getLatestNews=async ()=>{
|
|
|
- const res=await apiLatestNews()
|
|
|
+ const res=await apiReportIndexNewbanner()
|
|
|
if(res.code===200){
|
|
|
-
|
|
|
+ newAnnounce.value=res.data
|
|
|
}
|
|
|
}
|
|
|
-getLatestNews()
|
|
|
+getNewAnnounce()
|
|
|
|
|
|
//跳转至研报分类页
|
|
|
const handleGoMoreClassify = () => {
|
|
|
router.push({ path:'/report/classify' });
|
|
|
};
|
|
|
|
|
|
+//点击上新公告
|
|
|
+const handleClickAnnounce=(data)=>{
|
|
|
+ //redirect_type 0活动 1专栏
|
|
|
+ if(data.redirect_type==0){
|
|
|
+ router.push({
|
|
|
+ path:'/activity/detail',
|
|
|
+ query:{
|
|
|
+ id:data.Activity.activityID
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ router.push({
|
|
|
+ path:'/report/specialcolumndetail',
|
|
|
+ query:{
|
|
|
+ columnId:data.ReportId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//格式化上新公告中的活动时间
|
|
|
+const formatAnnounceActivityTime=(start,end)=>{
|
|
|
+ const day = moment(start).format('YYYY-MM-DD');
|
|
|
+ const startTime = moment(start).format('HH:mm');
|
|
|
+ const endTime = moment(end).format('HH:mm');
|
|
|
+ return `${day} ${startTime}-${endTime}`
|
|
|
+}
|
|
|
+
|
|
|
//跳转报告详情
|
|
|
const handleGoReportDetail=(item)=>{
|
|
|
if(['晨报','周报'].includes(item.classify_name_first)){
|
|
@@ -273,22 +301,26 @@ onActivated(()=>{
|
|
|
<div class="fix-top" style="z-index: 100;">
|
|
|
<div class="recmd-box">
|
|
|
<div class="label">最新资讯</div>
|
|
|
- <div class="recmd-item">
|
|
|
- <div class="title">股债日评</div>
|
|
|
- <div>178 | 关注中美领导交流</div>
|
|
|
- </div>
|
|
|
- <div class="recmd-item">
|
|
|
- <div class="title">股债日评</div>
|
|
|
- <div>178 | 关注中美领导交流</div>
|
|
|
+ <div
|
|
|
+ class="recmd-item"
|
|
|
+ v-for="item in latestNewsList"
|
|
|
+ :key="item.report_id"
|
|
|
+ @click="handleGoReportDetail(item)"
|
|
|
+ >
|
|
|
+ <div class="title">{{item.classify_name_second}}</div>
|
|
|
+ <div>{{item.stage}} | {{item.title}}</div>
|
|
|
</div>
|
|
|
- <div class="recmd-item">
|
|
|
- <div class="title">股债日评</div>
|
|
|
- <div>178 | 关注中美领导交流</div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
<div class="hot-box" style="margin-top: 60px;">
|
|
|
<div class="label">上新公告</div>
|
|
|
- <div class="img-con"></div>
|
|
|
+ <div class="img-con" :style="'background-image:url('+newAnnounce.ImgUrl+')'" v-if="newAnnounce">
|
|
|
+ <!-- 活动的话要手搓文字上去 -->
|
|
|
+ <div class="activity-con" v-if="newAnnounce.redirect_type==0" @click="handleClickAnnounce(newAnnounce)">
|
|
|
+ <div class="multi-ellipsis title">{{newAnnounce.Activity.activityTypeName}}</div>
|
|
|
+ <div class="user-name">主讲人: {{newAnnounce.Activity.speaker}}</div>
|
|
|
+ <div class="time">{{formatAnnounceActivityTime(newAnnounce.Activity.startTime,newAnnounce.Activity.endTime)}}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -303,8 +335,6 @@ onActivated(()=>{
|
|
|
.el-backtop{
|
|
|
z-index: 1000;
|
|
|
}
|
|
|
-$bg-color: #f6f6f6;
|
|
|
-$active-color: #f3a52f;
|
|
|
|
|
|
.report-index-page {
|
|
|
position: relative;
|
|
@@ -318,9 +348,11 @@ $active-color: #f3a52f;
|
|
|
padding-bottom: 12px;
|
|
|
width: 100%;
|
|
|
.first-nav {
|
|
|
- max-width: 1240px;
|
|
|
- @media (max-width:1200px) {
|
|
|
- max-width: 55vw;
|
|
|
+ width: calc(100vw - 500px);
|
|
|
+ overflow-x: auto;
|
|
|
+ overflow-y: hidden;
|
|
|
+ &::-webkit-scrollbar{
|
|
|
+ height: 5px;
|
|
|
}
|
|
|
.item {
|
|
|
width: 140px;
|
|
@@ -333,14 +365,6 @@ $active-color: #f3a52f;
|
|
|
font-size: 16px;
|
|
|
margin-right: 30px;
|
|
|
cursor: pointer;
|
|
|
- @media (max-width:1200px) {
|
|
|
- width: 80px;
|
|
|
- font-size: 14px;
|
|
|
- height: 30px;
|
|
|
- line-height: 30px;
|
|
|
- margin-right: 15px;
|
|
|
- }
|
|
|
-
|
|
|
&:hover {
|
|
|
background: #FFFBF5;
|
|
|
color: #F3A52F;
|
|
@@ -390,33 +414,19 @@ $active-color: #f3a52f;
|
|
|
|
|
|
.sub-nav {
|
|
|
margin-top: 30px;
|
|
|
- overflow-x: scroll;
|
|
|
-
|
|
|
+ overflow-x: auto;
|
|
|
+ overflow-y: hidden;
|
|
|
&::-webkit-scrollbar {
|
|
|
- display: none;
|
|
|
- }
|
|
|
- max-width: 1240px;
|
|
|
- @media (max-width:1200px) {
|
|
|
- max-width: 50vw;
|
|
|
- &::-webkit-scrollbar {
|
|
|
- display: block;
|
|
|
- width: 0px;
|
|
|
- height: 5px;
|
|
|
- }
|
|
|
+ height: 5px;
|
|
|
}
|
|
|
-
|
|
|
+ width: calc(100vw - 500px);
|
|
|
.sub-item {
|
|
|
flex-shrink: 0;
|
|
|
margin-right: 30px;
|
|
|
font-size: 16px;
|
|
|
color: #666666;
|
|
|
cursor: pointer;
|
|
|
- @media (max-width:1200px){
|
|
|
- font-size: 14px;
|
|
|
- margin-right: 15px;
|
|
|
- }
|
|
|
}
|
|
|
-
|
|
|
.sub-active {
|
|
|
color: #F3A52F;
|
|
|
}
|
|
@@ -441,7 +451,7 @@ $active-color: #f3a52f;
|
|
|
.all-btn {
|
|
|
position: absolute;
|
|
|
right: 20px;
|
|
|
- bottom: 20px;
|
|
|
+ bottom: 10px;
|
|
|
width: 88px;
|
|
|
height: 30px;
|
|
|
line-height: 30px;
|
|
@@ -530,5 +540,24 @@ $active-color: #f3a52f;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ .right-aside-box{
|
|
|
+ .activity-con{
|
|
|
+ padding: 17px 10px;
|
|
|
+ .title{
|
|
|
+ color: #fff;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ .user-name{
|
|
|
+ margin: 5px 0;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ .time{
|
|
|
+ font-size: 12px;
|
|
|
+ color: #F3A52F;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|