Browse Source

Merge branch 'yb11.1'

yujinwen 1 week ago
parent
commit
68a13d8908
7 changed files with 198 additions and 117 deletions
  1. 1 0
      manifest.json
  2. 64 0
      pages-report/raiReportDetail.vue
  3. 11 4
      pages-report/reportList.vue
  4. 4 0
      pages-report/search.vue
  5. 113 113
      pages.json
  6. 1 0
      pages/pc.vue
  7. 4 0
      pages/report/report.vue

+ 1 - 0
manifest.json

@@ -5,6 +5,7 @@
     "versionName" : "1.0.0",
     "versionCode" : "100",
     "transformPx" : false,
+    "sassImplementationName": "node-sass",
     /* 5+App特有相关 */
     "app-plus" : {
         "usingComponents" : true,

+ 64 - 0
pages-report/raiReportDetail.vue

@@ -0,0 +1,64 @@
+<template>
+  <web-view v-if="url" :src="url" @message="handleGetMessage"></web-view>
+</template>
+
+<script>
+import { h5BaseUrl } from '@/utils/config'
+import { apiGetSceneToParams } from '@/api/common'
+export default {
+  data() {
+    return {
+      url: '',
+      msgObj: {},
+      options: {}
+    }
+  },
+  onLoad(options) {
+    this.options = options
+    wx.setVisualEffectOnCapture({ visualEffect: 'hidden' })
+  },
+  onShow() {
+    this.init(this.options)
+  },
+  onUnload() {
+    wx.setVisualEffectOnCapture({ visualEffect: 'none' })
+  },
+  onShareAppMessage() {
+    return {
+      title: this.msgObj.title,
+      path: `/pages-report/raiReportDetail?reportId=${this.msgObj.reportId}`,
+      imageUrl: this.msgObj.shareImg || ''
+    }
+  },
+  methods: {
+    async init(options) {
+      console.log('options', options);
+      this.url = ''
+      if (options.scene) {
+        const res = await apiGetSceneToParams({ scene_key: options.scene })
+        if (res.code == 200) {
+          console.log(res);
+          const obj = JSON.parse(res.data)
+          console.log(obj);
+          options.reportId = obj.reportId
+          console.log(options);
+        }
+      }
+
+      let reportId = options.reportId
+      const timestamp = new Date().getTime()
+      const token = this.$store.state.user.token
+      setTimeout(() => {
+        this.url = `${h5BaseUrl}/hzyb/report/raiDetail?reportId=${reportId}&userId=${this.userInfo.user_id}&fromPage=${options.fromPage || ''}&token=${token}&timestamp=${timestamp}#wechat_redirect`
+      }, 100)
+    },
+
+    handleGetMessage(e) {
+      const data = e.detail.data[e.detail.data.length - 1]
+      console.log('h5传来的数据', data);
+      this.msgObj = data
+    }
+  }
+
+}
+</script>

+ 11 - 4
pages-report/reportList.vue

@@ -43,9 +43,11 @@
           <view class="info">
             <view v-html="item.classify_name_third?item.classify_name_third:item.classify_name_second" style="display:inline-block"></view>
             <text v-if="item.classify_name_third||item.classify_name_second" style="display:inline-block;margin:0 10rpx">&nbsp;·&nbsp;</text>
-            <text>{{item.stage}}期 | {{item.publish_time|formatReportTime}}</text>
+            <text v-if="item.rai_report_id>0">{{item.publish_time|formatReportTime}}</text>
+            <text v-else>{{item.stage}}期 | {{item.publish_time|formatReportTime}}</text>
           </view>
-          <view class="audio-box" v-if="item.auth_ok" @click.stop="handleClickAudio(item)">
+          <!-- 权益研报没有音频播放 -->
+          <view class="audio-box" v-if="item.auth_ok&&item.rai_report_id===0" @click.stop="handleClickAudio(item)">
             <image :src="curAudioReportId==item.report_id&&!curAudioPaused?'./static/a-play.png':'./static/a-pause.png'" mode="aspectFill"/>
           </view>
         </view>
@@ -123,14 +125,14 @@ export default {
         obj.img_1=this.list[0].report_img_url
         obj.title_1=this.list[0].title 
         obj.abstract_1=this.list[0].classify_name_second
-        obj.time_1=`${this.list[0].stage}期 | ${dayjs(this.list[0].publish_time).format('YYYY.MM.DD')}`
+        obj.time_1=this.list[0].rai_report_id===0? `${this.list[0].stage}期 | ${dayjs(this.list[0].publish_time).format('YYYY.MM.DD')}`:`${dayjs(this.list[0].publish_time).format('YYYY.MM.DD')}`
         obj.abstract_1_style=this.list[0].classify_name_second?'':'display:none'
       }
       if(this.list[1]){
         obj.img_2=this.list[1].report_img_url
         obj.title_2=this.list[1].title 
         obj.abstract_2=this.list[1].classify_name_second
-        obj.time_2=`${this.list[1].stage}期 | ${dayjs(this.list[1].publish_time).format('YYYY.MM.DD')}`
+        obj.time_2=this.list[1].rai_report_id===0?`${this.list[1].stage}期 | ${dayjs(this.list[1].publish_time).format('YYYY.MM.DD')}`:`${dayjs(this.list[1].publish_time).format('YYYY.MM.DD')}`
         obj.abstract_2_style=this.list[1].classify_name_second?'':'display:none'
       }
       return obj
@@ -282,6 +284,11 @@ export default {
     },
 
     goReportDetail(item){
+      // 权益研报
+      if(item.rai_report_id>0){
+        uni.navigateTo({ url: '/pages-report/raiReportDetail?reportId='+item.report_id })
+        return
+      }
       // if(['晨报','周报'].includes(item.classify_name_first)){
       if(item.has_chapter&&item.report_detail_show_type===2){
         uni.navigateTo({ url: '/pages-report/chapterList?reportId='+item.report_id })

+ 4 - 0
pages-report/search.vue

@@ -85,6 +85,10 @@ export default {
         },
 
         goReportDetail(item){
+            if(item.rai_report_id>0){
+                uni.navigateTo({url:'/pages-report/raiReportDetail?reportId='+item.report_id})
+                return
+            }
             if(['晨报','周报'].includes(item.classify_name_first)){
                 uni.navigateTo({url: `/pages-report/chapterDetail?chapterId=${item.report_chapter_id}&fromPage=search`})
             }else{

+ 113 - 113
pages.json

@@ -43,21 +43,21 @@
 			}
 		},
 		{
-			"path":"pages/login",
-			"style":{
-				"navigationBarTitleText":"绑定联系方式"
+			"path": "pages/login",
+			"style": {
+				"navigationBarTitleText": "绑定联系方式"
 			}
 		},
 		{
 			"path": "pages/pc",
-			"style":{
+			"style": {
 				"navigationBarTitleText": ""
 			}
 		},
 		{
 			"path": "pages/pricedriven/pricedriven",
-			"style":{
-				"navigationBarTitleText":"价格驱动"
+			"style": {
+				"navigationBarTitleText": "价格驱动"
 			}
 		},
 		{
@@ -74,69 +74,69 @@
 			}
 		},
 		{
-			"path":"pages/voice/voice",
+			"path": "pages/voice/voice",
 			"style": {
 				"navigationBarTitleText": "语音播报",
 				"enablePullDownRefresh": true
 			}
 		},
 		{
-			"path":"pages/roadShow/video/list",
+			"path": "pages/roadShow/video/list",
 			"style": {
 				"navigationBarTitleText": "线上路演",
 				"enablePullDownRefresh": true
 			}
 		},
 		{
-			"path":"pages/myChart/index",
+			"path": "pages/myChart/index",
 			"style": {
 				"navigationBarTitleText": "我的图库",
 				"enablePullDownRefresh": true
 			}
 		},
 		{
-			"path":"pages/positionAnalysis/index",
+			"path": "pages/positionAnalysis/index",
 			"style": {
 				"navigationBarTitleText": "持仓分析",
 				"enablePullDownRefresh": true
 			}
 		},
 		{
-			"path":"pages/positionAnalysis/detail",
+			"path": "pages/positionAnalysis/detail",
 			"style": {
 				"navigationBarTitleText": "持仓分析"
 			}
 		},
 		{
-			"path":"pages/transitionPage"
+			"path": "pages/transitionPage"
 		},
 		{
-			"path":"pages/forexCalendar/index",
-			"style":{
-				"navigationBarTitleText":"事件日历"
+			"path": "pages/forexCalendar/index",
+			"style": {
+				"navigationBarTitleText": "事件日历"
 			}
 		}
 	],
-	"subPackages":[
+	"subPackages": [
 		// 活动模块
 		{
-			"root":"pages-activity",
-			"pages":[
+			"root": "pages-activity",
+			"pages": [
 				{
-					"path":"detail",
-					"style":{
-						"navigationBarTitleText":"活动详情"
+					"path": "detail",
+					"style": {
+						"navigationBarTitleText": "活动详情"
 					}
 				},
 				{
-					"path":"noAuthority",
-					"style":{
-						"navigationBarTitleText":"活动详情"
+					"path": "noAuthority",
+					"style": {
+						"navigationBarTitleText": "活动详情"
 					}
 				},
 				{
 					"path": "reportDetail",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "报告详情"
 					}
 				}
@@ -144,24 +144,24 @@
 		},
 		// 申请权限模块
 		{
-			"root":"pages-applyPermission",
+			"root": "pages-applyPermission",
 			"pages": [
 				{
-					"path":"applyPermission",
-					"style":{
-						"navigationBarTitleText":"申请试用"
+					"path": "applyPermission",
+					"style": {
+						"navigationBarTitleText": "申请试用"
 					}
 				},
 				{
-					"path":"selectVariety",
-					"style":{
-						"navigationBarTitleText":"选择品种"
+					"path": "selectVariety",
+					"style": {
+						"navigationBarTitleText": "选择品种"
 					}
 				},
 				{
-					"path":"applyResult",
-					"style":{
-						"navigationBarTitleText":"申请结果"
+					"path": "applyResult",
+					"style": {
+						"navigationBarTitleText": "申请结果"
 					}
 				}
 			]
@@ -172,31 +172,31 @@
 			"pages": [
 				{
 					"path": "permissionList",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "品种权限"
 					}
 				},
 				{
 					"path": "messageList",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "消息通知",
 						"enablePullDownRefresh": true
 					}
 				},
-			   	{
+				{
 					"path": "mysetting",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "我的设置"
 					}
 				},
 				{
 					"path": "myCollect",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "我的收藏",
 						"enablePullDownRefresh": true
 					}
 				}
-      		]
+			]
 		},
 		// 图库模块
 		{
@@ -204,13 +204,13 @@
 			"pages": [
 				{
 					"path": "allTypes",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "图表分类"
 					}
 				},
 				{
 					"path": "chartDetail",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "图表详情"
 					}
 				}
@@ -221,9 +221,9 @@
 			"root": "pages-buy",
 			"pages": [
 				{
-					"path":"detail",
-					"style":{
-						"navigationBarTitleText":""
+					"path": "detail",
+					"style": {
+						"navigationBarTitleText": ""
 					}
 				}
 			]
@@ -233,36 +233,36 @@
 			"root": "pages-report",
 			"pages": [
 				{
-					"path":"classify",
-					"style":{
-						"navigationBarTitleText":"FICC研报分类",
+					"path": "classify",
+					"style": {
+						"navigationBarTitleText": "FICC研报分类",
 						"enablePullDownRefresh": true
 					}
 				},
 				{
-					"path":"search",
-					"style":{
-						"navigationBarTitleText":"FICC研报"
+					"path": "search",
+					"style": {
+						"navigationBarTitleText": "FICC研报"
 					}
 				},
 				// 专栏列表 classifyId 
 				{
 					"path": "specialColumn/list",
-					"style":{
+					"style": {
 						"enablePullDownRefresh": true
 					}
 				},
 				// 专栏详情 columnId
 				{
 					"path": "specialColumn/detail",
-					"style":{
+					"style": {
 						"enablePullDownRefresh": true
 					}
 				},
 				// 报告列表 classifyId
 				{
 					"path": "reportList",
-					"style":{
+					"style": {
 						"enablePullDownRefresh": true
 					}
 				},
@@ -288,15 +288,15 @@
 				},
 				//预览图片
 				{
-					"path":"previewImage",
-					"style":{
+					"path": "previewImage",
+					"style": {
 						"navigationStyle": "custom"
 					}
 				},
 				//按用户有权限品种分的报告列表页
 				{
 					"path": "reportForVariety/list",
-					"style":{
+					"style": {
 						"enablePullDownRefresh": true
 					}
 				},
@@ -306,39 +306,42 @@
 				},
 				{
 					"path": "audioPlayListSet",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "播放列表 "
 					}
 				},
 				{
 					"path": "previewPDF"
+				},
+				{
+					"path": "disseminatePage/disseminatePage",
+					"style": {
+						"navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "surveyHistory/surveyHistory",
+					"style": {
+						"navigationBarTitleText": "调研列表",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "signUpPage/signUpPage",
+					"style": {
+						"navigationBarTitleText": "报名",
+						"enablePullDownRefresh": false
+					}
+				},
+				//权益报告详情
+				{
+					"path": "raiReportDetail",
+					"style": {
+						"navigationBarTitleText": "报告详情 "
+					}
 				}
-			    ,{
-                    "path" : "disseminatePage/disseminatePage",
-                    "style" :                                                                                    
-                {
-                    "navigationBarTitleText": "",
-                    "enablePullDownRefresh": false
-                }
-                
-                },
-                {
-                	"path" : "surveyHistory/surveyHistory",
-                	"style" : 
-                	{
-                		"navigationBarTitleText" : "调研列表",
-                		"enablePullDownRefresh" : false
-                	}
-                },
-                {
-                	"path" : "signUpPage/signUpPage",
-                	"style" : 
-                	{
-                		"navigationBarTitleText" : "报名",
-                		"enablePullDownRefresh" : false
-                	}
-                }
-            ]
+			]
 		},
 		// 问答模块
 		{
@@ -346,20 +349,20 @@
 			"pages": [
 				{
 					"path": "answerList",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "我的问答",
 						"enablePullDownRefresh": true
 					}
 				},
 				{
 					"path": "answerDetail",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "问答详情"
 					}
 				},
 				{
 					"path": "hasQuestion",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "我要提问"
 					}
 				}
@@ -371,7 +374,7 @@
 			"pages": [
 				{
 					"path": "sandTable",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "沙盘推演",
 						"enablePullDownRefresh": true
 					}
@@ -380,23 +383,23 @@
 		},
 		//语音播放模块
 		{
-			"root":"pages-voice",
+			"root": "pages-voice",
 			"pages": [
 				{
 					"path": "addVoice",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "新建语音"
 					}
 				},
 				{
 					"path": "voiceDetail",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "播报详情"
 					}
 				},
 				{
 					"path": "myVoice",
-					"style":{
+					"style": {
 						"navigationBarTitleText": "我的语音",
 						"enablePullDownRefresh": true
 					}
@@ -405,17 +408,17 @@
 		},
 		//线上路演模块
 		{
-			"root":"pages-roadShow",
-			"pages":[
+			"root": "pages-roadShow",
+			"pages": [
 				{
-					"path":"video/list",
+					"path": "video/list",
 					"style": {
 						"navigationBarTitleText": "线上路演",
 						"enablePullDownRefresh": true
 					}
 				},
 				{
-					"path":"video/search",
+					"path": "video/search",
 					"style": {
 						"navigationBarTitleText": "线上路演"
 					}
@@ -424,22 +427,22 @@
 		},
 		// 我的图库模块
 		{
-			"root":"pages-myChart",
-			"pages":[
+			"root": "pages-myChart",
+			"pages": [
 				{
-					"path":"classify",
+					"path": "classify",
 					"style": {
 						"navigationBarTitleText": "分类"
 					}
 				},
 				{
-					"path":"list",
+					"path": "list",
 					"style": {
 						"navigationBarTitleText": "列表"
 					}
 				},
 				{
-					"path":"detail",
+					"path": "detail",
 					"style": {
 						"navigationBarTitleText": "详情"
 					}
@@ -447,7 +450,6 @@
 			]
 		}
 	],
-		
 	"tabBar": {
 		"custom": true,
 		"color": "#1F243A",
@@ -485,25 +487,23 @@
 			}
 		]
 	},
-	
-		
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "弘则研报",
 		"navigationBarBackgroundColor": "#FFFFFF",
 		"backgroundColor": "#FFFFFF",
-		"usingComponents":{
-			"drag":"/wxcomponents/drag/index",
-			"van-button":"/wxcomponents/vant/button/index",
-			"van-toast":"/wxcomponents/vant/toast/index",
-			"van-popup":"/wxcomponents/vant/popup/index",
+		"usingComponents": {
+			"drag": "/wxcomponents/drag/index",
+			"van-button": "/wxcomponents/vant/button/index",
+			"van-toast": "/wxcomponents/vant/toast/index",
+			"van-popup": "/wxcomponents/vant/popup/index",
 			"van-search": "/wxcomponents/vant/search/index",
 			"van-sticky": "/wxcomponents/vant/sticky/index",
 			"van-field": "/wxcomponents/vant/field/index",
 			"van-icon": "/wxcomponents/vant/icon/index",
 			"van-radio": "/wxcomponents/vant/radio/index",
 			"van-tab": "/wxcomponents/vant/tab/index",
-  			"van-tabs": "/wxcomponents/vant/tabs/index",
+			"van-tabs": "/wxcomponents/vant/tabs/index",
 			"van-count-down": "/wxcomponents/vant/count-down/index",
 			"van-empty": "/wxcomponents/vant/empty/index",
 			"van-checkbox": "/wxcomponents/vant/checkbox/index",
@@ -513,7 +513,7 @@
 			"van-action-sheet": "/wxcomponents/vant/action-sheet/index",
 			"van-tag": "/wxcomponents/vant/tag/index",
 			"van-row": "/wxcomponents/vant/row/index",
-  			"van-col": "/wxcomponents/vant/col/index",
+			"van-col": "/wxcomponents/vant/col/index",
 			"van-progress": "/wxcomponents/vant/progress/index",
 			"van-dialog": "/wxcomponents/vant/dialog/index",
 			"van-cell": "/wxcomponents/vant/cell/index",
@@ -523,4 +523,4 @@
 			"van-switch": "/wxcomponents/vant/switch/index"
 		}
 	}
-}
+}

+ 1 - 0
pages/pc.vue

@@ -30,6 +30,7 @@ const mapObj=new Map([
     ['pages-report/previewPDF','/report/previewPDF'],
     ['pages/question/question','/question/list'],
     ['pages/forexCalendar/index','/forexCalendar/index'],
+    ['pages-report/raiReportDetail','/report/raiDetail'],
 ])//map映射小程序页面路径对应h5页面路径
 import {apiUserInfo} from '@/api/user'
 import {apiGetSceneToParams} from '@/api/common'

+ 4 - 0
pages/report/report.vue

@@ -329,6 +329,10 @@ export default {
 
     //跳转报告详情
     async goDetail(item) {
+      if(item.rai_report_id>0){
+        uni.navigateTo({ url: "/pages-report/raiReportDetail?reportId=" + item.report_id });
+        return
+      }
       if(item.report_chapter_id){
         uni.navigateTo({ url: `/pages-report/chapterDetail?chapterId=${item.report_chapter_id}&fromPage=home` });
       } else {