闫增涛
2024-05-15 2e664020f32a0eda87139bc1363fa34b7b5697ba
src/books/childHealth/view/index.vue
@@ -9,7 +9,7 @@
export default {
  name: "child-health",
  components: {
    pageContent,
    pageContent
  },
  data() {
    return {
@@ -60,9 +60,9 @@
        }
      };
      this.MG.store.getProductDetail(query).then((res) => {
        console.log("图书信息",res.datas);
        this.$data.bookData =  res.datas
        this.$store.commit('setRootCmsItemId',res.datas.rootCmsItemId)
        console.log("图书信息", res.datas);
        this.$data.bookData = res.datas;
        this.$store.commit("setRootCmsItemId", res.datas.rootCmsItemId);
      });
    },
    getParentWithClass(element, className) {
@@ -74,7 +74,9 @@
      }
    },
    handleMouseUp(e) {
      const selection = (this.container ? this.container : window).getSelection();
      const selection = (
        this.container ? this.container : window
      ).getSelection();
      const txt = selection.toString();
      if (selection.type != "none" && txt) {
        let node = selection.anchorNode.parentNode;
@@ -110,12 +112,20 @@
            y: e.y
          });
        }
      } else {
        if (this.$store.state.qiankun.windowSelection) {
          this.$store.state.qiankun.windowSelection({
            chapterNum: "",
            txt: "",
            page: "",
            x: "",
            y: ""
          });
        }
      }
    }
  }
};
</script>
<style lang="less" scoped>
</style>
<style lang="less" scoped></style>