xctc-utils 1.6.10 → 1.6.12

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.
@@ -327,6 +327,7 @@ function configReady(config) {
327
327
  }
328
328
  config.http(param).then(function (res) {
329
329
  if (res) {
330
+ (0, index_1.useSessionStorage)("configReady-res", res);
330
331
  var data = {};
331
332
  if (res === null || res === void 0 ? void 0 : res.hasOwnProperty("data")) {
332
333
  data = res.data;
@@ -338,11 +339,16 @@ function configReady(config) {
338
339
  var newKey = key.toLowerCase();
339
340
  data[newKey] = data[key];
340
341
  }
342
+ (0, index_1.useSessionStorage)("configReady-data", data);
343
+ if (!(data === null || data === void 0 ? void 0 : data.appid)) {
344
+ console.error("后端响应的data数据中缺乏appid或者appId或者AppId字段!");
345
+ return;
346
+ }
341
347
  var obj = {
342
348
  jsApiList: jsApiListData,
343
349
  openTagList: openTagListData,
344
350
  debug: false,
345
- appId: data === null || data === void 0 ? void 0 : data.appId,
351
+ appId: data === null || data === void 0 ? void 0 : data.appid,
346
352
  timestamp: data === null || data === void 0 ? void 0 : data.timestamp,
347
353
  nonceStr: data === null || data === void 0 ? void 0 : data.noncestr,
348
354
  signature: data === null || data === void 0 ? void 0 : data.signature, //必填,生成的签名
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xctc-utils",
3
- "version": "1.6.10",
3
+ "version": "1.6.12",
4
4
  "description": "localStorage存储\r ```\r sessionStorage存储\r ```\r crypto-js加密、解密\r ```\r 微信授权登录、微信分享\r ```\r 设备环境获取\r ```\r 是否是微信浏览器\r ```\r 时间戳转时间,字符串转时间戳",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",