|
@ -327,8 +327,8 @@ export default { |
|
|
this.phoneValid = phoneData.isValid; |
|
|
this.phoneValid = phoneData.isValid; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//Save Member Info |
|
|
|
|
|
patchUserData() { |
|
|
|
|
|
|
|
|
//Save Member Info(待優化) |
|
|
|
|
|
async patchUserData() { |
|
|
this.validators(); |
|
|
this.validators(); |
|
|
if(this.validators()){ |
|
|
if(this.validators()){ |
|
|
|
|
|
|
|
@ -350,19 +350,24 @@ export default { |
|
|
} |
|
|
} |
|
|
const patchData = JSON.parse(JSON.stringify(this.userData)); |
|
|
const patchData = JSON.parse(JSON.stringify(this.userData)); |
|
|
|
|
|
|
|
|
this.$axios |
|
|
|
|
|
|
|
|
console.log(patchData) |
|
|
|
|
|
|
|
|
|
|
|
await this.$axios |
|
|
.post( |
|
|
.post( |
|
|
`/trending/api/Members/Member`, patchData |
|
|
`/trending/api/Members/Member`, patchData |
|
|
) |
|
|
) |
|
|
.then((response) => { |
|
|
.then((response) => { |
|
|
//console.log(JSON.stringify(response)); |
|
|
//console.log(JSON.stringify(response)); |
|
|
|
|
|
|
|
|
|
|
|
console.log('testresponse: ', response) |
|
|
|
|
|
|
|
|
if (response.status == 200) { |
|
|
if (response.status == 200) { |
|
|
this.$notify({ |
|
|
this.$notify({ |
|
|
type: "success", |
|
|
type: "success", |
|
|
text: "更新成功", |
|
|
text: "更新成功", |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
this.fetchUserData(); |
|
|
|
|
|
|
|
|
// this.fetchUserData(); |
|
|
this.$auth.$storage.setUniversal("userPicture", patchData.MemberPicture); |
|
|
this.$auth.$storage.setUniversal("userPicture", patchData.MemberPicture); |
|
|
this.$store.dispatch("updatePicture"); |
|
|
this.$store.dispatch("updatePicture"); |
|
|
}) |
|
|
}) |
|
@ -373,8 +378,8 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//Get Member Info |
|
|
//Get Member Info |
|
|
fetchUserData() { |
|
|
|
|
|
this.$axios |
|
|
|
|
|
|
|
|
async fetchUserData() { |
|
|
|
|
|
await this.$axios |
|
|
.get( |
|
|
.get( |
|
|
`/trending/api/Members/Info` |
|
|
`/trending/api/Members/Info` |
|
|
) |
|
|
) |
|
@ -428,7 +433,13 @@ export default { |
|
|
|
|
|
|
|
|
}else{ |
|
|
}else{ |
|
|
const space = this.userData.BirthDate.split("T"); |
|
|
const space = this.userData.BirthDate.split("T"); |
|
|
|
|
|
|
|
|
|
|
|
console.log('space: ', space) |
|
|
|
|
|
|
|
|
const date = space[0].split("-"); |
|
|
const date = space[0].split("-"); |
|
|
|
|
|
|
|
|
|
|
|
console.log('date: ', date) |
|
|
|
|
|
|
|
|
this.yearSelect = date[0]; |
|
|
this.yearSelect = date[0]; |
|
|
this.monthSelect = date[1]; |
|
|
this.monthSelect = date[1]; |
|
|
this.daySelect = date[2]; |
|
|
this.daySelect = date[2]; |
|
@ -480,8 +491,8 @@ export default { |
|
|
console.log(error); |
|
|
console.log(error); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
fetchCountry() { |
|
|
|
|
|
this.$axios |
|
|
|
|
|
|
|
|
async fetchCountry() { |
|
|
|
|
|
await this.$axios |
|
|
.get(`/trending/api/location/countries?RegionID&Lang=${this.$i18n.localeProperties["langQuery"]}`) |
|
|
.get(`/trending/api/location/countries?RegionID&Lang=${this.$i18n.localeProperties["langQuery"]}`) |
|
|
.then((response) => { |
|
|
.then((response) => { |
|
|
//console.log(JSON.stringify(response)); |
|
|
//console.log(JSON.stringify(response)); |
|
|