This commit is contained in:
2022-02-17 17:05:38 +08:00
parent 0270de8490
commit 77b0905895
7 changed files with 43 additions and 36 deletions

View File

@@ -9,6 +9,9 @@ export default {
}
return false
},
rpx2px: (rpx) => {
return rpx / 750 * uni.getSystemInfoSync().windowWidth
},
checkPhone: (phone) => {
let re = /^[0-9]+.?[0-9]*/;
if (phone.length === 11) {
@@ -81,7 +84,6 @@ export default {
let days = Math.abs(currentDate.getTime() - valDate.getTime()) / (1000 * 60 * 60 * 24);
return Math.ceil(days) + '天前';
}
}
},
timeStamp(timestamp, formats) {