YM
2024-05-29 fa128e06eca9b6b04ecacde97f86a1d219b05594
src/books/childHealth/view/index.vue
@@ -1,5 +1,8 @@
<template>
  <div class="temp-book" @mouseup="handleMouseUp">
  <div
    class="temp-book"
    @mouseup="handleMouseUp"
  >
    <pageContent></pageContent>
  </div>
</template>
@@ -7,64 +10,15 @@
<script>
import pageContent from "./content/index.vue";
export default {
  name: "child-health",
  components: {
    pageContent
  },
  data() {
    return {
      bookData: {},
      type: "option",
      idPathList: [],
      cardList: [],
      isMouseDown: false
    };
    return {};
  },
  mounted() {
    this.getBookInfo();
  },
  mounted() {},
  methods: {
    getBookInfo() {
      let query = {
        path: "*",
        queryType: "*",
        productId: this.config.bookId,
        favoriteTypes: "FavoriteBookCity",
        itemFields: {
          "SysType=": "CmsFolder"
        },
        coverSize: {
          height: 300
        },
        fields: {
          seriesName: [],
          author: [],
          isbn: [],
          publicationDate: [],
          bookClassification: [],
          paperPrice: [],
          JDLink: [],
          tmallLink: [],
          dangdangLink: [],
          weidianLink: [],
          content: [],
          authorIntroduction: [],
          // isApplyPaperBook: [],
          // isApplyEBook: [],
          isApplyBook: [],
          isSell: [],
          pdf: [],
          protectedEpub: [],
          probationPage: [], //pdf试读页数
          freeEpubPage: [] //epub试读百分比
        }
      };
      this.MG.store.getProductDetail(query).then((res) => {
        console.log("图书信息", res.datas);
        this.$data.bookData = res.datas;
        this.$store.commit("setRootCmsItemId", res.datas.rootCmsItemId);
      });
    },
    getParentWithClass(element, className) {
      while (element.parentElement) {
        element = element.parentElement;
@@ -102,15 +56,6 @@
              y: e.y
            });
          }
          console.log("选中的文字", {
            chapterNum,
            txt,
            selection,
            node,
            page,
            x: e.x,
            y: e.y
          });
        }
      } else {
        if (this.$store.state.qiankun.windowSelection) {
@@ -118,8 +63,8 @@
            chapterNum: "",
            txt: "",
            page: "",
            x: "",
            y: ""
            x: e.x,
            y: e.y
          });
        }
      }
@@ -128,4 +73,6 @@
};
</script>
<style lang="less" scoped></style>
<style lang="less">
@import "../assets/main.less";
</style>