egg-wechat-sdk-x 1.0.8 → 2.0.0

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.
package/index.d.ts CHANGED
@@ -18,6 +18,7 @@ interface WechatSdkOptions {
18
18
  appSecret: string,
19
19
  token?: string,
20
20
  encodingAESKey?: string
21
+ isMiniProgram?: boolean
21
22
  }
22
23
 
23
24
  interface EggWechatSdkOptions {
package/lib/WechatApi.js CHANGED
@@ -5,7 +5,7 @@ class WechatApi {
5
5
  /**
6
6
  *
7
7
  * @param {Egg.Application} app
8
- * @param {import("..").WechatOptions} _options
8
+ * @param {import("..").WechatSdkOptions} _options
9
9
  */
10
10
  constructor(app, _options) {
11
11
  this.app = app;
@@ -3,13 +3,13 @@ class WechatOauth {
3
3
  /**
4
4
  *
5
5
  * @param {Egg.Application} app
6
- * @param {import("..").WechatOptions} _options
6
+ * @param {import("..").WechatSdkOptions} _options
7
7
  */
8
8
  constructor(app, _options) {
9
9
  this.app = app;
10
10
  this.options = _options;
11
11
  this.OAUTH_TOKEN = "auth_token_";
12
- this.api = new OAuth(_options.appId, _options.appSecret, this.getToken.bind(this), this.setToken.bind(this));
12
+ this.api = new OAuth(_options.appId, _options.appSecret, this.getToken.bind(this), this.setToken.bind(this),_options.isMiniProgram);
13
13
  }
14
14
  /**
15
15
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egg-wechat-sdk-x",
3
- "version": "1.0.8",
3
+ "version": "2.0.0",
4
4
  "description": "",
5
5
  "eggPlugin": {
6
6
  "name": "wechatSdk",