Fix bug
This commit is contained in:
@@ -2,6 +2,7 @@ import BigNumber from 'bignumber.js';
|
||||
import _ from 'lodash';
|
||||
import md5 from 'md5';
|
||||
import { AreaCode, Estate } from '@/types/common';
|
||||
import moment, { Moment } from 'moment';
|
||||
|
||||
export function encodePhone(code: AreaCode, phone: string): string {
|
||||
if (code && code.areacode) return `+${code.areacode}-${phone || ''}`;
|
||||
@@ -50,3 +51,7 @@ export function encryptPwd(pwd: string): string {
|
||||
export function displayPhone(phone: string): string {
|
||||
return `1******${_.takeRight(phone, 4).join('')}`;
|
||||
}
|
||||
|
||||
export function displayTime(time: string | Moment): string {
|
||||
return moment(time).format('YYYY-MM-DD HH:mm');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user