修复JSSDK加载判断错误

This commit is contained in:
2025-08-13 23:29:26 +08:00
parent 1f3279e222
commit fd0de3b457
2 changed files with 6 additions and 4 deletions

View File

@@ -59,14 +59,16 @@ const wxSDK = (options = {}) => {
}
// SDK 加载管理
const scriptId = 'Pd_share'
const scriptId = 'wxShare'
let scriptTag = document.getElementById(scriptId)
let loadTimeout
const cleanup = () => {
clearTimeout(loadTimeout)
scriptTag.onload = null
scriptTag.onerror = null
if (scriptTag) {
scriptTag.onload = null
scriptTag.onerror = null
}
}
const loadSDK = () => {