GitXplorerGitXplorer
w

jweixin-esm

public
12 stars
3 forks
1 issues

Commits

List of commits on branch main.
Verified
0731dc76a8afab181ae64571db62e5a636a5a24f

chore(deps-dev): bump typescript from 5.5.2 to 5.5.3 (#33)

ddependabot[bot] committed 6 months ago
Unverified
bf2fa99f08a78aabdcdb59d5b59ddbfb560b17f5

renovate => dependabot

wwtto00 committed 7 months ago
Verified
0677a236e20c74df8bd5b3e8bd96e81cb11c5251

chore(deps): update dependency typescript to v5.5.2 (#32)

rrenovate[bot] committed 7 months ago
Verified
8f59b12c08cab59067d7233e4eab6a617e39e237

chore(deps): update dependency typescript to v5.4.5 (#31)

rrenovate[bot] committed 9 months ago
Verified
cdb389e632ea29f5ba08a00c02943243d799fd97

chore(deps): update dependency typescript to v5.4.4 (#30)

rrenovate[bot] committed 9 months ago
Verified
9b1502c9a018d8d0cc5648b82d7caeb3ee350b4a

chore(deps): update dependency typescript to v5.4.3 (#29)

rrenovate[bot] committed 10 months ago

README

The README file for this repository.

jweixin-esm

微信 JSSDK, ESM 模块, 附带 TS 类型以及详细注释

jweixin:1.6.0 DOCUMENT
NPM GitHub Package TypeScript:SUPPORT
PR:WELCOME ISSUE:WELCOME

About

基于微信官方的 JSSDK jweixin-1.6.0.js 改造的 ESM 模块,支持 TypeScript 类型,并且附带完整的注释文档微信官方文档

Installation

pnpm add @wtto00/jweixin-esm
# npm i @wtto00/jweixin-esm
# yarn add @wtto00/jweixin-esm

Usage

import weixin from '@wtto00/jweixin-esm'
// or:
// import '@wtto00/jweixin-esm'

// weixin的类型是WX,已全局声明

console.log(weixin) // 导入的名称
console.log(window.wx) // wx已挂载全局window
console.log(window.jWeixin) // jWeixin已挂载全局window

// 这里 weixin=window.wx=window.jWeixin

// 所有的类型全部在WX中,可以直接使用,不用额外导入或配置。已全局声明。

const configData: WX.ConfigOptions = {
  debug: true,
  appId: '',
  timestamp: '',
  nonceStr: '',
  signature: '',
  jsApiList: [], // WX.JsApi[]
  openTagList: [] // WX.OpenTag[]
}
weixin.config(configData)

Note

使用过程中有任何问题,请提 ISSUE。也非常欢迎所有的 PR。

有一些接口我只是看官方文档写的类型定义,并没有全部测试过,所以可能是会有错误的。如果发现了错误,麻烦提个 ISSUE,非常感谢。