Perbaikan Project PPOB

This commit is contained in:
2022-01-12 15:22:11 +07:00
parent 64b33c2d6b
commit c95d0c3f46
5 changed files with 262 additions and 20 deletions

View File

@@ -10,6 +10,7 @@ export class Authentication {
profileData = {};
dataProfit=[];
listImage=[];
imageProfil=[];
constructor(ctx) {
this.ctx = ctx;
@@ -58,7 +59,7 @@ export class Authentication {
const response = await http.get(`/auth/profile/${id}`);
console.log(response)
this.dataProfit = response.body ?? [];
this.listImage = this.dataProfit.userDetail ? JSON.parse(this.dataProfit.userDetail?.image_store) : [];
this.listImage = this.dataProfit.userDetail?.image_store ? JSON.parse(this.dataProfit.userDetail?.image_store) : [];
this.total_data = response?.body?.count ?? 0;
} catch (e) {
console.error(e);
@@ -70,6 +71,7 @@ export class Authentication {
const response = await http.get('/auth/profile');
console.log(response)
this.profileData = response.body;
this.imageProfil = this.profileData.userDetail?.image_store ? JSON.parse(this.profileData.userDetail?.image_store) : [];
} catch (e) {
console.error(e);
}