From 9bdb95c9e34cef640534e5e5a1e2225a80442000 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期四, 09 六月 2022 15:48:15 +0800
Subject: [PATCH] TODO#139894 [ footer -最下方說明與保經代合作 ] 文案修改

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

diff --git a/PAMapp/components/Consultant/ConsultantList.vue b/PAMapp/components/Consultant/ConsultantList.vue
index 57c8e06..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"
@@ -10,7 +9,7 @@
         </template>
         <template v-if="isUserLogin && agentList.length === 0">
             <div class="emptyRowStyle">
-                <div class="smTxt txt">����撌脤憿批��</div>
+                <div class="smTxt txt">{{ noDataPlaceholder }}</div>
             </div>
         </template>
         <template v-if="!isUserLogin">
@@ -23,21 +22,38 @@
 </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[];
-    @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 {
+      return this.title === 'contactedList'
+                          ? '����撌脰蝯⊿“���'
+                          : '����撌脤憿批��';
+    }
+
+    //////////////////////////////////////////////////////////////////////
+
+    mounted() {
+      this.isUserLogin = authService.isUserLogin();
     }
 
 }

--
Gitblit v1.8.0