@freelog/tools-lib 0.1.125 → 0.1.128

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.
@@ -1242,20 +1242,41 @@ function wallet(_temp18) {
1242
1242
 
1243
1243
  return "/logged/wallet";
1244
1244
  }
1245
- function contract(_temp19) {
1245
+ function reward(_temp19) {
1246
1246
  var _ref35 = _temp19 === void 0 ? {} : _temp19;
1247
1247
 
1248
1248
  _objectDestructuringEmpty(_ref35);
1249
1249
 
1250
- return "/logged/contract";
1250
+ return "/logged/reward";
1251
1251
  }
1252
- function setting(_temp20) {
1252
+ function contract(_temp20) {
1253
1253
  var _ref36 = _temp20 === void 0 ? {} : _temp20;
1254
1254
 
1255
1255
  _objectDestructuringEmpty(_ref36);
1256
1256
 
1257
+ return "/logged/contract";
1258
+ }
1259
+ function setting(_temp21) {
1260
+ var _ref37 = _temp21 === void 0 ? {} : _temp21;
1261
+
1262
+ _objectDestructuringEmpty(_ref37);
1263
+
1257
1264
  return "/logged/setting";
1258
1265
  }
1266
+ function binding(_temp22) {
1267
+ var _ref38 = _temp22 === void 0 ? {} : _temp22;
1268
+
1269
+ _objectDestructuringEmpty(_ref38);
1270
+
1271
+ return "/logged/binding";
1272
+ }
1273
+ function resultBindingSuccess(_temp23) {
1274
+ var _ref39 = _temp23 === void 0 ? {} : _temp23;
1275
+
1276
+ _objectDestructuringEmpty(_ref39);
1277
+
1278
+ return "/result/binding";
1279
+ }
1259
1280
  /************** user End ******************************************************/
1260
1281
 
1261
1282
  function handleQuery(query) {
@@ -1311,8 +1332,11 @@ var LinkTo = {
1311
1332
  retrievePayPassword: retrievePayPassword,
1312
1333
  userFreeze: userFreeze,
1313
1334
  wallet: wallet,
1335
+ reward: reward,
1314
1336
  contract: contract,
1315
- setting: setting
1337
+ setting: setting,
1338
+ binding: binding,
1339
+ resultBindingSuccess: resultBindingSuccess
1316
1340
  };
1317
1341
 
1318
1342
  // export const apiHost = `${window.location.protocol}//qi.${(window.location.host.match(/(?<=\.).*/) || [''])[0]}`;
@@ -1915,7 +1939,10 @@ function update(params) {
1915
1939
  url: "/v2/resources/" + params.resourceId,
1916
1940
  data: params
1917
1941
  });
1918
- }
1942
+ } // interface ListReturnType extends CommonReturn {
1943
+ // data: IResourceInfo[];
1944
+ // }
1945
+
1919
1946
  function list(params) {
1920
1947
  return FUtil.Request({
1921
1948
  method: 'GET',
@@ -2765,6 +2792,70 @@ function getNodeTaskInfo(params) {
2765
2792
  params: params
2766
2793
  });
2767
2794
  }
2795
+ function getRewardRecordInfo(params) {
2796
+ return FUtil.Request({
2797
+ method: 'GET',
2798
+ url: "/v2/activities/facade/getRewardRecordInfo",
2799
+ params: params
2800
+ });
2801
+ }
2802
+ function pushMessageTask(params) {
2803
+ return FUtil.Request({
2804
+ method: 'POST',
2805
+ url: "/v2/activities/facade/pushMessage4Task",
2806
+ data: params
2807
+ });
2808
+ }
2809
+ function getCoinAccount(params) {
2810
+ return FUtil.Request({
2811
+ method: 'GET',
2812
+ url: "/v2/activities/coin/account/find4Client",
2813
+ params: params
2814
+ });
2815
+ }
2816
+ function withdrawCoinAccount(params) {
2817
+ return FUtil.Request({
2818
+ method: 'POST',
2819
+ url: "/v2/activities/coin/account/cash4Client",
2820
+ data: params
2821
+ });
2822
+ }
2823
+ function getCoinAccountRecords(params) {
2824
+ return FUtil.Request({
2825
+ method: 'GET',
2826
+ url: "/v2/activities/coin/record/list4Client",
2827
+ params: params
2828
+ });
2829
+ }
2830
+ function getWechatOfficialAccountInfo(params) {
2831
+ if (params === void 0) {
2832
+ params = {};
2833
+ }
2834
+
2835
+ return FUtil.Request({
2836
+ method: 'GET',
2837
+ url: "/v2/extensions/wechat/getRelationship4Client",
2838
+ params: params
2839
+ });
2840
+ }
2841
+ function lotteryList(params) {
2842
+ if (params === void 0) {
2843
+ params = {};
2844
+ }
2845
+
2846
+ return FUtil.Request({
2847
+ method: 'GET',
2848
+ url: "/v2/activities/lottery/resource/list",
2849
+ params: params
2850
+ });
2851
+ }
2852
+ function lotteryShow(params) {
2853
+ return FUtil.Request({
2854
+ method: 'GET',
2855
+ url: "/v2/activities/lottery/resource/show",
2856
+ params: params
2857
+ });
2858
+ }
2768
2859
 
2769
2860
  var Activity = {
2770
2861
  __proto__: null,
@@ -2774,7 +2865,15 @@ var Activity = {
2774
2865
  adsDetails: adsDetails,
2775
2866
  getBaseTaskInfo: getBaseTaskInfo,
2776
2867
  getResourceTaskInfo: getResourceTaskInfo,
2777
- getNodeTaskInfo: getNodeTaskInfo
2868
+ getNodeTaskInfo: getNodeTaskInfo,
2869
+ getRewardRecordInfo: getRewardRecordInfo,
2870
+ pushMessageTask: pushMessageTask,
2871
+ getCoinAccount: getCoinAccount,
2872
+ withdrawCoinAccount: withdrawCoinAccount,
2873
+ getCoinAccountRecords: getCoinAccountRecords,
2874
+ getWechatOfficialAccountInfo: getWechatOfficialAccountInfo,
2875
+ lotteryList: lotteryList,
2876
+ lotteryShow: lotteryShow
2778
2877
  };
2779
2878
 
2780
2879
  var _excluded$9 = ["recordId"];
@@ -2837,7 +2936,16 @@ function getBetaApply2(_ref7) {
2837
2936
  return FUtil.Request({
2838
2937
  method: 'GET',
2839
2938
  url: "/v2/testQualifications/beta/apply/" + recordId,
2840
- data: params
2939
+ params: params
2940
+ });
2941
+ }
2942
+ function invitees(_ref8) {
2943
+ var params = _extends({}, _ref8);
2944
+
2945
+ return FUtil.Request({
2946
+ method: 'GET',
2947
+ url: "/v2/testQualifications/beta/codes/invitees",
2948
+ params: params
2841
2949
  });
2842
2950
  }
2843
2951
 
@@ -2849,7 +2957,8 @@ var TestQualification = {
2849
2957
  usedRecords: usedRecords,
2850
2958
  betaApply: betaApply,
2851
2959
  getBetaApply1: getBetaApply1,
2852
- getBetaApply2: getBetaApply2
2960
+ getBetaApply2: getBetaApply2,
2961
+ invitees: invitees
2853
2962
  };
2854
2963
 
2855
2964
  function transactionsCommon(params) {
@@ -3286,6 +3395,7 @@ var FUtil = {
3286
3395
  };
3287
3396
 
3288
3397
  var ossJsonUrl = 'https://freelog-i18n.oss-cn-shenzhen.aliyuncs.com/configs/i18n.json';
3398
+ var ossJsonUrl_Test = 'https://freelog-i18n.oss-cn-shenzhen.aliyuncs.com/configs-test/i18n.json';
3289
3399
  var localStorage_i18nextLng_key = 'locale';
3290
3400
  var localStorage_i18nextResources_key = 'i18nextResources';
3291
3401
  var allLanguage = [{
@@ -3295,7 +3405,6 @@ var allLanguage = [{
3295
3405
  value: 'zh_CN',
3296
3406
  label: '简体中文'
3297
3407
  }];
3298
- var self;
3299
3408
 
3300
3409
  var I18nNext = /*#__PURE__*/function () {
3301
3410
  function I18nNext() {
@@ -3303,22 +3412,28 @@ var I18nNext = /*#__PURE__*/function () {
3303
3412
  this._taskQueue = []; // private _currentLanguage: LanguageKeyType = window.localStorage.getItem(localStorage_i18nextLng_key) as null || 'zh_CN';
3304
3413
 
3305
3414
  this._currentLanguage = Cookies.get(localStorage_i18nextLng_key) || 'zh_CN';
3306
- self = this;
3307
- self.ready();
3415
+ this.ready();
3416
+ this.ready = this.ready.bind(this);
3417
+ this.t = this.t.bind(this);
3418
+ this.changeLanguage = this.changeLanguage.bind(this);
3419
+ this.getAllLanguage = this.getAllLanguage.bind(this);
3420
+ this.getCurrentLanguage = this.getCurrentLanguage.bind(this);
3308
3421
  }
3309
3422
 
3310
3423
  var _proto = I18nNext.prototype;
3311
3424
 
3312
3425
  _proto.ready = /*#__PURE__*/function () {
3313
3426
  var _ready = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2() {
3427
+ var _this = this;
3428
+
3314
3429
  var exc, handleTasks, promise;
3315
3430
  return runtime_1.wrap(function _callee2$(_context2) {
3316
3431
  while (1) {
3317
3432
  switch (_context2.prev = _context2.next) {
3318
3433
  case 0:
3319
3434
  exc = function exc() {
3320
- while (self._taskQueue.length > 0) {
3321
- var task = self._taskQueue.shift();
3435
+ while (_this._taskQueue.length > 0) {
3436
+ var task = _this._taskQueue.shift();
3322
3437
 
3323
3438
  task && task();
3324
3439
  }
@@ -3330,7 +3445,7 @@ var I18nNext = /*#__PURE__*/function () {
3330
3445
  while (1) {
3331
3446
  switch (_context.prev = _context.next) {
3332
3447
  case 0:
3333
- if (!(self._loadingData === 'End')) {
3448
+ if (!(_this._loadingData === 'End')) {
3334
3449
  _context.next = 3;
3335
3450
  break;
3336
3451
  }
@@ -3339,7 +3454,7 @@ var I18nNext = /*#__PURE__*/function () {
3339
3454
  return _context.abrupt("return");
3340
3455
 
3341
3456
  case 3:
3342
- if (!(self._loadingData === 'Start')) {
3457
+ if (!(_this._loadingData === 'Start')) {
3343
3458
  _context.next = 5;
3344
3459
  break;
3345
3460
  }
@@ -3348,9 +3463,9 @@ var I18nNext = /*#__PURE__*/function () {
3348
3463
 
3349
3464
  case 5:
3350
3465
  // NO_START
3351
- self._loadingData = 'Start';
3466
+ _this._loadingData = 'Start';
3352
3467
  _context.next = 8;
3353
- return self._handleData();
3468
+ return _this._handleData();
3354
3469
 
3355
3470
  case 8:
3356
3471
  // console.log('######');
@@ -3370,7 +3485,7 @@ var I18nNext = /*#__PURE__*/function () {
3370
3485
  }();
3371
3486
 
3372
3487
  promise = new Promise(function (resolve) {
3373
- self._taskQueue.push(resolve);
3488
+ _this._taskQueue.push(resolve);
3374
3489
  });
3375
3490
  handleTasks();
3376
3491
  return _context2.abrupt("return", promise);
@@ -3408,7 +3523,7 @@ var I18nNext = /*#__PURE__*/function () {
3408
3523
  };
3409
3524
 
3410
3525
  _proto.getCurrentLanguage = function getCurrentLanguage() {
3411
- return self._currentLanguage;
3526
+ return this._currentLanguage;
3412
3527
  };
3413
3528
 
3414
3529
  _proto._handleData = /*#__PURE__*/function () {
@@ -3418,7 +3533,7 @@ var I18nNext = /*#__PURE__*/function () {
3418
3533
  while (1) {
3419
3534
  switch (_context3.prev = _context3.next) {
3420
3535
  case 0:
3421
- lng = self._currentLanguage;
3536
+ lng = this._currentLanguage;
3422
3537
  resource = window.localStorage.getItem(localStorage_i18nextResources_key); // const resource: string | undefined = Cookies.get(decodeURIComponent(localStorage_i18nextResources_key));
3423
3538
 
3424
3539
  i18nextResources = resource ? JSON.parse(resource) : null;
@@ -3429,7 +3544,7 @@ var I18nNext = /*#__PURE__*/function () {
3429
3544
  }
3430
3545
 
3431
3546
  _context3.next = 6;
3432
- return self._fetchData();
3547
+ return this._fetchData();
3433
3548
 
3434
3549
  case 6:
3435
3550
  i18nextResources = _context3.sent;
@@ -3437,7 +3552,7 @@ var I18nNext = /*#__PURE__*/function () {
3437
3552
  break;
3438
3553
 
3439
3554
  case 9:
3440
- self._fetchData();
3555
+ this._fetchData();
3441
3556
 
3442
3557
  case 10:
3443
3558
  _context3.next = 12;
@@ -3456,11 +3571,14 @@ var I18nNext = /*#__PURE__*/function () {
3456
3571
  });
3457
3572
 
3458
3573
  case 12:
3574
+ this._loadingData = 'End';
3575
+
3576
+ case 13:
3459
3577
  case "end":
3460
3578
  return _context3.stop();
3461
3579
  }
3462
3580
  }
3463
- }, _callee3);
3581
+ }, _callee3, this);
3464
3582
  }));
3465
3583
 
3466
3584
  function _handleData() {
@@ -3479,7 +3597,7 @@ var I18nNext = /*#__PURE__*/function () {
3479
3597
  switch (_context4.prev = _context4.next) {
3480
3598
  case 0:
3481
3599
  _context4.next = 2;
3482
- return axios.get(ossJsonUrl, {
3600
+ return axios.get(window.location.origin.includes('.freelog.com') ? ossJsonUrl : ossJsonUrl_Test, {
3483
3601
  withCredentials: false
3484
3602
  });
3485
3603