From 391d7db141245798c64aa8acb0f143ab4152aa79 Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期三, 10 十一月 2021 10:47:46 +0800
Subject: [PATCH] TODO#130015/130016 [推薦保險顧問/我的顧問清單] api 串接

---
 PAMapp/components/Consultant/ConsultantList.vue |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/PAMapp/components/Consultant/ConsultantList.vue b/PAMapp/components/Consultant/ConsultantList.vue
index 250f084..a4077c6 100644
--- a/PAMapp/components/Consultant/ConsultantList.vue
+++ b/PAMapp/components/Consultant/ConsultantList.vue
@@ -8,7 +8,7 @@
                 @removeAgent="removeAgent"
             ></ConsultantCard>
         </template>
-        <template v-else-if="noLogin">
+        <template v-else-if="!isLogin && agents.length === 0">
             <div class="emptyRowStyle">
                 <div class="mdTxt login" @click="$router.push('/login')">��</div>
                 <div class="smTxt txt">���憭歇�憿批��</div>
@@ -24,13 +24,16 @@
 
 <script lang="ts">
 import { Vue, Component, Prop, Emit } from 'nuxt-property-decorator';
-import { Agents } from '~/plugins/api/home';
+import { Consultants } from '~/assets/ts/api/consultant';
+import { isLogin } from '~/assets/ts/auth';
 
 @Component
 export default class ConsultantList extends Vue {
-    @Prop() agents!: Agents[];
+    @Prop() agents!: Consultants[];
 
-    noLogin = false;
+    get isLogin() {
+        return isLogin();
+    }
 
     @Emit('removeAgent') removeAgent(agentId: number) {
         return agentId;
@@ -41,7 +44,7 @@
 <style lang="scss" scoped>
 
     .emptyRowStyle {
-        background-color: $white;
+        background-color: $PRIMARY_WHITE;
         width: 100%;
         height: 100px;
         display: flex;
@@ -49,14 +52,14 @@
         align-items: center;
 
         .login {
-            color: $primaryRed;
+            color: $PRIMARY_RED;
             cursor: pointer;
         }
 
         .txt {
-            color: $prudentialGrey;
+            color: $PRUDENTIAL_GREY;
             margin-left: 17px;
         }
     }
 
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.8.0