|
@@ -1,6 +1,12 @@
|
|
|
<script setup>
|
|
|
-import { apiReportIndexPageAuthList, apiReportIndexPageList,apiReportIndexNewbanner,apiReportIndexNew } from '@/api/report'
|
|
|
-import { onMounted, reactive, ref } from "vue"
|
|
|
+import {
|
|
|
+ apiReportIndexPageAuthList,
|
|
|
+ apiReportIndexPageList,
|
|
|
+ apiReportIndexNewbanner,
|
|
|
+ apiReportIndexNew,
|
|
|
+ apiLatestNews
|
|
|
+} from '@/api/report'
|
|
|
+import { onActivated, onMounted, reactive, ref } from "vue"
|
|
|
import Search from "@/components/Search.vue"
|
|
|
import SelfList from '@/components/SelfList.vue'
|
|
|
import { useRouter } from "vue-router"
|
|
@@ -11,6 +17,16 @@ moment.locale('zh-cn')
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
|
+// 向小程序发送数据
|
|
|
+const handleDataToXcx=()=>{
|
|
|
+ const postData={
|
|
|
+ path:'/pages/report/report',
|
|
|
+ params:{},
|
|
|
+ title:'FICC研报',
|
|
|
+ shareImg:''
|
|
|
+ }
|
|
|
+ wx.miniProgram.postMessage({ data: postData })
|
|
|
+}
|
|
|
|
|
|
// 获取顶部权限分类数据
|
|
|
let authData=reactive({
|
|
@@ -124,7 +140,6 @@ const onLoad=()=>{
|
|
|
getReportList()
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// 获取上新公告
|
|
|
const getNewAnnounce=async ()=>{
|
|
|
const res1=await apiReportIndexNewbanner()
|
|
@@ -134,6 +149,16 @@ const getNewAnnounce=async ()=>{
|
|
|
}
|
|
|
getNewAnnounce()
|
|
|
|
|
|
+// 获取最新资讯
|
|
|
+let LatestNewsList=ref([])
|
|
|
+const getLatestNews=async ()=>{
|
|
|
+ const res=await apiLatestNews()
|
|
|
+ if(res.code===200){
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+getLatestNews()
|
|
|
+
|
|
|
//跳转至研报分类页
|
|
|
const handleGoMoreClassify = () => {
|
|
|
router.push({ path:'/report/classify' });
|
|
@@ -162,6 +187,7 @@ const handleGoReportDetail=(item)=>{
|
|
|
let isMounted = ref(false);
|
|
|
onMounted(() => {
|
|
|
isMounted.value = true;
|
|
|
+ handleDataToXcx()
|
|
|
});
|
|
|
|
|
|
// 格式化列表日期
|
|
@@ -174,6 +200,11 @@ const formatDate=(e)=>{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+//组件激活时
|
|
|
+onActivated(()=>{
|
|
|
+ handleDataToXcx()
|
|
|
+})
|
|
|
+
|
|
|
</script>
|
|
|
<template>
|
|
|
<!-- 搜索 -->
|