Browse Source

重新替换master 分支的eta_comp

jwyu 9 tháng trước cách đây
mục cha
commit
826799aab7

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 321 - 317
public/eta_comp.js


+ 45 - 0
src/style/common.scss

@@ -24,6 +24,51 @@ li {
     list-style: none;
 }
 
+// 报告在编辑预览的时候和分享出来的页面样式不一样,下面是eta_front中的标签公共样式
+body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,button,input,textarea,th,td { margin:0; padding:0; }
+body{ font-size:12px; font-style:normal; font-family:"\5FAE\8F6F\96C5\9ED1", Helvetica, sans-serif,; }
+html{ overflow:auto; /* min-width:1000px; */ }
+small{ font-size:12px; }
+h1{ font-size:18px; }
+h2{ font-size:16px; }
+h3{ font-size:14px; }
+h4,h5,h6{ font-size:100%; }
+ul,ol{ list-style:none; }
+a{ text-decoration:none; background-color:transparent; }
+a:hover,a:active{ outline-width:0; text-decoration:none; }
+table{ border-collapse:collapse; border-spacing:0; }
+// hr{ border:0; height:1px; }
+img{ border-style:none; }
+img:not([src]){ display:none; }
+svg:not(:root){ overflow:hidden; }
+html{ -webkit-touch-callout:none; -webkit-text-size-adjust:100%; }
+input,textarea,button,a{ -webkit-tap-highlight-color:rgba(0,0,0,0); }
+article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{ display:block; }
+audio,canvas,progress,video{ display:inline-block; }
+audio:not([controls]),video:not([controls]){ display:none; height:0; }
+progress{ vertical-align:baseline; }
+mark{ background-color:#ff0; color:#000; }
+sub,sup{ position:relative; font-size:75%; line-height:0; vertical-align:baseline; }
+sub{ bottom:-0.25em; }
+sup{ top:-0.5em; }
+button,input,select,textarea{ font-size:100%; outline:0; }
+button,input{ overflow:visible; }
+button,select{ text-transform:none; }
+textarea{ overflow:auto; }
+button,html[type="button"],[type="reset"],[type="submit"]{ -webkit-appearance:button; }
+button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{ border-style:none; padding:0; }
+button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{ outline:1px dotted ButtonText; }
+[type="checkbox"],[type="radio"]{ box-sizing:border-box; padding:0; }
+[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{ height:auto; }
+[type="search"]{ -webkit-appearance:textfield; outline-offset:-2px; }
+[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration{ -webkit-appearance:none; }
+::-webkit-input-placeholder{ color:inherit; opacity:.54; }
+::-webkit-file-upload-button{ -webkit-appearance:button; font:inherit; }
+.clear:after{ display:block; height:0; content:""; clear:both; }
+
+.highcharts-range-selector-group{ display:none; }
+.highcharts-legend-item tspan{ font-weight:400;  }
+
 // 禁止页面打印
 @media print{
     body{

+ 5 - 2
src/views/report/reportDetail.vue

@@ -25,7 +25,7 @@
         "
       >
         <span>{{ reportInfo.Author }}</span>
-        <span style="float: right">{{ reportInfo.PublishTime }}</span>
+        <span style="float: right" v-if="[2,6].includes(reportInfo.State)">{{ reportInfo.PublishTime }}</span>
       </div>
 
       <div id="playcon" v-if="reportInfo.VideoUrl">
@@ -68,7 +68,7 @@
 
       <div id="abstract">
         <div class="abstract_cont">
-          <div>摘要:{{ reportInfo.Abstract }}</div>
+          <div v-if="reportInfo.Abstract">摘要:{{ reportInfo.Abstract }}</div>
           <div style="color: #666; margintop: 1.2rem">
             *注:请务必阅读&nbsp;<strong
               style="fontweight: normal; cursor: pointer; color: #3e8ce6"
@@ -189,6 +189,9 @@ export default {
     };
   },
   mounted() {
+    wx.ready(function(){
+        wx.hideOptionMenu();
+    });
     this.getreportdetail();
     window.addEventListener('scroll', this.loadMoreHandle);
   },

+ 4 - 4
src/views/report/reportDetailPdf.vue

@@ -25,7 +25,7 @@
         "
       >
         <span>{{ reportInfo.Author }}</span>
-        <span style="float: right">{{ reportInfo.PublishTime }}</span>
+        <span style="float: right" v-if="[2,6].includes(reportInfo.State)">{{ reportInfo.PublishTime }}</span>
       </div>
 
       <div id="playcon" v-if="reportInfo.VideoUrl">
@@ -56,7 +56,7 @@
 
       <div id="abstract">
         <div class="abstract_cont">
-          <div>摘要:{{ reportInfo.Abstract }}</div>
+          <div v-if="reportInfo.Abstract">摘要:{{ reportInfo.Abstract }}</div>
           <div style="color: #666; margin-top: 1.2rem">
             *注:请务必阅读&nbsp;<strong
               style="font-weight: normal; cursor: pointer; color: #3e8ce6"
@@ -166,9 +166,9 @@ export default {
       for (let i = 0; i < ps.length; i++) {
         const itp = ps[i];
         if(itp.indexOf('chartshow')!=-1){
-          returnStr+=itp.replace('<iframe','<eta-chart class="no-wrap"')+'</iframe>'
+          returnStr+=itp.replace('<iframe','<eta-chart class="no-wrap"')+'</eta-chart>'
         }else if(itp.indexOf('sheetshow')!=-1){
-          returnStr+=itp.replace('<iframe','<eta-table class="no-wrap"')+'</iframe>'
+          returnStr+=itp.replace('<iframe','<eta-table class="no-wrap"')+'</eta-table>'
         }else{
           returnStr+=itp
         }

+ 4 - 1
src/views/reportEn/detail.vue

@@ -25,7 +25,7 @@
         "
       >
         <span>{{ reportInfo.Author }}</span>
-        <span style="float: right">{{ reportInfo.PublishTime }}</span>
+        <span style="float: right" v-if="[2,6].includes(reportInfo.State)">{{ reportInfo.PublishTime }}</span>
       </div>
 
       <div id="abstract">
@@ -134,6 +134,9 @@ export default {
     };
   },
   mounted() {
+    wx.ready(function(){
+        wx.hideOptionMenu();
+    });
     this.getreportdetail();
     window.addEventListener('scroll', this.loadMoreHandle);
   },

+ 3 - 3
src/views/reportEn/detailPdf.vue

@@ -25,7 +25,7 @@
         "
       >
         <span>{{ reportInfo.Author }}</span>
-        <span style="float: right">{{ reportInfo.PublishTime }}</span>
+        <span style="float: right" v-if="[2,6].includes(reportInfo.State)">{{ reportInfo.PublishTime }}</span>
       </div>
 
       <div id="abstract">
@@ -142,9 +142,9 @@ export default {
       for (let i = 0; i < ps.length; i++) {
         const itp = ps[i];
         if(itp.indexOf('chartshow')!=-1){
-          returnStr+=itp.replace('<iframe','<eta-chart class="no-wrap"')+'</iframe>'
+          returnStr+=itp.replace('<iframe','<eta-chart class="no-wrap"')+'</eta-chart>'
         }else if(itp.indexOf('sheetshow')!=-1){
-          returnStr+=itp.replace('<iframe','<eta-table class="no-wrap"')+'</iframe>'
+          returnStr+=itp.replace('<iframe','<eta-table class="no-wrap"')+'</eta-table>'
         }else{
           returnStr+=itp
         }

+ 8 - 9
src/views/smartReport/detail.vue

@@ -23,11 +23,11 @@
           <header>{{reportInfo.Title}}</header>
           <div style=" box-sizing:border-box; color:#666; font-size:24px; overflow:hidden;">
             <span>{{ reportInfo.Author}}</span>
-            <span style="float:right;">{{reportInfo.CreateTime}}</span>
+            <span style="float:right;" v-if="[2,6].includes(reportInfo.State)">{{reportInfo.PublishTime}}</span>
           </div>
         </div>
         <div class="abstract" v-if="reportInfo && !!reportInfo.NeedSplice">
-          <div>摘要: <span v-html="reportInfo.Abstract"></span></div> 
+          <div v-if="reportInfo.Abstract">摘要: <span v-html="reportInfo.Abstract"></span></div> 
         </div>
         <div id="resetcss" style="overflow:hidden;" v-html="reportInfo.Content"></div>
         <div class="html-end-img-box" v-if="reportInfo && !!reportInfo.NeedSplice && reportInfo.EndImg">
@@ -118,6 +118,9 @@ export default {
     };
   },
   mounted() {
+    wx.ready(function(){
+        wx.hideOptionMenu();
+    });
     this.getreportdetail();
     window.addEventListener("scroll", this.loadMoreHandle);
     window.addEventListener('resize',this.pageResize)
@@ -201,16 +204,12 @@ export default {
         : Data.Report.Title + "(" + Data.Report.CreateTime.substring(5, 7) + Data.Report.CreateTime.substring(8, 10) + ")";
       this.reportInfo = Data.Report || {};
       this.headImgStyle=this.reportInfo.HeadStyle?JSON.parse(this.reportInfo.HeadStyle):[]
-      this.headImgStyle.map(st =>{
-        st.value=st.value || st.label
-      })
       this.endImgStyle=this.reportInfo.EndStyle?JSON.parse(this.reportInfo.EndStyle):[]
-      this.endImgStyle.map(st =>{
-        st.value=st.value || st.label
-      })
       this.layoutBaseInfo['研报标题']=this.reportInfo.Title
       this.layoutBaseInfo['研报作者']=this.reportInfo.Author
-      this.layoutBaseInfo['创建时间']=this.reportInfo.CreateTime
+      // 已发布已通过的报告才显示发布时间
+      this.layoutBaseInfo['创建时间']=[2,6].includes(this.reportInfo.State)?this.reportInfo.PublishTime:''
+      
       this.Disclaimer = Data.Disclaimer || "";
       this.isshow = true;
       this.$nextTick(()=>{

+ 6 - 11
src/views/smartReport/detailPdf.vue

@@ -16,11 +16,11 @@
           <header>{{reportInfo.Title}}</header>
           <div style=" box-sizing:border-box; color:#666; font-size:24px; overflow:hidden;">
             <span>{{ reportInfo.Author}}</span>
-            <span style="float:right;">{{reportInfo.CreateTime}}</span>
+            <span style="float:right;" v-if="[2,6].includes(reportInfo.State)">{{reportInfo.PublishTime}}</span>
           </div>
         </div>
         <div class="abstract" v-if="reportInfo && !!reportInfo.NeedSplice">
-          <div>摘要: <span v-html="reportInfo.Abstract"></span></div> 
+          <div v-if="reportInfo.Abstract">摘要: <span v-html="reportInfo.Abstract"></span></div> 
         </div>
         <div id="resetcss" style="overflow:hidden;" v-html="reportInfo.Content"></div>
         <div class="html-end-img-box" v-if="reportInfo && !!reportInfo.NeedSplice && reportInfo.EndImg">
@@ -81,16 +81,11 @@ export default {
       
       this.reportInfo = Data.Report;
       this.headImgStyle=this.reportInfo.HeadStyle?JSON.parse(this.reportInfo.HeadStyle):[]
-      this.headImgStyle.map(st =>{
-        st.value=st.value || st.label
-      })
       this.endImgStyle=this.reportInfo.EndStyle?JSON.parse(this.reportInfo.EndStyle):[]
-      this.endImgStyle.map(st =>{
-        st.value=st.value || st.label
-      })
       this.layoutBaseInfo['研报标题']=this.reportInfo.Title
       this.layoutBaseInfo['研报作者']=this.reportInfo.Author
-      this.layoutBaseInfo['创建时间']=this.reportInfo.CreateTime
+      // 已发布已通过的报告才显示发布时间
+      this.layoutBaseInfo['创建时间']=[2,6].includes(this.reportInfo.State)?this.reportInfo.PublishTime:''
       this.reportInfo.Content=this.setReportContent(this.reportInfo.Content)
       this.isshow = true;
       this.$nextTick(()=>{
@@ -103,9 +98,9 @@ export default {
       for (let i = 0; i < ps.length; i++) {
         const itp = ps[i];
         if(itp.indexOf('chartshow')!=-1){
-          returnStr+=itp.replace('<iframe','<eta-chart class="no-wrap"')+'</iframe>'
+          returnStr+=itp.replace('<iframe','<eta-chart class="no-wrap"')+'</eta-chart>'
         }else if(itp.indexOf('sheetshow')!=-1){
-          returnStr+=itp.replace('<iframe','<eta-table class="no-wrap"')+'</iframe>'
+          returnStr+=itp.replace('<iframe','<eta-table class="no-wrap"')+'</eta-table>'
         }else{
           returnStr+=itp
         }

+ 13 - 1
src/views/utils/wxShare.js

@@ -1,4 +1,5 @@
 import {getWxSign} from '@/api/api';
+import { Toast } from 'vant';
 // import utils from '@/utils/utils';
 export default function wxShare(shareurl,title,desc,imgurl,hide){
   getWxSign({
@@ -17,10 +18,15 @@ export default function wxShare(shareurl,title,desc,imgurl,hide){
         'onMenuShareAppMessage',//老版本分享接口。
         'onMenuShareTimeline',
         'hideOptionMenu',
+        'showOptionMenu',
         'hideMenuItems']
       });
     }else {
       console.log(res)
+      Toast('获取签名失败,请刷新重试!')
+      //如果需要强制刷新
+      //window.location.reload()
+      return 
     }
     if( hide==1 ){
       wx.ready(function(){
@@ -30,15 +36,20 @@ export default function wxShare(shareurl,title,desc,imgurl,hide){
       
       wx.ready(function(){
         // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
+        
+        wx.showOptionMenu();
+
         wx.onMenuShareTimeline({
           title:title, // 分享标题
           link:shareurl, // 分享链接,该链接域名必须与当前企业的可信域名一致
           imgUrl:imgurl, // 分享图标
           success: function () {
             // 用户确认分享后执行的回调函数
+            console.log('分享成功,地址:'+shareurl)
           },
           cancel: function () {
             // 用户取消分享后执行的回调函数
+            console.log('取消分享')
           }
         });
         wx.onMenuShareAppMessage({
@@ -50,10 +61,11 @@ export default function wxShare(shareurl,title,desc,imgurl,hide){
           dataUrl:'', // 如果type是music或video,则要提供数据链接,默认为空
           success:function () {
             // 用户确认分享后执行的回调函数
-            console.log( "当前链接:"+shareurl );
+            console.log( "分享成功,当前链接:"+shareurl );
           },
           cancel: function () {
             // 用户取消分享后执行的回调函数
+            console.log('取消分享')
           }
         });
         wx.hideMenuItems({

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác