xctc-utils 1.6.9 → 1.6.10
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/dist/weixin/index.js +9 -2
- package/package.json +1 -1
package/dist/weixin/index.js
CHANGED
|
@@ -152,7 +152,14 @@ function login(code) {
|
|
|
152
152
|
weixinConfig === null || weixinConfig === void 0 ? void 0 : weixinConfig.http(obj).then(function (res) {
|
|
153
153
|
var _a;
|
|
154
154
|
(0, index_1.useSessionStorage)("loginRes", res);
|
|
155
|
-
|
|
155
|
+
var code = -1;
|
|
156
|
+
if (res === null || res === void 0 ? void 0 : res.hasOwnProperty("code")) {
|
|
157
|
+
code = res.code;
|
|
158
|
+
}
|
|
159
|
+
if (res === null || res === void 0 ? void 0 : res.hasOwnProperty("Code")) {
|
|
160
|
+
code = res.Code;
|
|
161
|
+
}
|
|
162
|
+
if (code == 40163) {
|
|
156
163
|
// 未登录则先执行登录
|
|
157
164
|
return getCode();
|
|
158
165
|
}
|
|
@@ -319,7 +326,7 @@ function configReady(config) {
|
|
|
319
326
|
openTagListData = openTagList;
|
|
320
327
|
}
|
|
321
328
|
config.http(param).then(function (res) {
|
|
322
|
-
if (res
|
|
329
|
+
if (res) {
|
|
323
330
|
var data = {};
|
|
324
331
|
if (res === null || res === void 0 ? void 0 : res.hasOwnProperty("data")) {
|
|
325
332
|
data = res.data;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xctc-utils",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.10",
|
|
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",
|