|
@@ -291,32 +291,57 @@ export default {
|
|
|
//处理分享标题
|
|
|
let shareTitle=''
|
|
|
let shareImg=''
|
|
|
+ let 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=`【第${res.data.report_info.stage}期】${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})`
|
|
|
+ shareTitle=res.data.report_info.title
|
|
|
+ imgText=`<div style="font-size:50px">${moment(res.data.report_info.publish_time).format('YYYY/MM/DD')}</div><div>第${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:50px">${moment(res.data.report_info.publish_time).format('YYYY/MM/DD')}</div><div>第${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
|
|
|
}
|
|
|
+
|
|
|
wx.miniProgram.postMessage({
|
|
|
data: {
|
|
|
title:shareTitle,
|