Browse Source

练习卡片判断

liuhaidi123 1 day ago
parent
commit
466aebbcf0

+ 2 - 1
src/views/book/courseware/preview/components/article/components/Practice.vue

@@ -321,12 +321,13 @@ export default {
     let color = _this.colorsList[_this.colorIndex];
     _this.hanzicolor = color;
     _this.hanziweight = 6;
+    const regExp = /Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i;
     // _this.checkCollStatus();
     if (this.pageFrom && this.pageFrom === 'fullscreen') {
       this.fullWidth = window.innerWidth - 160;
       this.isRealFull = true;
       this.$forceUpdate();
-    } else if (window.innerWidth > window.innerHeight) {
+    } else if (window.innerWidth > window.innerHeight && regExp.test(navigator.userAgent) && window.innerWidth < 860) {
       this.pageFrom = 'fullscreen';
       this.fullWidth = window.innerHeight - 160;
       this.isRealFull = false;