natasha 1 month ago
parent
commit
de6c4ea93f

+ 1 - 1
package.json

@@ -17,7 +17,7 @@
     "@tinymce/tinymce-vue": "^3.2.8",
     "awe-dnd": "^0.3.4",
     "axios": "0.18.1",
-    "book-ui": "file:../GCLS-Book-UI/book-ui-0.4.8.tgz",
+    "book-ui": "file:../GCLS-Book-UI/book-ui-0.4.9.tgz",
     "cnchar": "^3.0.1",
     "cnchar-all": "^3.0.1",
     "cnchar-order": "^3.0.1",

+ 15 - 2
src/App.vue

@@ -1,7 +1,11 @@
 <template>
   <div id="app">
     <router-view />
-    <div v-if="userAgentTipShow" class="userAgentTips">
+    <div
+      v-if="userAgentTipShow"
+      class="userAgentTips"
+      :class="[isPhone ? 'userAgentTips-phone' : '']"
+    >
       <img src="./assets/userAgentWarning.png" width="32px" />
       <span
         >当前浏览器可能与网站不兼容!建议使用 chrome 浏览器获得最佳使用体验。
@@ -26,9 +30,12 @@ export default {
     return {
       userAgentTipShow: false,
       timeOut: null,
+      isPhone: false,
     };
   },
   created() {
+    const regExp = /Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i;
+    this.isPhone = regExp.test(navigator.userAgent) && window.innerWidth < 860;
     this.handleUserAgentRoot();
     window.addEventListener("click", () => {
       sessionStorage.setItem("lastClickTime", new Date().getTime());
@@ -50,7 +57,8 @@ export default {
     handleUserAgentRoot() {
       if (
         !sessionStorage.getItem("useragent_root_close") &&
-        navigator.userAgent.indexOf("Chrome") == -1
+        (navigator.userAgent.indexOf("Chrome") == -1 ||
+          navigator.userAgent.indexOf("CriOS") == -1)
       ) {
         this.userAgentTipShow = true;
       }
@@ -102,6 +110,11 @@ export default {
   font-size: 16px;
   line-height: 24px;
   z-index: 3;
+  &-phone {
+    width: 100%;
+    left: 0;
+    margin-left: 0;
+  }
   :nth-child(1) {
     margin-right: 8px;
   }

+ 5 - 1
src/components/inputModules/common/TreeView.vue

@@ -18,6 +18,10 @@
               ? 'tree_box_item_active'
               : 'tree_box_item',
             node.data.children ? 'tree_box_item_father' : '',
+            node.data.level_index ===
+            nodeLevel.substring(0, node.data.level_index.length)
+              ? 'tree_box_item_active'
+              : '',
           ]"
         >
           <span style="margin-right: 10px">{{ node.label }}</span>
@@ -256,7 +260,7 @@ export default {
   },
   created() {
     const regExp = /Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i;
-    this.isPhone = regExp.test(navigator.userAgent);
+    this.isPhone = regExp.test(navigator.userAgent) && window.innerWidth < 860;
 
     this.getList();
     console.log(this.bookId);

+ 1 - 1
src/views/TextbookDetail.vue

@@ -788,7 +788,7 @@ export default {
   //生命周期 - 创建完成(可以访问当前this实例)
   async created() {
     const regExp = /Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i;
-    this.isPhone = regExp.test(navigator.userAgent);
+    this.isPhone = regExp.test(navigator.userAgent) && window.innerWidth < 860;
     await updateWordPack({
       word_key_list: [
         "Key9",

+ 7 - 5
src/views/courseView.vue

@@ -309,8 +309,10 @@ export default {
   created() {
     console.log("2024-04-23");
     const regExp = /Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i;
-    this.isPhone = regExp.test(navigator.userAgent);
-    this.showMenu = !regExp.test(navigator.userAgent);
+    this.isPhone = regExp.test(navigator.userAgent) && window.innerWidth < 860;
+    this.showMenu = !(
+      regExp.test(navigator.userAgent) && window.innerWidth < 860
+    );
     const _this = this;
     if (
       _this.$route.query.encryption &&
@@ -653,9 +655,9 @@ export default {
         margin-bottom: 12px;
         padding-right: 160px;
         position: fixed;
-        top: 130px;
-        left: 64px;
-        z-index: 1;
+        top: 76px;
+        left: 230px;
+        z-index: 999;
         > img {
           width: 40px;
           margin-right: 16px;

+ 3 - 3
src/views/courseWare.vue

@@ -615,9 +615,9 @@ export default {
         margin-bottom: 12px;
         padding-right: 160px;
         position: fixed;
-        top: 130px;
-        left: 64px;
-        z-index: 1;
+        top: 76px;
+        left: 230px;
+        z-index: 999;
         > img {
           width: 40px;
           margin-right: 16px;