增加群发消息api
This commit is contained in:
		| @@ -262,12 +262,6 @@ export const wxwork = { | ||||
|       }) | ||||
|       return inject([apis].flat().filter(Boolean)) | ||||
|     }, | ||||
|     wxInvoke(state, op) { | ||||
|       setTimeout(() => { | ||||
|         let sdk = typeof wx?.invoke == 'function' ? wx : jWeixin | ||||
|         sdk?.invoke(op?.[0], op?.[1], op?.[2]) | ||||
|       }, 500) | ||||
|     }, | ||||
|     previewFile({dispatch, state}, op) { | ||||
|       if (window.navigator.userAgent.indexOf("Windows NT") > -1) { | ||||
|         uni.showToast({ | ||||
| @@ -388,6 +382,15 @@ export const wxwork = { | ||||
|           err ? reject(err) : resolve(data) | ||||
|         }) | ||||
|       }) | ||||
|     }, | ||||
|     injectSDK({dispatch, state}, apis) { | ||||
|       const {corpId, suiteId} = state.config | ||||
|       return dispatch('agentSign', {corpId, suiteId}).then(() => dispatch("injectJWeixin", [apis].flat())) | ||||
|     }, | ||||
|     shareToExternalChat({dispatch}, params) { | ||||
|       return new Promise(resolve => { | ||||
|         dispatch("injectSDK", "shareToExternalChat").then(() => window?.wx?.invoke("shareToExternalChat", {...params}, resolve) || console.error("jssdk未成功加载!")) | ||||
|       }) | ||||
|     } | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user