@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.
@@ -8,6 +8,10 @@ interface IndividualAccountsParamsType {
8
8
  userId: number;
9
9
  }
10
10
  export declare function individualAccounts({ userId, ...params }: IndividualAccountsParamsType): Promise<any>;
11
+ interface TransactionDetailsParamsType {
12
+ recordId: string;
13
+ }
14
+ export declare function transactionDetails({ recordId }: TransactionDetailsParamsType): Promise<any>;
11
15
  interface ActivateIndividualAccountsParamsType {
12
16
  password: string;
13
17
  authCode: string;
@@ -21,4 +25,11 @@ interface ChangePasswordParamsType {
21
25
  messageAddress: string;
22
26
  }
23
27
  export declare function changePassword({ ...params }: ChangePasswordParamsType): Promise<any>;
28
+ interface ResetPasswordParamsType {
29
+ loginPassword: string;
30
+ password: string;
31
+ authCode: string;
32
+ messageAddress: string;
33
+ }
34
+ export declare function resetPassword({ ...params }: ResetPasswordParamsType): Promise<any>;
24
35
  export {};
@@ -43,19 +43,10 @@ function formatDateTime(date, showTime) {
43
43
  /**
44
44
  * 根据传入的子域名拼合成完整的适合的url
45
45
  * @param domain 要组合的三级域名
46
- * @param strict 是否严格返回,如 localhost 就放回空字符
47
46
  */
48
47
 
49
- function completeUrlByDomain(domain, strict) {
50
- if (strict === void 0) {
51
- strict = false;
52
- }
53
-
54
- var origin = '';
55
-
56
- if (!strict) {
57
- origin = "http://" + domain + ".testfreelog.com";
58
- }
48
+ function completeUrlByDomain(domain) {
49
+ var origin = "http://" + domain + ".testfreelog.com";
59
50
 
60
51
  if (window.location.origin.includes('.freelog.com')) {
61
52
  origin = "https://" + domain + ".freelog.com";
@@ -86,7 +77,7 @@ var NODE_DOMAIN = /^(?!-)[a-z0-9-]{4,24}(?<!-)$/; // 支付密码
86
77
 
87
78
  var PAY_PASSWORD = /^\d{6}$/; // 手机号码
88
79
 
89
- 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}$/
80
+ 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}$/
90
81
  // 邮箱地址
91
82
 
92
83
  var EMAIL_ADDRESS = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; // 用户名
@@ -330,6 +321,13 @@ function retrieveUserPassword(_temp10) {
330
321
  return "/retrieve" + handleQuery({
331
322
  goTo: goTo ? encodeURIComponent(goTo) : undefined
332
323
  });
324
+ } // 找回支付密码
325
+ // interface RetrievePayPasswordParamsType {
326
+ // goTo?: string;
327
+ // }
328
+
329
+ function retrievePayPassword() {
330
+ return "/retrievePayPassword";
333
331
  } // 钱包
334
332
  // interface WalletParamsType {
335
333
  // }
@@ -389,6 +387,7 @@ var LinkTo = {
389
387
  login: login,
390
388
  logon: logon,
391
389
  retrieveUserPassword: retrieveUserPassword,
390
+ retrievePayPassword: retrievePayPassword,
392
391
  wallet: wallet,
393
392
  contract: contract,
394
393
  setting: setting
@@ -2523,9 +2522,6 @@ function details$1(_ref) {
2523
2522
  var accountId = _ref.accountId,
2524
2523
  params = _objectWithoutPropertiesLoose(_ref, _excluded$7);
2525
2524
 
2526
- // return FUtil.Axios.get(`/v2/transactions/details/${accountId}`, {
2527
- // params,
2528
- // });
2529
2525
  return FUtil.Request({
2530
2526
  method: 'GET',
2531
2527
  url: "/v2/transactions/details/" + accountId,
@@ -2536,42 +2532,55 @@ function individualAccounts(_ref2) {
2536
2532
  var userId = _ref2.userId,
2537
2533
  params = _objectWithoutPropertiesLoose(_ref2, _excluded2$6);
2538
2534
 
2539
- // return FUtil.Axios.get(`/v2/accounts/individualAccounts/${userId}`, {
2540
- // params,
2541
- // });
2542
2535
  return FUtil.Request({
2543
2536
  method: 'GET',
2544
2537
  url: "/v2/accounts/individualAccounts/" + userId,
2545
2538
  params: params
2546
2539
  });
2547
2540
  }
2548
- function activateIndividualAccounts(_ref3) {
2549
- var params = _extends({}, _ref3);
2541
+ function transactionDetails(_ref3) {
2542
+ var recordId = _ref3.recordId;
2543
+ return FUtil.Request({
2544
+ method: 'GET',
2545
+ url: "/v2/transactions/records/" + recordId
2546
+ });
2547
+ }
2548
+ function activateIndividualAccounts(_ref4) {
2549
+ var params = _extends({}, _ref4);
2550
2550
 
2551
- // return FUtil.Axios.put(`/v2/accounts/individualAccounts/activate`, params);
2552
2551
  return FUtil.Request({
2553
2552
  method: 'PUT',
2554
2553
  url: "/v2/accounts/individualAccounts/activate",
2555
2554
  data: params
2556
2555
  });
2557
2556
  }
2558
- function changePassword(_ref4) {
2559
- var params = _extends({}, _ref4);
2557
+ function changePassword(_ref5) {
2558
+ var params = _extends({}, _ref5);
2560
2559
 
2561
- // return FUtil.Axios.put(`/v2/accounts/individualAccounts`, params);
2562
2560
  return FUtil.Request({
2563
2561
  method: 'PUT',
2564
2562
  url: "/v2/accounts/individualAccounts",
2565
2563
  data: params
2566
2564
  });
2567
2565
  }
2566
+ function resetPassword$1(_ref6) {
2567
+ var params = _extends({}, _ref6);
2568
+
2569
+ return FUtil.Request({
2570
+ method: 'PUT',
2571
+ url: "/v2/accounts/individualAccounts/resetPassword",
2572
+ data: params
2573
+ });
2574
+ }
2568
2575
 
2569
2576
  var Transaction = {
2570
2577
  __proto__: null,
2571
2578
  details: details$1,
2572
2579
  individualAccounts: individualAccounts,
2580
+ transactionDetails: transactionDetails,
2573
2581
  activateIndividualAccounts: activateIndividualAccounts,
2574
- changePassword: changePassword
2582
+ changePassword: changePassword,
2583
+ resetPassword: resetPassword$1
2575
2584
  };
2576
2585
 
2577
2586
  function sendVerificationCode(params) {