| | |
| | | <template> |
| | | <div> |
| | | |
| | | <template v-if="agents.length > 0"> |
| | | <template v-if="agentList.length > 0"> |
| | | <ConsultantCard |
| | | v-for="(agent, index) in agents" |
| | | v-for="(agent, index) in agentList" |
| | | :key="index" |
| | | :agentInfo="agent" |
| | | ></ConsultantCard> |
| | | </template> |
| | | <template v-if="isLogin && agents.length === 0"> |
| | | <template v-if="isLogin && agentList.length === 0"> |
| | | <div class="emptyRowStyle"> |
| | | <div class="smTxt txt">您目前無已選顧問</div> |
| | | </div> |
| | |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Prop } from 'nuxt-property-decorator'; |
| | | import { Consultants } from '~/assets/ts/api/consultant'; |
| | | import { Consultants } from '~/assets/ts/models/consultant.model'; |
| | | import { isLogin } from '~/assets/ts/auth'; |
| | | |
| | | @Component |
| | |
| | | get isLogin() { |
| | | return isLogin(); |
| | | } |
| | | get agentList(){ |
| | | return this.agents.map((agentDto)=> |
| | | ({...agentDto,customerScore:0,}) |
| | | ) |
| | | } |
| | | |
| | | } |
| | | </script> |