ntk-cms-api 1.2.6 → 1.2.9

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.
@@ -1393,6 +1393,7 @@
1393
1393
  this.configApiRetry = 0;
1394
1394
  this.keyUserToken = 'userToken';
1395
1395
  this.keyDeviceToken = 'deviceToken';
1396
+ this.keyBaseUrl = 'baseUrl';
1396
1397
  this.accessLoad = false;
1397
1398
  this.childConstructor();
1398
1399
  this.headers = new Map();
@@ -1400,14 +1401,14 @@
1400
1401
  ApiServerBase.prototype.setConfig = function (url, apiRetry) {
1401
1402
  if (apiRetry === void 0) { apiRetry = 1; }
1402
1403
  this.baseUrl = url;
1403
- localStorage.setItem('baseUrl', url);
1404
+ localStorage.setItem(this.keyBaseUrl, url);
1404
1405
  this.configApiRetry = apiRetry;
1405
1406
  };
1406
1407
  ApiServerBase.prototype.childConstructor = function () {
1407
1408
  // test
1408
1409
  };
1409
1410
  ApiServerBase.prototype.getBaseUrl = function () {
1410
- var BaseUrl = localStorage.getItem('baseUrl');
1411
+ var BaseUrl = localStorage.getItem(this.keyBaseUrl);
1411
1412
  if (BaseUrl && BaseUrl.length > 0) {
1412
1413
  return BaseUrl;
1413
1414
  }
@@ -2034,8 +2035,8 @@
2034
2035
  .pipe(operators.retry(this.configApiRetry),
2035
2036
  // catchError(this.handleError)
2036
2037
  operators.map(function (ret) {
2037
- // if (ret.Item != null) {
2038
- // this.coreCpMainMenu.next(ret.ListItems);
2038
+ // if (ret.item != null) {
2039
+ // this.coreCpMainMenu.next(ret.listItems);
2039
2040
  // }
2040
2041
  return _this.errorExceptionResultCheck(ret);
2041
2042
  }));
@@ -3007,7 +3008,7 @@
3007
3008
  .pipe(operators.retry(this.configApiRetry),
3008
3009
  // catchError(this.handleError)
3009
3010
  operators.map(function (ret) {
3010
- _this.SetCurrentUser(ret.Item);
3011
+ _this.SetCurrentUser(ret.item);
3011
3012
  return _this.errorExceptionResultCheck(ret);
3012
3013
  }));
3013
3014
  };
@@ -3476,8 +3477,8 @@
3476
3477
  return this.http.post(this.getBaseUrl() + this.getModuleControllerUrl() + '/GetTokenDevice/', model).pipe(
3477
3478
  // catchError(this.handleError)
3478
3479
  operators.map(function (ret) {
3479
- if (ret.IsSuccess) {
3480
- _this.setToken('', ret.DeviceToken, '');
3480
+ if (ret.isSuccess) {
3481
+ _this.setToken('', ret.deviceToken, '');
3481
3482
  }
3482
3483
  return ret;
3483
3484
  }));
@@ -3494,8 +3495,8 @@
3494
3495
  return this.http.post(this.getBaseUrl() + this.getModuleControllerUrl() + '/signin', model).pipe(
3495
3496
  // catchError(this.handleError)
3496
3497
  operators.map(function (ret) {
3497
- if (ret.IsSuccess) {
3498
- _this.SetCurrentTokenInfo(ret.Item);
3498
+ if (ret.isSuccess) {
3499
+ _this.SetCurrentTokenInfo(ret.item);
3499
3500
  }
3500
3501
  return ret;
3501
3502
  }));
@@ -3505,8 +3506,8 @@
3505
3506
  return this.http.post(this.getBaseUrl() + this.getModuleControllerUrl() + '/signInBySms', model).pipe(
3506
3507
  // catchError(this.handleError)
3507
3508
  operators.map(function (ret) {
3508
- if (ret.IsSuccess) {
3509
- _this.SetCurrentTokenInfo(ret.Item);
3509
+ if (ret.isSuccess) {
3510
+ _this.SetCurrentTokenInfo(ret.item);
3510
3511
  }
3511
3512
  return ret;
3512
3513
  }));
@@ -3523,8 +3524,8 @@
3523
3524
  .pipe(
3524
3525
  // catchError(this.handleError)
3525
3526
  operators.map(function (ret) {
3526
- if (ret.IsSuccess) {
3527
- _this.SetCurrentTokenInfo(ret.Item);
3527
+ if (ret.isSuccess) {
3528
+ _this.SetCurrentTokenInfo(ret.item);
3528
3529
  }
3529
3530
  return ret;
3530
3531
  }));
@@ -6135,8 +6136,8 @@
6135
6136
  .pipe(operators.retry(this.configApiRetry),
6136
6137
  // catchError(this.handleError)
6137
6138
  operators.map(function (ret) {
6138
- // if (ret.Item != null) {
6139
- // this.coreCpMainMenu.next(ret.ListItems);
6139
+ // if (ret.item != null) {
6140
+ // this.coreCpMainMenu.next(ret.listItems);
6140
6141
  // }
6141
6142
  return _this.errorExceptionResultCheck(ret);
6142
6143
  }));