@freelog/tools-lib 0.1.30 → 0.1.34

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.
@@ -37,19 +37,10 @@ function formatDateTime(date, showTime) {
37
37
  /**
38
38
  * 根据传入的子域名拼合成完整的适合的url
39
39
  * @param domain 要组合的三级域名
40
- * @param strict 是否严格返回,如 localhost 就放回空字符
41
40
  */
42
41
 
43
- function completeUrlByDomain(domain, strict) {
44
- if (strict === void 0) {
45
- strict = false;
46
- }
47
-
48
- var origin = '';
49
-
50
- if (!strict) {
51
- origin = "http://" + domain + ".testfreelog.com";
52
- }
42
+ function completeUrlByDomain(domain) {
43
+ var origin = "http://" + domain + ".testfreelog.com";
53
44
 
54
45
  if (window.location.origin.includes('.freelog.com')) {
55
46
  origin = "https://" + domain + ".freelog.com";
@@ -80,7 +71,7 @@ var NODE_DOMAIN = /^(?!-)[a-z0-9-]{4,24}(?<!-)$/; // 支付密码
80
71
 
81
72
  var PAY_PASSWORD = /^\d{6}$/; // 手机号码
82
73
 
83
- var MOBILE_PHONE_NUMBER = /^((13[0-9])|(14[5-9])|(15([0-3]|[5-9]))|(16[6-7])|(17[1-8])|(18[0-9])|(19[1|3])|(19[5|6])|(19[8|9]))\d{8}$/; // export const TELEPHONE_NUMBER = /^((13[0-9])|(14[5-9])|(15([0-3]|[5-9]))|(16[6-7])|(17[1-8])|(18[0-9])|(19[1|3])|(19[5|6])|(19[8|9]))\d{8}$/
74
+ var MOBILE_PHONE_NUMBER = /^1[345789]\d{9}$/; // export const TELEPHONE_NUMBER = /^((13[0-9])|(14[5-9])|(15([0-3]|[5-9]))|(16[6-7])|(17[1-8])|(18[0-9])|(19[1|3])|(19[5|6])|(19[8|9]))\d{8}$/
84
75
  // 邮箱地址
85
76
 
86
77
  var EMAIL_ADDRESS = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; // 用户名
@@ -324,6 +315,13 @@ function retrieveUserPassword(_temp10) {
324
315
  return "/retrieve" + handleQuery({
325
316
  goTo: goTo ? encodeURIComponent(goTo) : undefined
326
317
  });
318
+ } // 找回支付密码
319
+ // interface RetrievePayPasswordParamsType {
320
+ // goTo?: string;
321
+ // }
322
+
323
+ function retrievePayPassword() {
324
+ return "/retrievePayPassword";
327
325
  } // 钱包
328
326
  // interface WalletParamsType {
329
327
  // }
@@ -383,6 +381,7 @@ var LinkTo = {
383
381
  login: login,
384
382
  logon: logon,
385
383
  retrieveUserPassword: retrieveUserPassword,
384
+ retrievePayPassword: retrievePayPassword,
386
385
  wallet: wallet,
387
386
  contract: contract,
388
387
  setting: setting
@@ -2517,9 +2516,6 @@ function details$1(_ref) {
2517
2516
  var accountId = _ref.accountId,
2518
2517
  params = _objectWithoutPropertiesLoose(_ref, _excluded$7);
2519
2518
 
2520
- // return FUtil.Axios.get(`/v2/transactions/details/${accountId}`, {
2521
- // params,
2522
- // });
2523
2519
  return FUtil.Request({
2524
2520
  method: 'GET',
2525
2521
  url: "/v2/transactions/details/" + accountId,
@@ -2530,42 +2526,55 @@ function individualAccounts(_ref2) {
2530
2526
  var userId = _ref2.userId,
2531
2527
  params = _objectWithoutPropertiesLoose(_ref2, _excluded2$6);
2532
2528
 
2533
- // return FUtil.Axios.get(`/v2/accounts/individualAccounts/${userId}`, {
2534
- // params,
2535
- // });
2536
2529
  return FUtil.Request({
2537
2530
  method: 'GET',
2538
2531
  url: "/v2/accounts/individualAccounts/" + userId,
2539
2532
  params: params
2540
2533
  });
2541
2534
  }
2542
- function activateIndividualAccounts(_ref3) {
2543
- var params = _extends({}, _ref3);
2535
+ function transactionDetails(_ref3) {
2536
+ var recordId = _ref3.recordId;
2537
+ return FUtil.Request({
2538
+ method: 'GET',
2539
+ url: "/v2/transactions/records/" + recordId
2540
+ });
2541
+ }
2542
+ function activateIndividualAccounts(_ref4) {
2543
+ var params = _extends({}, _ref4);
2544
2544
 
2545
- // return FUtil.Axios.put(`/v2/accounts/individualAccounts/activate`, params);
2546
2545
  return FUtil.Request({
2547
2546
  method: 'PUT',
2548
2547
  url: "/v2/accounts/individualAccounts/activate",
2549
2548
  data: params
2550
2549
  });
2551
2550
  }
2552
- function changePassword(_ref4) {
2553
- var params = _extends({}, _ref4);
2551
+ function changePassword(_ref5) {
2552
+ var params = _extends({}, _ref5);
2554
2553
 
2555
- // return FUtil.Axios.put(`/v2/accounts/individualAccounts`, params);
2556
2554
  return FUtil.Request({
2557
2555
  method: 'PUT',
2558
2556
  url: "/v2/accounts/individualAccounts",
2559
2557
  data: params
2560
2558
  });
2561
2559
  }
2560
+ function resetPassword$1(_ref6) {
2561
+ var params = _extends({}, _ref6);
2562
+
2563
+ return FUtil.Request({
2564
+ method: 'PUT',
2565
+ url: "/v2/accounts/individualAccounts/resetPassword",
2566
+ data: params
2567
+ });
2568
+ }
2562
2569
 
2563
2570
  var Transaction = {
2564
2571
  __proto__: null,
2565
2572
  details: details$1,
2566
2573
  individualAccounts: individualAccounts,
2574
+ transactionDetails: transactionDetails,
2567
2575
  activateIndividualAccounts: activateIndividualAccounts,
2568
- changePassword: changePassword
2576
+ changePassword: changePassword,
2577
+ resetPassword: resetPassword$1
2569
2578
  };
2570
2579
 
2571
2580
  function sendVerificationCode(params) {