v1.3 版本发布,代码同步后端v1.3版本

This commit is contained in:
郑杰
2018-12-31 17:07:02 +08:00
parent 7f2e4ed3f9
commit c97e401918
38 changed files with 1338 additions and 40 deletions

View File

@@ -15,7 +15,7 @@ export function parseTime(time) {
var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
// 拼接
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
return year + '' + month + '' + day + ' ' + hours + ':' + minutes + ':' + seconds
} else {
return ''
}
@@ -93,3 +93,26 @@ export function debounce(func, wait, immediate) {
export function isExternal(path) {
return /^(https?:|mailto:|tel:)/.test(path)
}
// 替换邮箱字符
export function regEmail(email) {
if (String(email).indexOf('@') > 0) {
const str = email.split('@')
let _s = ''
if (str[0].length > 3) {
for (var i = 0; i < str[0].length - 3; i++) {
_s += '*'
}
}
var new_email = str[0].substr(0, 3) + _s + '@' + str[1]
}
return new_email
}
// 替换手机字符
export function regMobile(mobile) {
if (mobile.length > 7) {
var new_mobile = mobile.substr(0, 3) + '****' + mobile.substr(7)
}
return new_mobile
}