jwyu 2 lat temu
rodzic
commit
88c97a1d02

+ 6 - 7
src/views/activity/Detail.vue

@@ -1,11 +1,10 @@
 <script setup>
 import { computed, reactive, ref,onMounted } from "vue";
-import { useRoute } from "vue-router";
+import { useRoute,useRouter } from "vue-router";
 import { formatActivityTime } from "./utils";
 import { ElMessage } from 'element-plus'
-import useHZRouter from '@/hooks/useHZRouter'
 
-const HZRouter=useHZRouter()
+const router=useRouter()
 
 const route = useRoute();
 
@@ -128,7 +127,7 @@ const formatAudioTime=(e)=>{
 const goDetail=()=>{
     let params=info.value.reportLink.split('?')[1]
     let research_report_id=params.split('=')[1]
-    HZRouter.push({
+    router.push({
         path:'/activity/reportdetail',
         query:{
             research_report_id:research_report_id
@@ -165,10 +164,10 @@ const handlePlayAudio=(index)=>{
 const goBack=()=>{
     if(window.history.state.back){
         console.log('返回上一页');
-        HZRouter.go(-1)
+        router.go(-1)
     }else{
         console.log('返回首页');
-        HZRouter.push({path:'/report/index'})
+        router.push({path:'/report/index'})
     }
 }
 
@@ -190,7 +189,7 @@ const handleApply=()=>{
         }else{
             if(!noAuth.data.customer_info.status||noAuth.data.customer_info.status!='流失'){
                 console.log('跳转申请页');
-                HZRouter.push({
+                router.push({
                     path:'/apply/permission',
                     query:{
                         source:2,

+ 2 - 3
src/views/activity/List.vue

@@ -2,10 +2,9 @@
 import {reactive,ref, watch,onUnmounted,onMounted,onUpdated,onActivated} from 'vue'
 import SelfList from '@/components/SelfList.vue'
 import { useRouter } from "vue-router";
-import useHZRouter from '@/hooks/useHZRouter'
 import {formatActivityTime} from './utils'
 
-const HZRouter=useHZRouter()
+const router=useRouter()
 
 import {apiActivityList} from '@/api/activity.js'
 let listData=reactive({
@@ -87,7 +86,7 @@ const onLoad=()=>{
 
 // 跳转详情
 const goDetail=(id)=>{
-    HZRouter.push({
+    router.push({
         path:'/activity/detail',
         query:{
             id:id

+ 3 - 4
src/views/activity/ReportDetail.vue

@@ -1,11 +1,10 @@
 <script setup>
 import moment from 'moment'
 import {ref,onMounted} from 'vue'
-import { useRoute } from 'vue-router'
+import { useRoute ,useRouter} from 'vue-router'
 import { useStore } from 'vuex';
-import useHZRouter from '@/hooks/useHZRouter'
 const route=useRoute()
-const HZRouter=useHZRouter()
+const router=useRouter()
 const store=useStore()
 moment.locale('zh-cn')
 
@@ -60,7 +59,7 @@ onMounted(()=>{
 
 // 跳转章节详情
 const goChapterDetail=(item)=>{
-    HZRouter.push({
+    router.push({
         path:'/activity/chapterdetail',
         query:{
             research_report_type_id:item.ResearchReportTypeId,

+ 2 - 3
src/views/activity/applyAuth.js

@@ -7,8 +7,7 @@
  */
 import {apiApplyPermission} from '@/api/user'
 import { ElMessage,ElMessageBox } from 'element-plus'
-import useHZRouter from '@/hooks/useHZRouter'
-const HZRouter=useHZRouter()
+import router from '@/router'
 export const applyAuth=(res,type,source,fromPage)=>{
     if(res.code===200){
         const htmlStr=`<h4 style="text-align:center;margin-bottom:5px;font-size:16px;margin-top:0">设置成功</h4>
@@ -101,7 +100,7 @@ export const applyAuth=(res,type,source,fromPage)=>{
                 }else{
                     if(!res.data.customer_info.status||res.data.customer_info.status!='流失'){
                         console.log('跳转申请页');
-                        HZRouter.push({
+                        router.push({
                             path:'/apply/permission',
                             query:{
                                 source:2,