Commit 2778b6da authored by fwz's avatar fwz

用户生日月日中的日也固定为两位数

parent f6856ce8
...@@ -139,6 +139,9 @@ export default { ...@@ -139,6 +139,9 @@ export default {
} }
var d = time.getDate(); // getDate方法从 Date 对象返回一个月中的某一天 (1 ~ 31) var d = time.getDate(); // getDate方法从 Date 对象返回一个月中的某一天 (1 ~ 31)
if(d < 10) {
d = '0' + d;
}
return y + '-' + M + '-' + d return y + '-' + M + '-' + d
} else { } else {
return ''; return '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment