优化后台收不到推送报错404
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user