|
@@ -110,6 +110,11 @@ export default {
|
|
|
};
|
|
|
|
|
|
this.headImgStyle=this.reportInfo.HeadStyle?JSON.parse(this.reportInfo.HeadStyle):[]
|
|
|
+ if(this.isMobileDevice()) {
|
|
|
+ this.headImgStyle.map(st =>{
|
|
|
+ st.size = st.sizeMobile || st.size;
|
|
|
+ })
|
|
|
+ }
|
|
|
this.endImgStyle=this.reportInfo.EndStyle?JSON.parse(this.reportInfo.EndStyle):[]
|
|
|
this.layoutBaseInfo['研报标题']=this.reportInfo.Title
|
|
|
this.layoutBaseInfo['研报作者']=this.reportInfo.Author
|
|
@@ -121,6 +126,28 @@ export default {
|
|
|
this.pageResize()
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 判断是否为移动设备
|
|
|
+ *
|
|
|
+ * @returns 返回布尔值,表示是否为移动设备
|
|
|
+ */
|
|
|
+ isMobileDevice() {
|
|
|
+ const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
|
|
+ // Windows Phone must come first because its UA also contains "Android"
|
|
|
+ if (/windows phone/i.test(userAgent)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (/android/i.test(userAgent)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ // iOS detection
|
|
|
+ if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ },
|
|
|
+
|
|
|
setReportContent(str){
|
|
|
let ps = str.split('</iframe>')
|
|
|
let returnStr=''
|