node-easywechat 3.0.0-beta.2 → 3.0.0-beta.3

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/CHANGELOG.md CHANGED
@@ -1,11 +1,18 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v3.0.0-beta.3 (2022-06-22)
5
+
6
+ - Fix: 修复获取js ticket时无法自动获取access_token的问题
7
+ - Fix: 修复日志处理回调函数的参数提示异常的问题
8
+
4
9
  ## v3.0.0-beta.2 (2022-06-21)
5
10
 
11
+ - Feat: 统一调用入口增加一些常用的类
12
+
6
13
  - Fix: 修复获取的服务端实例没有代码提示的问题
7
14
 
8
- ## v3.0.0-beta.1, origin/3.x (2022-06-21)
15
+ ## v3.0.0-beta.1 (2022-06-21)
9
16
 
10
17
  - Feat: 新增设置预置参数相关方法
11
18
  - Feat: 增加设置日志处理器的方法
@@ -130,7 +130,7 @@ class Application {
130
130
  }
131
131
  getTicket() {
132
132
  if (!this.ticket) {
133
- this.ticket = new JsApiTicket_1.default(this.getAccount().getAppId(), this.getAccount().getSecret(), null, this.getCache(), this.getHttpClient());
133
+ this.ticket = new JsApiTicket_1.default(this.getAccount().getAppId(), this.getAccount().getSecret(), null, this.getCache(), this.getClient());
134
134
  }
135
135
  return this.ticket;
136
136
  }
@@ -2,6 +2,14 @@ import Application from './Application';
2
2
  declare class Utils {
3
3
  protected app: Application;
4
4
  constructor(app: Application);
5
+ /**
6
+ * 构建jssdk配置
7
+ * @param url 完整URL地址
8
+ * @param jsApiList api列表,默认:[]。可用列表:https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#63
9
+ * @param openTagList 开放标签列表,默认:[]。可用列表:https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html#附录-所有开放标签列表
10
+ * @param debug 是否开启调试模式,默认:false
11
+ * @returns
12
+ */
5
13
  buildJsSdkConfig(url: string, jsApiList?: string[], openTagList?: string[], debug?: boolean): Promise<Record<string, any>>;
6
14
  }
7
15
  export = Utils;
@@ -16,6 +16,14 @@ class Utils {
16
16
  constructor(app) {
17
17
  this.app = app;
18
18
  }
19
+ /**
20
+ * 构建jssdk配置
21
+ * @param url 完整URL地址
22
+ * @param jsApiList api列表,默认:[]。可用列表:https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#63
23
+ * @param openTagList 开放标签列表,默认:[]。可用列表:https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html#附录-所有开放标签列表
24
+ * @param debug 是否开启调试模式,默认:false
25
+ * @returns
26
+ */
19
27
  buildJsSdkConfig(url, jsApiList = [], openTagList = [], debug = false) {
20
28
  return __awaiter(this, void 0, void 0, function* () {
21
29
  return (0, merge_1.default)({
@@ -1,4 +1,4 @@
1
- import { AxiosRequestConfig } from 'axios';
1
+ import { AxiosRequestConfig, AxiosResponse } from 'axios';
2
2
  import ProviderInterface from 'node-socialite/dist/Core/ProviderInterface';
3
3
  import OfficialAccountApplicationInterface from '../OfficialAccount/Contracts/ApplicationInterface';
4
4
  import Message from '../Core/Message';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-easywechat",
3
- "version": "3.0.0-beta.2",
3
+ "version": "3.0.0-beta.3",
4
4
  "description": "EasyWechat SDK for Node.js (NOT OFFICIAL)",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1 +0,0 @@
1
- {"data":"mock-access_token","lifeTime":1655828727}
@@ -1 +0,0 @@
1
- {"data":"mock-access_token","lifeTime":1655828727}
@@ -1 +0,0 @@
1
- {"data":"mock-ticket","lifeTime":1655834427}