jwyu 3 년 전
부모
커밋
46d5342442
4개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      src/components/Comment.vue
  2. 1 0
      src/components/LoginPop.vue
  3. 3 1
      src/utils/interceptRouterMethod.js
  4. 2 1
      src/views/report/ChapterDetail.vue

+ 1 - 1
src/components/Comment.vue

@@ -24,7 +24,7 @@ const props=defineProps({
 const msgState = reactive({
 const msgState = reactive({
     show:false,//是否显示评论输入框
     show:false,//是否显示评论输入框
     msg:'',
     msg:'',
-    hasNickName:store.state.userInfo.nick_name?true:false,//false 匿名
+    hasNickName:store.state.userInfo&&store.state.userInfo.nick_name?true:false,//false 匿名
     like_num:props.data.like_num,
     like_num:props.data.like_num,
     like_enabled:props.data.like_enabled
     like_enabled:props.data.like_enabled
 })
 })

+ 1 - 0
src/components/LoginPop.vue

@@ -400,6 +400,7 @@ onMounted(()=>{
         input{
         input{
             border: none;
             border: none;
             outline: none;
             outline: none;
+            width: 67%;
         }
         }
         .input-item{
         .input-item{
             margin-bottom: 20px;
             margin-bottom: 20px;

+ 3 - 1
src/utils/interceptRouterMethod.js

@@ -47,7 +47,9 @@ router.push = function push(location) {
     }else{
     }else{
         console.log('拦截路由push改为返回');
         console.log('拦截路由push改为返回');
         const _index=index-(store.state.breadCrumbList.length-1)
         const _index=index-(store.state.breadCrumbList.length-1)
-        router.go(_index)
+        if(_index!==0){
+            router.go(_index)
+        }
         setTimeout(() => {
         setTimeout(() => {
             if(query){
             if(query){
                 router.replace({
                 router.replace({

+ 2 - 1
src/views/report/ChapterDetail.vue

@@ -79,6 +79,7 @@ const getTickerValue=async ()=>{
 let info=ref(null)
 let info=ref(null)
 let audioData=ref(null)
 let audioData=ref(null)
 const getChapterReportDetail=async ()=>{
 const getChapterReportDetail=async ()=>{
+    console.log(chapterId.value);
     const res=await apiChapterDetail({
     const res=await apiChapterDetail({
         report_chapter_id:Number(chapterId.value)
         report_chapter_id:Number(chapterId.value)
     })
     })
@@ -226,7 +227,7 @@ onMounted(()=>{
 
 
 onBeforeRouteUpdate((to,from)=>{
 onBeforeRouteUpdate((to,from)=>{
     console.log(to.query);
     console.log(to.query);
-    chapterId.value=to.chapterId
+    chapterId.value=to.query.chapterId
     getChapterReportDetail()
     getChapterReportDetail()
     getQRCodeImg()
     getQRCodeImg()
 })
 })