优化后台收不到推送报错404

This commit is contained in:
2026-04-20 12:24:37 +08:00
parent d2c1d8a4f6
commit 614fb00ec4
5 changed files with 1525 additions and 4 deletions

View File

@@ -108,7 +108,7 @@
<script setup lang="ts">
import { computed, onMounted, onUnmounted, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import createAxios from '/@/utils/axios'
import createAxios, { getPushScriptUrl } from '/@/utils/axios'
interface Snapshot {
record: anyObj | null
@@ -307,7 +307,7 @@ async function loadPushJs() {
}
await new Promise<void>((resolve, reject) => {
const script = document.createElement('script')
script.src = '/plugin/webman/push/push.js'
script.src = getPushScriptUrl()
script.onload = () => resolve()
script.onerror = () => reject(new Error('load push.js failed'))
document.head.appendChild(script)