@hairy/wechat-jssdk 1.2.7 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +0 -193
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hairy/wechat-jssdk",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.cjs",
6
6
  "publishConfig": {
package/src/index.ts DELETED
@@ -1,193 +0,0 @@
1
- import type * as WxType from 'jweixin'
2
- import { WechatJssdkHelper } from './helper'
3
- import type { WechatJssdkOptions } from './types'
4
-
5
- /**
6
- * @description WechatJssdk Api 封装,与 [jssdk 文档](https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html) 保持一致,主要以下改动
7
- * @description 内置请求,读取 config 配置,初始化自动调用 wx.config
8
- * @description 所有 api 的 promise 化处理(仅等待 wx.ready)
9
- * @description 简易化初始化构建,config 处理
10
- * @description 可指定加载 jssdk 版本(默认 1.3.0)
11
- * @template `const wxJssdk = new WechatJssdk({env, config})`
12
- */
13
- class WechatJssdk extends WechatJssdkHelper {
14
- constructor(options: WechatJssdkOptions) {
15
- super(options)
16
- }
17
-
18
- // --- 1.4.0 API start ---
19
- updateAppMessageShareData(options: WxType.IonMenuShareAppMessage) {
20
- return this.implement('updateAppMessageShareData', options)
21
- }
22
-
23
- updateTimelineShareData(options: WxType.IonMenuShareAppMessage) {
24
- return this.implement('updateTimelineShareData', options)
25
- }
26
-
27
- // --- 1.4.0 API end ---
28
- addCard() {
29
- return this.implement('addCard')
30
- }
31
-
32
- checkJsApi(options: WxType.IcheckJsApi) {
33
- return this.implement('checkJsApi', options)
34
- }
35
-
36
- chooseCard(options: WxType.IchooseCard) {
37
- return this.implement('chooseCard', options)
38
- }
39
-
40
- chooseImage(options: WxType.IchooseImage) {
41
- return this.implement('chooseImage', options)
42
- }
43
-
44
- chooseWXPay(options: WxType.IchooseWXPay) {
45
- return this.implement('chooseWXPay', options)
46
- }
47
-
48
- closeWindow() {
49
- return this.implement('closeWindow')
50
- }
51
-
52
- consumeAndShareCard(options: WxType.IconsumeAndShareCard) {
53
- return this.implement('consumeAndShareCard', options)
54
- }
55
-
56
- downloadImage(options: WxType.IdownloadImage) {
57
- return this.implement('downloadImage', options)
58
- }
59
-
60
- downloadVoice(options: WxType.IupdownloadVoice) {
61
- return this.implement('downloadVoice', options)
62
- }
63
-
64
- getLocalImgData(options: WxType.IgetLocalImgData) {
65
- return this.implement('getLocalImgData', options)
66
- }
67
-
68
- getLocation(options: WxType.IgetLocation) {
69
- return this.implement('getLocation', options)
70
- }
71
-
72
- getNetworkType(options: WxType.IgetNetworkType) {
73
- return this.implement('getNetworkType', options)
74
- }
75
-
76
- hideAllNonBaseMenuItem() {
77
- return this.implement('hideAllNonBaseMenuItem')
78
- }
79
-
80
- hideMenuItems(options: WxType.IhideMenuItems) {
81
- return this.implement('hideMenuItems', options)
82
- }
83
-
84
- hideOptionMenu() {
85
- return this.implement('hideOptionMenu')
86
- }
87
-
88
- onMenuShareAppMessage(options: WxType.IonMenuShareAppMessage) {
89
- return this.implement('onMenuShareAppMessage', options)
90
- }
91
-
92
- onMenuShareQQ(options: WxType.IonMenuShareQQ) {
93
- return this.implement('onMenuShareQQ', options)
94
- }
95
-
96
- onMenuShareQZone(options: WxType.IonMenuShareQZone) {
97
- return this.implement('onMenuShareQZone', options)
98
- }
99
-
100
- onMenuShareTimeline(options: WxType.IonMenuShareTimeline) {
101
- return this.implement('onMenuShareTimeline', options)
102
- }
103
-
104
- onMenuShareWeibo(options: WxType.IonMenuShareWeibo) {
105
- return this.implement('onMenuShareWeibo', options)
106
- }
107
-
108
- onSearchBeacons(options: WxType.IonSearchBeacons) {
109
- return this.implement('onSearchBeacons', options)
110
- }
111
-
112
- onVoicePlayEnd(options: WxType.IonVoicePlayEnd) {
113
- return this.implement('onVoicePlayEnd', options)
114
- }
115
-
116
- onVoiceRecordEnd(options: WxType.IonVoiceRecordEnd) {
117
- return this.implement('onVoiceRecordEnd', options)
118
- }
119
-
120
- openCard(options: WxType.IopenCard) {
121
- return this.implement('openCard', options)
122
- }
123
-
124
- openLocation(options: WxType.IopenLocation) {
125
- return this.implement('openLocation', options)
126
- }
127
-
128
- openProductSpecificView(options: WxType.IopenProductSpecificView) {
129
- return this.implement('openProductSpecificView', options)
130
- }
131
-
132
- pauseVoice(options: WxType.IplaypausestopVoice) {
133
- return this.implement('pauseVoice', options)
134
- }
135
-
136
- playVoice(options: WxType.IplaypausestopVoice) {
137
- return this.implement('playVoice', options)
138
- }
139
-
140
- previewImage(options: WxType.IpreviewImage) {
141
- return this.implement('previewImage', options)
142
- }
143
-
144
- scanQRCode(options: WxType.IscanQRCode) {
145
- return this.implement('scanQRCode', options)
146
- }
147
-
148
- showAllNonBaseMenuItem() {
149
- return this.implement('showAllNonBaseMenuItem')
150
- }
151
-
152
- showMenuItems(options: WxType.IshowMenuItems) {
153
- return this.implement('showMenuItems', options)
154
- }
155
-
156
- showOptionMenu() {
157
- return this.implement('showOptionMenu')
158
- }
159
-
160
- startRecord() {
161
- return this.implement('startRecord')
162
- }
163
-
164
- startSearchBeacons(options: WxType.IstartSearchBeacons) {
165
- return this.implement('startSearchBeacons', options)
166
- }
167
-
168
- stopRecord(options: WxType.IstopRecord) {
169
- return this.implement('stopRecord', options)
170
- }
171
-
172
- stopSearchBeacons(options: WxType.IstopSearchBeacons) {
173
- return this.implement('stopSearchBeacons', options)
174
- }
175
-
176
- stopVoice(options: WxType.IplaypausestopVoice) {
177
- return this.implement('stopVoice', options)
178
- }
179
-
180
- translateVoice(options: WxType.ItranslateVoice) {
181
- return this.implement('translateVoice', options)
182
- }
183
-
184
- uploadImage(options: WxType.IuploadImage) {
185
- return this.implement('uploadImage', options)
186
- }
187
-
188
- uploadVoice(options: WxType.IupdownloadVoice) {
189
- return this.implement('uploadVoice', options)
190
- }
191
- }
192
-
193
- export { WechatJssdk }