|
@@ -66,34 +66,55 @@ const getReportDetail=async ()=>{
|
|
|
|
|
|
//向小程序发送分享数据
|
|
|
//处理分享标题
|
|
|
- let shareTitle=''
|
|
|
- let shareImg=''
|
|
|
+ let shareTitle='',shareImg='',imgText='';
|
|
|
const shareTime=moment(res.data.report_info.publish_time).format('MMDD')
|
|
|
- if(['晨报','周报'].includes(res.data.report_info.classify_name_first)){
|
|
|
- shareTitle=`【${res.data.report_info.classify_name_first}】${res.data.report_info.title}(${shareTime})`
|
|
|
+ // if(['晨报','周报'].includes(res.data.report_info.classify_name_first)){
|
|
|
+ // shareTitle=`【${res.data.report_info.classify_name_first}】${res.data.report_info.title}(${shareTime})`
|
|
|
+ // }else{
|
|
|
+ // // 专栏类报告
|
|
|
+ // if(res.data.report_show_type==2){
|
|
|
+ // const abstract=res.data.report_info.abstract?`:${res.data.report_info.abstract}`:''
|
|
|
+ // if(res.data.report_info.classify_name_second==res.data.report_info.title){
|
|
|
+ // shareTitle=`${res.data.report_info.title}(${shareTime})${abstract}`
|
|
|
+ // }else{
|
|
|
+ // shareTitle=`【${res.data.report_info.classify_name_second}】${res.data.report_info.title}(${shareTime})`
|
|
|
+ // }
|
|
|
+ // }else{
|
|
|
+ // shareTitle=`【${res.data.report_info.classify_name_second}】${res.data.report_info.title}(${shareTime})`
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // // 日度点评
|
|
|
+ // if(res.data.report_info.classify_name_first==='日度点评'){
|
|
|
+ // shareTitle=res.data.report_info.abstract||'FICC日度点评'
|
|
|
+ // const rddpImgRes=await apiRddpShareImg({
|
|
|
+ // title:`【第${res.data.report_info.stage}期】${res.data.report_info.title}(${shareTime})`
|
|
|
+ // })
|
|
|
+ // if(rddpImgRes.code===200){
|
|
|
+ // shareImg=rddpImgRes.data
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ if(res.data.report_info.abstract){
|
|
|
+ shareTitle=res.data.report_info.abstract
|
|
|
+ imgText=`<div style="font-size:68px">第${res.data.report_info.stage}期 | ${res.data.report_info.title}(${shareTime})</div>`
|
|
|
}else{
|
|
|
- // 专栏类报告
|
|
|
- if(res.data.report_show_type==2){
|
|
|
- const abstract=res.data.report_info.abstract?`:${res.data.report_info.abstract}`:''
|
|
|
- if(res.data.report_info.classify_name_second==res.data.report_info.title){
|
|
|
- shareTitle=`${res.data.report_info.title}(${shareTime})${abstract}`
|
|
|
- }else{
|
|
|
- shareTitle=`【${res.data.report_info.classify_name_second}】${res.data.report_info.title}(${shareTime})`
|
|
|
- }
|
|
|
- }else{
|
|
|
- shareTitle=`【${res.data.report_info.classify_name_second}】${res.data.report_info.title}(${shareTime})`
|
|
|
+ shareTitle=res.data.report_info.title
|
|
|
+ imgText=`<div style="font-size:68px">${moment(res.data.report_info.publish_time).format('YYYY/MM/DD')}</div><div style="font-size:68px">第${res.data.report_info.stage}期 | ${res.data.report_info.classify_name_second}</div>`
|
|
|
+ if(['晨报','周报'].includes(res.data.report_info.classify_name_first)){
|
|
|
+ imgText=`<div style="font-size:68px">${moment(res.data.report_info.publish_time).format('YYYY/MM/DD')}</div><div style="font-size:68px">第${res.data.report_info.stage}期 | ${res.data.report_info.classify_name_first} </div>`
|
|
|
}
|
|
|
}
|
|
|
- // 日度点评
|
|
|
- if(res.data.report_info.classify_name_first==='日度点评'){
|
|
|
- shareTitle=res.data.report_info.abstract||'FICC日度点评'
|
|
|
- const rddpImgRes=await apiRddpShareImg({
|
|
|
- title:`【第${res.data.report_info.stage}期】${res.data.report_info.title}(${shareTime})`
|
|
|
+ const rddpImgRes=await apiRddpShareImg({
|
|
|
+ pars:JSON.stringify({
|
|
|
+ title:imgText,
|
|
|
+ time_format:moment(res.data.report_info.publish_time).format('YYYY/MM/DD'),
|
|
|
+ background_img:res.data.report_info.share_bg_img
|
|
|
})
|
|
|
- if(rddpImgRes.code===200){
|
|
|
- shareImg=rddpImgRes.data
|
|
|
- }
|
|
|
+ })
|
|
|
+ if(rddpImgRes.code===200){
|
|
|
+ shareImg=rddpImgRes.data
|
|
|
}
|
|
|
+
|
|
|
const postData={
|
|
|
path:'/pages-report/reportDetail',
|
|
|
params:{
|