From f90c94f20b5f11d3b3ce0164d619c0112d5158c9 Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期四, 20 一月 2022 18:23:56 +0800
Subject: [PATCH] update: TODO#133100 顧問端:header增加顧問頭像圖示

---
 PAMapp/components/Consultant/ConsultantList.vue |   33 +++++++++++++++++++++------------
 1 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/PAMapp/components/Consultant/ConsultantList.vue b/PAMapp/components/Consultant/ConsultantList.vue
index 1e7bd7c..06ccd84 100644
--- a/PAMapp/components/Consultant/ConsultantList.vue
+++ b/PAMapp/components/Consultant/ConsultantList.vue
@@ -1,6 +1,5 @@
 <template>
     <div>
-
         <template v-if="agentList.length > 0">
             <ConsultantCard
                 v-for="(agent, index) in agentList"
@@ -23,22 +22,26 @@
 </template>
 
 <script lang="ts">
-import { Vue, Component, Prop, namespace } from 'nuxt-property-decorator';
-import { Consultant } from '~/assets/ts/models/consultant.model';
-import { Role } from '~/assets/ts/models/enum/Role';
-
-const roleStorage = namespace('localStorage');
+import { Consultant } from '~/shared/models/consultant.model';
+import { Vue, Component, Prop } from 'nuxt-property-decorator';
+import authService from '~/shared/services/auth.service';
 
 @Component
 export default class ConsultantList extends Vue {
-    @Prop() agents!: Consultant[];
-    @Prop() title! : string; 
-    @roleStorage.Getter isUserLogin!:boolean;
+    @Prop()
+    agents!: Consultant[];
+
+    @Prop()
+    title! : string;
+
+    isUserLogin = false;
+
+    //////////////////////////////////////////////////////////////////////
 
     get agentList(){
-        return this.agents.map((agentDto)=>
-            ({...agentDto,customerScore:0,})
-        )
+      return this.agents.map((agentDto)=>
+          ({...agentDto,customerScore:0,})
+      )
     }
 
     get noDataPlaceholder(): string {
@@ -47,6 +50,12 @@
                           : '����撌脤憿批��';
     }
 
+    //////////////////////////////////////////////////////////////////////
+
+    mounted() {
+      this.isUserLogin = authService.isUserLogin();
+    }
+
 }
 </script>
 

--
Gitblit v1.8.0