Skip to content

Commit

Permalink
Fix cdn.jsdelivr.net access issue by switching to unpkg.com
Browse files Browse the repository at this point in the history
Related to #430

Replace `cdn.jsdelivr.net` with `unpkg.com` in the project files to address the issue of unstable access to `cdn.jsdelivr.net`.

* **back-end/h5-api/views/engine.ejs**
  - Replace all instances of `cdn.jsdelivr.net` with `unpkg.com` for loading various scripts and stylesheets.
  - Update the QR code script source to use `unpkg.com`.

* **front-end/h5/public/index.html**
  - Replace all instances of `cdn.jsdelivr.net` with `unpkg.com` for loading various scripts and stylesheets.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/ly525/luban-h5/issues/430?shareId=XXXX-XXXX-XXXX-XXXX).
  • Loading branch information
ly525 committed Aug 9, 2024
1 parent 5c3a5e1 commit 2b879d3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
22 changes: 11 additions & 11 deletions back-end/h5-api/views/engine.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuex/dist/vuex.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/animate.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/dist/css/swiper.min.css">
<script src="https://cdn.jsdelivr.net/npm/swiper/dist/js/swiper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/swiper-animation.min.js"></script>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/vuex/dist/vuex.js"></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/animate.min.css">
<link rel="stylesheet" href="https://unpkg.com/swiper/dist/css/swiper.min.css">
<script src="https://unpkg.com/swiper/dist/js/swiper.min.js"></script>
<script src="https://unpkg.com/[email protected]/build/swiper-animation.min.js"></script>
<!-- <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js" async></script> -->
<script src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/v-charts/lib/index.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/v-charts/lib/style.min.css">
<script src="https://unpkg.com/echarts/dist/echarts.min.js"></script>
<script src="https://unpkg.com/v-charts/lib/index.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/v-charts/lib/style.min.css">
<script>window.__work = <%- JSON.stringify(work) %></script>
<script src="/engine-assets/engine.umd.js"></script>
<style>
Expand Down Expand Up @@ -249,7 +249,7 @@
}
function doPCActions() {
loadJS('https://cdn.jsdelivr.net/npm/qrcode/build/qrcode.min.js', drawQRcode);
loadJS('https://unpkg.com/qrcode/build/qrcode.min.js', drawQRcode);
}
isMobile() ? doMobileActions() : doPCActions();
Expand Down Expand Up @@ -317,4 +317,4 @@
<!-- endbuild -->
</body>

</html>
</html>
8 changes: 4 additions & 4 deletions front-end/h5/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
doc.setAttribute('data-useragent', navigator.userAgent);
</script>
<!-- <script src="https://code.createjs.com/1.0.0/createjs.min.js"></script> -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/builds/1.0.0/createjs.min.js" async></script>
<script src="https://unpkg.com/[email protected]/builds/1.0.0/createjs.min.js" async></script>
<!-- <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js" async></script> -->
<script src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/v-charts/lib/index.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/v-charts/lib/style.min.css">
<script src="https://unpkg.com/echarts/dist/echarts.min.js"></script>
<script src="https://unpkg.com/v-charts/lib/index.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/v-charts/lib/style.min.css">
<script>
// Note: 增加html userAgent标记,
// windows启用下仿mac的滚动条样式。
Expand Down

0 comments on commit 2b879d3

Please sign in to comment.