闫增涛
2024-06-03 1f6a191b738ab6d8c1ff7c3804eabb454e09c269
资源请求优化
4个文件已修改
1个文件已添加
31 ■■■■ 已修改文件
src/App.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/methods/resources.js 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/books/artAndDance/assets/images/03-2.gif 补丁 | 查看 | 原始文档 | blame | 历史
src/books/artAndDance/view/components/chapter002.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/books/childHealth/view/content/components/chapter001.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue
@@ -70,7 +70,7 @@
        // embedded
        // english
        // artAndDance
        this.config.resourceCtx + "artAndDance"
        this.config.resourceCtx + "childHealth"
      );
      // 测试试读30页
      // this.activeBook.tryPageCount = 10;
src/assets/methods/resources.js
@@ -1,5 +1,19 @@
const getResourcePath = (md5) => {
  return  process.env.VUE_APP_API_URL + '/file/api/ApiDownload?md5=' + md5
import fileApi from '@/assets/js/middleGround/api/file'
export const getResourcePath = (md5,appRefCode = "jingshieke") => {
  fileApi.getAliVod({
    md5,appRefCode
  }).then(res => {
    console.log('path',res);
    if(res.data) {
      return res.data
    } else {
      return  process.env.VUE_APP_API_URL + '/file/api/ApiDownload?md5=' + md5
    }
  })
}
const MT = {
  getResourcePath
}
export default getResourcePath
export default MT
src/books/artAndDance/assets/images/03-2.gif
src/books/artAndDance/view/components/chapter002.vue
@@ -3,6 +3,7 @@
    <div class="page-box" page="8" style="min-height: auto;">
      <div v-if="showPageList.indexOf(8) > -1">
        <img class="img-0" alt="" src="../../assets/images/dy2.jpg" />
        <img src="../../assets/images/03-2.gif" alt="" style="width: 55%;" class="cover-gif">
      </div>
    </div>
    <div class="page-box" page="9">
@@ -205,4 +206,10 @@
</script>
<style lang="less" scoped>
.cover-gif {
  position: absolute;
  top: 33%;
  left: 23%;
}
</style>
src/books/childHealth/view/content/components/chapter001.vue
@@ -4518,7 +4518,7 @@
</template>
<script>
import examinations from "@/components/examinations/index.vue";
import getResourcePath from "@/assets/methods/resources";
import {getResourcePath} from "@/assets/methods/resources";
export default {
  name: "chapter-one",
  components: { examinations },