|
@@ -9,6 +9,8 @@ import * as Parse from 'parse';
|
|
})
|
|
})
|
|
export class EditInfoPage implements OnInit {
|
|
export class EditInfoPage implements OnInit {
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
userInfo: any = {
|
|
userInfo: any = {
|
|
name: '',
|
|
name: '',
|
|
mobile: '',
|
|
mobile: '',
|
|
@@ -36,8 +38,8 @@ export class EditInfoPage implements OnInit {
|
|
this.currentUser = Parse.User.current();
|
|
this.currentUser = Parse.User.current();
|
|
if (this.currentUser) {
|
|
if (this.currentUser) {
|
|
console.log(this.userInfo)
|
|
console.log(this.userInfo)
|
|
- this.userInfo.birthday = this.userInfo.birthday || new Date()
|
|
|
|
- this.userInfo.birthday = new Date(this.userInfo.birthday);
|
|
|
|
|
|
+ this.userInfo.birthday = this.userInfo.birthday || new Date()
|
|
|
|
+ this.userInfo.birthday = new Date(this.userInfo.birthday);
|
|
for (const key in this.userInfo) {
|
|
for (const key in this.userInfo) {
|
|
if (this.userInfo.hasOwnProperty(key)) {
|
|
if (this.userInfo.hasOwnProperty(key)) {
|
|
this.currentUser.set(key, this.userInfo[key]);
|
|
this.currentUser.set(key, this.userInfo[key]);
|