|
@@ -8,14 +8,13 @@ import {
|
|
|
import { onActivated, onMounted, reactive, ref } from "vue"
|
|
|
import Search from "@/components/Search.vue"
|
|
|
import SelfList from '@/components/SelfList.vue'
|
|
|
-import { onBeforeRouteLeave } from "vue-router"
|
|
|
-import useHZRouter from '@/hooks/useHZRouter'
|
|
|
+import { onBeforeRouteLeave , useRouter } from "vue-router"
|
|
|
import { ElMessageBox } from 'element-plus'
|
|
|
import moment from 'moment'
|
|
|
import 'moment/dist/locale/zh-cn'
|
|
|
moment.locale('zh-cn')
|
|
|
|
|
|
-const HZRouter=useHZRouter()
|
|
|
+const router=useRouter()
|
|
|
|
|
|
// 向小程序发送数据
|
|
|
const handleDataToXcx=()=>{
|
|
@@ -38,7 +37,7 @@ const getLatestNews=async ()=>{
|
|
|
}
|
|
|
//点击最新资讯跳转报告详情
|
|
|
const handleClickNews=item=>{
|
|
|
- HZRouter.push({
|
|
|
+ router.push({
|
|
|
path:'/report/detail',
|
|
|
query:{
|
|
|
reportId:item.ReportId
|
|
@@ -172,21 +171,21 @@ getNewAnnounce()
|
|
|
|
|
|
//跳转至研报分类页
|
|
|
const handleGoMoreClassify = () => {
|
|
|
- HZRouter.push({ path:'/report/classify' });
|
|
|
+ router.push({ path:'/report/classify' });
|
|
|
};
|
|
|
|
|
|
//点击上新公告
|
|
|
const handleClickAnnounce=(data)=>{
|
|
|
//redirect_type 0活动 1专栏
|
|
|
if(data.redirect_type==0){
|
|
|
- HZRouter.push({
|
|
|
+ router.push({
|
|
|
path:'/activity/detail',
|
|
|
query:{
|
|
|
id:data.Activity.activityID
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
- HZRouter.push({
|
|
|
+ router.push({
|
|
|
path:'/report/specialcolumndetail',
|
|
|
query:{
|
|
|
columnId:data.ClassifyIdSecond
|
|
@@ -206,14 +205,14 @@ const formatAnnounceActivityTime=(start,end)=>{
|
|
|
//跳转报告详情
|
|
|
const handleGoReportDetail=(item)=>{
|
|
|
if(['晨报','周报'].includes(item.classify_name_first)){
|
|
|
- HZRouter.push({
|
|
|
+ router.push({
|
|
|
path:'/report/chapterdetail',
|
|
|
query:{
|
|
|
chapterId:item.report_chapter_id
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
- HZRouter.push({
|
|
|
+ router.push({
|
|
|
path:'/report/detail',
|
|
|
query:{
|
|
|
reportId:item.report_id
|
|
@@ -254,7 +253,7 @@ onActivated(()=>{
|
|
|
style="margin-top: 10px;"
|
|
|
placeholder="请输入标题/关键词"
|
|
|
:disabled="true"
|
|
|
- @click="HZRouter.push({path:'/report/search'})"
|
|
|
+ @click="$router.push({path:'/report/search'})"
|
|
|
></Search>
|
|
|
</teleport>
|
|
|
</template>
|