闫增涛
2024-05-15 af32b4dea68d727f4f7fe3d594282931e973f430
src/books/childHealth/view/index.vue
@@ -6,8 +6,9 @@
<script>
import examinations from "./components/examinations/index.vue";
import testData from '../assets/examinationList.json'
import pageContent from "./content/index.vue";
// import testData from '../assets/examinationList'
// import getQuestionData from '@/assets/methods/examination'
export default {
  name: "child-health",
  components: {
@@ -21,7 +22,6 @@
      idPathList: [],
      cardList: [],
      isMouseDown: false,
      showToolBox: false,
      move: false,
    };
  },
@@ -66,9 +66,18 @@
        },
      };
      this.MG.store.getProductDetail(query).then((res) => {
        console.log("图书信息",res.datas.cmsDatas[0].datas);
        this.$data.bookData =  res.datas.cmsDatas[0].datas
        console.log("图书信息",res.datas);
        this.$data.bookData =  res.datas
        this.$store.commit('setRootCmsItemId',res.datas.rootCmsItemId)
        // const questiondata = testData
        // for(let key in testData) {
        //   for(let tkey in testData[key]) {
        //     console.log(testData[key][tkey]);
        //     questiondata[key][tkey]  = getQuestionData(res.datas.rootCmsItemId,testData[key][tkey])
        //   }
        // }
        // this.$store.commit('setQuestionData',questiondata)
        // console.log(questiondata);
      });
    },
    getParentWithClass(element, className) {
@@ -96,7 +105,6 @@
          let chapterNum;
          if (chapterDom) chapterNum = chapterDom.getAttribute("num");
          if (txt && pageHtml) {
            this.$dsta.showToolBox = true;
            const page = pageHtml.getAttribute("page");
            console.log(
              {
@@ -131,7 +139,6 @@
    handleMouseDown() {
      this.$data.isMouseDown = true;
      this.$data.showToolBox = false;
    },
    handleMousemove() {
      if (this.$data.isMouseDown) {
@@ -160,3 +167,4 @@
</script>
<style lang="less" scoped></style>
../assets/examinationList.js../assets/examinationList.js