@gjzq/sdk 1.4.0 → 1.5.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.
@@ -6354,6 +6354,14 @@ function loginWithTokenForWeb(loginType) {
6354
6354
  });
6355
6355
  }
6356
6356
 
6357
+ /**
6358
+ * 注销用户号登录 4016
6359
+ * @function userLogOut
6360
+ */
6361
+ var userLogOut = function userLogOut() {
6362
+ nativeIOOperation(4016, {});
6363
+ };
6364
+
6357
6365
  /**
6358
6366
  * 检查登录状态
6359
6367
  * @function checkLogin
@@ -6383,6 +6391,11 @@ function checkLoginForWeb(loginType) {
6383
6391
  case 3:
6384
6392
  loginResult = _a.sent();
6385
6393
  console.log('loginResult: ', loginResult);
6394
+ // 1113 新增用户注销判断,需退登客户端
6395
+ if (loginResult.code === -4) {
6396
+ userLogOut();
6397
+ return [2 /*return*/, 0];
6398
+ }
6386
6399
  if (loginResult.code !== 0) {
6387
6400
  // 2025.01.02 经讨论 退登不解绑!!
6388
6401
  // 解绑userId
@@ -9285,14 +9298,6 @@ var userLoginModal = function userLoginModal(json) {
9285
9298
  return nativeIOOperation(4028, params);
9286
9299
  };
9287
9300
 
9288
- /**
9289
- * 注销用户号登录 4016
9290
- * @function userLogOut
9291
- */
9292
- var userLogOut = function userLogOut() {
9293
- nativeIOOperation(4016, {});
9294
- };
9295
-
9296
9301
  /**
9297
9302
  * 活体检测 3018
9298
9303
  * @function VivoDetectionParams
package/dist/index.d.ts CHANGED
@@ -245,7 +245,7 @@ declare const checkLogin: (loginType: string, channelId: string) => Promise<any>
245
245
  * @param {string} loginType 登录类型
246
246
  * @returns {Promise<boolean>}
247
247
  */
248
- declare function checkLoginForWeb(loginType: string): Promise<boolean>;
248
+ declare function checkLoginForWeb(loginType: string): Promise<boolean | Number>;
249
249
 
250
250
  /**
251
251
  * marginAccount登录状态检查
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-Clzjdhbd.js');
3
+ var index = require('./index-m-V72yXx.js');
4
4
  require('ts-md5');
5
5
  require('weixin-js-sdk');
6
6
  require('clipboard');
package/dist/pure.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-Clzjdhbd.js');
3
+ var index = require('./index-m-V72yXx.js');
4
4
  require('ts-md5');
5
5
  require('weixin-js-sdk');
6
6
  require('clipboard');
@@ -12,6 +12,7 @@ import { loginWithToken } from '../loginWithToken/index.mjs';
12
12
  import { loginWithTokenForWeb } from '../loginWithTokenForWeb/index.mjs';
13
13
  import { LoginType, useHybridLogin, CHANNELID } from '../utils/const.mjs';
14
14
  import { getQueryString } from '../utils/urlFuncs.mjs';
15
+ import { userLogOut } from '../userLogOut/index.mjs';
15
16
 
16
17
  /**
17
18
  * 检查登录状态
@@ -42,6 +43,11 @@ function checkLoginForWeb(loginType) {
42
43
  case 3:
43
44
  loginResult = _a.sent();
44
45
  console.log('loginResult: ', loginResult);
46
+ // 1113 新增用户注销判断,需退登客户端
47
+ if (loginResult.code === -4) {
48
+ userLogOut();
49
+ return [2 /*return*/, 0];
50
+ }
45
51
  if (loginResult.code !== 0) {
46
52
  // 2025.01.02 经讨论 退登不解绑!!
47
53
  // 解绑userId
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjzq/sdk",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "types": "./dist/index.d.ts",