bding 7 місяців тому
батько
коміт
8c44723650

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

@@ -373,6 +373,22 @@ const bannerDataList =ref([])
 
 /* 点击了banner */
 const bannerClickHandler = async (item) => {
+  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(()=>{})
+        return
+  }
   let source = sessionStorage.getItem('platformSource')
   const res = await apiPublicBannerMark({
     first_source: source == 'xcx' ? 2 : 3, //一级来源 1小程序移动 2小程序pc 3研报官网

+ 16 - 0
src/views/report/Detail.vue

@@ -430,6 +430,22 @@ const bannerDataList =ref([])
 
 /* 点击了banner */
 const bannerClickHandler = async (item) => {
+ 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(()=>{})
+        return
+  }
   let source = sessionStorage.getItem('platformSource')
   const res = await apiPublicBannerMark({
     first_source: source == 'xcx' ? 2 : 3, //一级来源 1小程序移动 2小程序pc 3研报官网

+ 20 - 0
src/views/report/Index.vue

@@ -16,6 +16,8 @@ import moment from 'moment'
 import 'moment/dist/locale/zh-cn'
 moment.locale('zh-cn')
 
+import { useStore } from 'vuex'
+
 const router=useRouter()
 // 实现头部的适配
 const contentRef=ref('')
@@ -23,6 +25,8 @@ const headerRef=ref('')
 let contentWidth=ref('')
 let headerHight=ref('')
 
+const store=useStore()
+
 // 向小程序发送数据
 const handleDataToXcx=()=>{
   const postData={
@@ -252,6 +256,22 @@ const bannerDataList =ref([])
 
 /* 点击了banner */
 const bannerClickHandler = async (item) => {
+   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(()=>{})
+        return
+    }
    if(item.id==9999){
     router.push({
         path:'/report/surveyHistory',