소스 검색

Merge branch 'yh238' into debug

ldong 7 달 전
부모
커밋
bffb2174b4
2개의 변경된 파일39개의 추가작업 그리고 1개의 파일을 삭제
  1. 19 0
      src/views/report/ChapterDetail.vue
  2. 20 1
      src/views/report/Detail.vue

+ 19 - 0
src/views/report/ChapterDetail.vue

@@ -222,6 +222,25 @@ const getChapterReportDetail=async ()=>{
 }
 getChapterReportDetail()
 
+const isLogin=()=>{
+    if(store.state.userInfo.is_bind===0){
+        ElMessageBox({
+            title:`温馨提示`,
+            message:'为了优化您的用户体验,<br>请登录后查看更多信息!',
+            dangerouslyUseHTMLString: true,
+            center: true,
+            confirmButtonText:'去登录',
+            confirmButtonClass:'self-elmessage-confirm-btn',
+            showCancelButton:true,
+            cancelButtonText:'取消',
+            cancelButtonClass:'self-elmessage-cancel-btn'
+        }).then(res=>{
+            wx.miniProgram.reLaunch({url:'/pages/login'})
+        }).catch(()=>{})
+    }
+}
+isLogin()
+
 // 侧边栏更多推荐
 let moreRecmdList=ref([])
 const getAsideMoreRecmd=async (data)=>{

+ 20 - 1
src/views/report/Detail.vue

@@ -75,7 +75,7 @@ const getReportDetail=async ()=>{
         report_id:Number(reportId.value)
     })
     if(res.code===200){
-        info.value=res.data 
+        info.value=res.data
 
         headImgStyle.value=res.data.report_info.head_style?JSON.parse(res.data.report_info.head_style):[]
         endImgStyle.value=res.data.report_info.end_style?JSON.parse(res.data.report_info.end_style):[]
@@ -170,6 +170,25 @@ const getReportDetail=async ()=>{
 }
 getReportDetail()
 
+const isLogin=()=>{
+    if(store.state.userInfo.is_bind===0){
+        ElMessageBox({
+            title:`温馨提示`,
+            message:'为了优化您的用户体验,<br>请登录后查看更多信息!',
+            dangerouslyUseHTMLString: true,
+            center: true,
+            confirmButtonText:'去登录',
+            confirmButtonClass:'self-elmessage-confirm-btn',
+            showCancelButton:true,
+            cancelButtonText:'取消',
+            cancelButtonClass:'self-elmessage-cancel-btn'
+        }).then(res=>{
+            wx.miniProgram.reLaunch({url:'/pages/login'})
+        }).catch(()=>{})
+    }
+}
+isLogin()
+
 // 侧边栏更多推荐
 let moreRecmdList=ref([])
 const getAsideMoreRecmd=async (data)=>{