优化kit

This commit is contained in:
2023-02-23 16:53:19 +08:00
parent 145cdeab4d
commit 308054a143

View File

@@ -11,6 +11,7 @@ const timer = {}
class wxworkKit { class wxworkKit {
constructor() { constructor() {
this.agentSignURL = "" this.agentSignURL = ""
window.wx = window.jWeixin || window.wx
this.agentSign() this.agentSign()
} }
@@ -68,7 +69,7 @@ class wxworkKit {
const sdk = wx?.agentConfig ? wx : jWeixin const sdk = wx?.agentConfig ? wx : jWeixin
console.log("agentConfig配置:") console.log("agentConfig配置:")
console.log({...this.config, jsApiList}) console.log({...this.config, jsApiList})
sdk?.agentConfig({ sdk.agentConfig({
...this.config, jsApiList, ...this.config, jsApiList,
success: res => resolve(res), success: res => resolve(res),
fail: err => { fail: err => {