From abfd26bb700d93a92da6a04703b0187d4acaaeb5 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期三, 22 十二月 2021 10:13:02 +0800 Subject: [PATCH] refactor: move ts folder to shared folder --- PAMapp/components/QuickFilter/QuickFilterSelector.vue | 8 PAMapp/components/Ui/UiField.vue | 2 PAMapp/pages/consultantLogin/index.vue | 6 PAMapp/pages/login/index.vue | 16 +- PAMapp/pages/recommendConsultant/result.vue | 4 PAMapp/pages/accountSetting/index.vue | 4 PAMapp/pages/record/index.vue | 18 +- PAMapp/pages/myConsultantList.vue | 2 PAMapp/pages/myConsultantList/contactedList.vue | 4 PAMapp/pages/userReviewsRecord/index.vue | 16 +- PAMapp/components/QuickFilter/QuickFilterConsultantList.vue | 6 PAMapp/components/Consultant/ConsultantSwiper.vue | 6 PAMapp/pages/index.vue | 2 PAMapp/pages/myAppointmentList/contactedList.vue | 2 PAMapp/pages/userReviews/index.vue | 16 +- PAMapp/shared/api/consultant.ts | 2 PAMapp/pages/faq.vue | 4 PAMapp/shared/services/my-consultant.service.ts | 2 PAMapp/pages/quickFilter/index.vue | 10 +- PAMapp/shared/models/enum/Role.ts | 6 PAMapp/shared/api/appointment.ts | 2 PAMapp/components/Client/ClientList.vue | 2 PAMapp/pages/questionnaire/_agentNo.vue | 12 +- PAMapp/pages/myAppointmentList.vue | 2 PAMapp/components/AddAndReservedBtns.vue | 4 PAMapp/components/BackActionBar.vue | 3 PAMapp/components/Consultant/ConsultantCard.vue | 12 +- /dev/null | 90 ------------------ PAMapp/components/NavBar.vue | 2 PAMapp/pages/agentInfo/_agentNo.vue | 8 PAMapp/components/popUpFrame.vue | 4 PAMapp/pages/myAppointmentList/appointmentList.vue | 2 PAMapp/components/Client/ClientCard.vue | 8 PAMapp/pages/myConsultantList/consultantList.vue | 4 PAMapp/pages/recommendConsultant/index.vue | 2 PAMapp/store/localStorage.ts | 2 PAMapp/components/Ui/UiPagination.vue | 2 PAMapp/components/Consultant/ConsultantList.vue | 2 38 files changed, 105 insertions(+), 194 deletions(-) diff --git a/PAMapp/components/AddAndReservedBtns.vue b/PAMapp/components/AddAndReservedBtns.vue index d88a444..fa37c72 100644 --- a/PAMapp/components/AddAndReservedBtns.vue +++ b/PAMapp/components/AddAndReservedBtns.vue @@ -12,7 +12,7 @@ <script lang="ts"> import { Vue, Component, Prop, Emit, Action, State, namespace } from 'nuxt-property-decorator'; -import { Consultant } from '~/assets/ts/models/consultant.model'; +import { Consultant } from '~/shared/models/consultant.model'; const localStorage = namespace('localStorage'); @Component @@ -41,4 +41,4 @@ ? true : false } } -</script> \ No newline at end of file +</script> diff --git a/PAMapp/components/BackActionBar.vue b/PAMapp/components/BackActionBar.vue index bf0c489..dc671d9 100644 --- a/PAMapp/components/BackActionBar.vue +++ b/PAMapp/components/BackActionBar.vue @@ -11,13 +11,14 @@ import { namespace } from 'nuxt-property-decorator'; import { Vue, Component,} from 'vue-property-decorator'; import * as _ from 'lodash'; -import { Role } from '~/assets/ts/models/enum/role'; +import { Role } from '~/shared/models/enum/role'; const roleStorage = namespace('localStorage'); @Component export default class UiCarousel extends Vue { @roleStorage.Getter currentRole!:string; get label(): string { + if (this.$route.name) { const routeName = this.$route.name.split('-')[0]; let featureLabel = ''; diff --git a/PAMapp/components/Client/ClientCard.vue b/PAMapp/components/Client/ClientCard.vue index 4fca204..37300cc 100644 --- a/PAMapp/components/Client/ClientCard.vue +++ b/PAMapp/components/Client/ClientCard.vue @@ -96,10 +96,10 @@ <script lang="ts"> import { Vue, Component, Prop, Action } from 'nuxt-property-decorator'; -import appointmentService from '~/assets/ts/services/appointment.service'; -import { isMobileDevice } from '~/assets/ts/device'; -import { hideReviews } from '~/assets/ts/const/hide-reviews'; -import { ClientInfo } from '~/assets/ts/models/client.model'; +import appointmentService from '~/shared/services/appointment.service'; +import { isMobileDevice } from '~/shared/device'; +import { hideReviews } from '~/shared/const/hide-reviews'; +import { ClientInfo } from '~/shared/models/client.model'; @Component({ diff --git a/PAMapp/components/Client/ClientList.vue b/PAMapp/components/Client/ClientList.vue index afdcdfc..31c4095 100644 --- a/PAMapp/components/Client/ClientList.vue +++ b/PAMapp/components/Client/ClientList.vue @@ -18,7 +18,7 @@ <script lang='ts'> import { Vue, Component, Prop } from 'nuxt-property-decorator'; -import { ClientInfo } from '~/assets/ts/models/client.model'; +import { ClientInfo } from '~/shared/models/client.model'; @Component export default class ClientList extends Vue { diff --git a/PAMapp/components/Consultant/ConsultantCard.vue b/PAMapp/components/Consultant/ConsultantCard.vue index f774135..1bc5269 100644 --- a/PAMapp/components/Consultant/ConsultantCard.vue +++ b/PAMapp/components/Consultant/ConsultantCard.vue @@ -129,12 +129,12 @@ <script lang="ts"> import { Vue, Component, Prop, Action, namespace } from 'nuxt-property-decorator'; -import appointmentService from '~/assets/ts/services/appointment.service'; -import { isMobileDevice } from '~/assets/ts/device'; -import { hideReviews } from '~/assets/ts/const/hide-reviews'; -import { UserReviewsConsultantsParams, userReviewsConsultants } from '~/assets/ts/api/consultant'; -import { Consultant, ConsultantWithAppointmentId } from '~/assets/ts/models/consultant.model'; -import { Appointment } from '~/assets/ts/models/appointment.model'; +import appointmentService from '~/shared/services/appointment.service'; +import { isMobileDevice } from '~/shared/device'; +import { hideReviews } from '~/shared/const/hide-reviews'; +import { UserReviewsConsultantsParams, userReviewsConsultants } from '~/shared/api/consultant'; +import { Consultant, ConsultantWithAppointmentId } from '~/shared/models/consultant.model'; +import { Appointment } from '~/shared/models/appointment.model'; const localStorage = namespace('localStorage'); @Component({ diff --git a/PAMapp/components/Consultant/ConsultantList.vue b/PAMapp/components/Consultant/ConsultantList.vue index 33b9929..ce11a46 100644 --- a/PAMapp/components/Consultant/ConsultantList.vue +++ b/PAMapp/components/Consultant/ConsultantList.vue @@ -24,7 +24,7 @@ <script lang="ts"> import { Vue, Component, Prop, namespace } from 'nuxt-property-decorator'; -import { Consultant } from '~/assets/ts/models/consultant.model'; +import { Consultant } from '~/shared/models/consultant.model'; const roleStorage = namespace('localStorage'); diff --git a/PAMapp/components/Consultant/ConsultantSwiper.vue b/PAMapp/components/Consultant/ConsultantSwiper.vue index 7f8d13b..8adfc60 100644 --- a/PAMapp/components/Consultant/ConsultantSwiper.vue +++ b/PAMapp/components/Consultant/ConsultantSwiper.vue @@ -29,8 +29,8 @@ <script lang="ts"> import { Vue, Component, Prop } from 'vue-property-decorator'; import { SwiperOptions } from 'swiper'; -import { Consultant } from '~/assets/ts/models/consultant.model'; -import { hideReviews } from '~/assets/ts/const/hide-reviews'; +import { Consultant } from '~/shared/models/consultant.model'; +import { hideReviews } from '~/shared/const/hide-reviews'; @Component export default class UiSwiper extends Vue { @@ -38,7 +38,7 @@ @Prop() agents!: Consultant[]; hideReviews = hideReviews ; - + swiperOptions: SwiperOptions = { loop: false, slideToClickedSlide: false, diff --git a/PAMapp/components/NavBar.vue b/PAMapp/components/NavBar.vue index 6681eca..ca0cc1e 100644 --- a/PAMapp/components/NavBar.vue +++ b/PAMapp/components/NavBar.vue @@ -34,7 +34,7 @@ <script lang="ts"> import { Vue, Component } from 'vue-property-decorator'; import { namespace } from 'nuxt-property-decorator'; - import { Role } from '~/assets/ts/models/enum/role'; + import { Role } from '~/shared/models/enum/role'; import * as _ from 'lodash'; const roleStorage = namespace('localStorage'); diff --git a/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue b/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue index 4e722f1..de08434 100644 --- a/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue +++ b/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue @@ -82,8 +82,8 @@ <script lang="ts"> import { ElCarousel } from 'element-ui/types/carousel'; import { Vue, Component, Prop } from 'vue-property-decorator'; -import { Consultant } from '~/assets/ts/models/consultant.model'; -import { hideReviews } from '~/assets/ts/const/hide-reviews'; +import { Consultant } from '~/shared/models/consultant.model'; +import { hideReviews } from '~/shared/const/hide-reviews'; @Component export default class QuickFilterConsultantList extends Vue { @@ -219,4 +219,4 @@ } } -</style> \ No newline at end of file +</style> diff --git a/PAMapp/components/QuickFilter/QuickFilterSelector.vue b/PAMapp/components/QuickFilter/QuickFilterSelector.vue index e6800fb..8797fc0 100644 --- a/PAMapp/components/QuickFilter/QuickFilterSelector.vue +++ b/PAMapp/components/QuickFilter/QuickFilterSelector.vue @@ -44,7 +44,7 @@ </el-radio-group> </div> - <div v-else> + <div v-else> <el-rate v-if="!hideReviews" class="pam-quickFilter-rate" @@ -66,8 +66,8 @@ <script lang="ts"> import { Vue, Component, Prop, Watch, Emit } from 'nuxt-property-decorator'; -import { hideReviews } from '~/assets/ts/const/hide-reviews'; -import { FastQueryParams, QuestionOption, Selected } from '~/assets/ts/models/quickFilter.model'; +import { hideReviews } from '~/shared/const/hide-reviews'; +import { FastQueryParams, QuestionOption, Selected } from '~/shared/models/quickFilter.model'; @Component export default class QuickFilterDrawer extends Vue { pickedItem: FastQueryParams = { @@ -140,4 +140,4 @@ flex-wrap: wrap; } -</style> \ No newline at end of file +</style> diff --git a/PAMapp/components/Ui/UiField.vue b/PAMapp/components/Ui/UiField.vue index 5d5ee7b..df98f3c 100644 --- a/PAMapp/components/Ui/UiField.vue +++ b/PAMapp/components/Ui/UiField.vue @@ -13,7 +13,7 @@ <script lang="ts"> import { Vue, Component, Prop } from 'vue-property-decorator'; -import { isMobileDevice } from '~/assets/ts/device'; +import { isMobileDevice } from '~/shared/device'; @Component export default class UiField extends Vue { diff --git a/PAMapp/components/Ui/UiPagination.vue b/PAMapp/components/Ui/UiPagination.vue index 40f2709..abb27a9 100644 --- a/PAMapp/components/Ui/UiPagination.vue +++ b/PAMapp/components/Ui/UiPagination.vue @@ -12,7 +12,7 @@ <script lang="ts"> import { Vue, Component, Prop, Emit, Watch } from 'nuxt-property-decorator'; -import { Consultant } from '~/assets/ts/models/consultant.model'; +import { Consultant } from '~/shared/models/consultant.model'; @Component export default class UiPagination extends Vue { diff --git a/PAMapp/components/popUpFrame.vue b/PAMapp/components/popUpFrame.vue index f08993c..cfff207 100644 --- a/PAMapp/components/popUpFrame.vue +++ b/PAMapp/components/popUpFrame.vue @@ -15,7 +15,7 @@ <script lang="ts"> import { Vue, Component, Prop,Emit, Watch, PropSync} from 'vue-property-decorator'; - import { isMobileDevice } from '../assets/ts/device'; + import { isMobileDevice } from '~/shared/device'; @Component export default class PopUpFrame extends Vue { @PropSync('isOpen',{type:Boolean,default:false}) syncIsOpen!:boolean; @@ -32,7 +32,7 @@ private get isUseDialog() : boolean { return this.syncIsOpen && !isMobileDevice(); } - + private set isUseDialog(value: boolean) { this.$emit('update:isOpen',value); } diff --git a/PAMapp/pages/accountSetting/index.vue b/PAMapp/pages/accountSetting/index.vue index 4a1275c..e1c8058 100644 --- a/PAMapp/pages/accountSetting/index.vue +++ b/PAMapp/pages/accountSetting/index.vue @@ -70,8 +70,8 @@ <script lang="ts"> import { Vue,Component } from 'vue-property-decorator' -import { getUserAccountSetting, updateAccountSetting } from '~/assets/ts/api/consultant'; -import { UserSetting } from '~/assets/ts/models/account.model'; +import { getUserAccountSetting, updateAccountSetting } from '~/shared/api/consultant'; +import { UserSetting } from '~/shared/models/account.model'; @Component export default class AccountSetting extends Vue { diff --git a/PAMapp/pages/agentInfo/_agentNo.vue b/PAMapp/pages/agentInfo/_agentNo.vue index fb434b4..de479db 100644 --- a/PAMapp/pages/agentInfo/_agentNo.vue +++ b/PAMapp/pages/agentInfo/_agentNo.vue @@ -190,10 +190,10 @@ import { namespace } from 'nuxt-property-decorator'; import { Vue, Component } from 'vue-property-decorator'; -import myConsultantService from '~/assets/ts/services/my-consultant.service'; -import { AgentInfo } from '~/assets/ts/models/agent-info.model'; -import { hideReviews } from '~/assets/ts/const/hide-reviews'; -import { Role } from '~/assets/ts/models/enum/role'; +import myConsultantService from '~/shared/services/my-consultant.service'; +import { AgentInfo } from '~/shared/models/agent-info.model'; +import { hideReviews } from '~/shared/const/hide-reviews'; +import { Role } from '~/shared/models/enum/role'; const roleStorage = namespace('localStorage'); diff --git a/PAMapp/pages/consultantLogin/index.vue b/PAMapp/pages/consultantLogin/index.vue index 8ad62c8..3a90f3f 100644 --- a/PAMapp/pages/consultantLogin/index.vue +++ b/PAMapp/pages/consultantLogin/index.vue @@ -58,9 +58,9 @@ <script lang="ts"> import { Vue, Component , namespace } from 'nuxt-property-decorator'; import { AxiosError } from 'axios'; - import { Role } from '~/assets/ts/models/enum/role'; - import ErrorMessageBox from '~/assets/ts/errorService'; - import loginService from '~/assets/ts/services/login.service' + import { Role } from '~/shared/models/enum/role'; + import ErrorMessageBox from '~/shared/errorService'; + import loginService from '~/shared/services/login.service' const roleStorage = namespace('localStorage'); @Component({ diff --git a/PAMapp/pages/faq.vue b/PAMapp/pages/faq.vue index 3b629c5..d01440f 100644 --- a/PAMapp/pages/faq.vue +++ b/PAMapp/pages/faq.vue @@ -9,7 +9,7 @@ <script lang="ts"> import { Vue, Component } from 'nuxt-property-decorator'; -import { faqList } from '~/assets/ts/const/faqList'; +import { faqList } from '~/shared/const/faqList'; @Component export default class Faq extends Vue { @@ -22,4 +22,4 @@ } </script> -<style lang="scss" scoped></style> \ No newline at end of file +<style lang="scss" scoped></style> diff --git a/PAMapp/pages/index.vue b/PAMapp/pages/index.vue index 55baff7..5e21e53 100644 --- a/PAMapp/pages/index.vue +++ b/PAMapp/pages/index.vue @@ -44,7 +44,7 @@ <script lang="ts"> import { Vue, Component, State, Action, Watch, namespace } from 'nuxt-property-decorator'; - import { Consultant } from '~/assets/ts/models/consultant.model'; + import { Consultant } from '~/shared/models/consultant.model'; const localStorage = namespace('localStorage'); @Component({ diff --git a/PAMapp/pages/login/index.vue b/PAMapp/pages/login/index.vue index 1167d6f..8e60407 100644 --- a/PAMapp/pages/login/index.vue +++ b/PAMapp/pages/login/index.vue @@ -335,14 +335,14 @@ <script lang="ts"> import { namespace } from 'nuxt-property-decorator'; import { Vue, Component, Ref } from 'vue-property-decorator'; -import ErrorMessageBox from '~/assets/ts/errorService'; -import { OtpErrorCode } from '~/assets/ts/models/enum/otpErrorCode'; -import { Role } from '~/assets/ts/models/enum/role'; -import { LoginRequest } from '~/assets/ts/models/loginRequest.model'; -import { LoginVerify } from '~/assets/ts/models/loginVerify.model'; -import { OtpInfo } from '~/assets/ts/models/otpInfo.model'; -import { RegisterInfo } from '~/assets/ts/models/registerInfo'; -import loginService from '~/assets/ts/services/login.service'; +import ErrorMessageBox from '~/shared/errorService'; +import { OtpErrorCode } from '~/shared/models/enum/otpErrorCode'; +import { Role } from '~/shared/models/enum/role'; +import { LoginRequest } from '~/shared/models/loginRequest.model'; +import { LoginVerify } from '~/shared/models/loginVerify.model'; +import { OtpInfo } from '~/shared/models/otpInfo.model'; +import { RegisterInfo } from '~/shared/models/registerInfo'; +import loginService from '~/shared/services/login.service'; const roleStorage = namespace('localStorage'); diff --git a/PAMapp/pages/myAppointmentList.vue b/PAMapp/pages/myAppointmentList.vue index 6578ae8..f5198db 100644 --- a/PAMapp/pages/myAppointmentList.vue +++ b/PAMapp/pages/myAppointmentList.vue @@ -45,7 +45,7 @@ import * as _ from 'lodash'; -import { ClientInfo } from '~/assets/ts/models/client.model'; +import { ClientInfo } from '~/shared/models/client.model'; @Component({ layout: 'home', diff --git a/PAMapp/pages/myAppointmentList/appointmentList.vue b/PAMapp/pages/myAppointmentList/appointmentList.vue index 791b947..617b4fb 100644 --- a/PAMapp/pages/myAppointmentList/appointmentList.vue +++ b/PAMapp/pages/myAppointmentList/appointmentList.vue @@ -25,7 +25,7 @@ <script lang="ts"> import { Vue, Component, State, Watch } from 'nuxt-property-decorator'; -import { ClientInfo } from '~/assets/ts/models/client.model'; +import { ClientInfo } from '~/shared/models/client.model'; @Component export default class ClientReservedList extends Vue { diff --git a/PAMapp/pages/myAppointmentList/contactedList.vue b/PAMapp/pages/myAppointmentList/contactedList.vue index dbd8232..92ecd84 100644 --- a/PAMapp/pages/myAppointmentList/contactedList.vue +++ b/PAMapp/pages/myAppointmentList/contactedList.vue @@ -29,7 +29,7 @@ <script lang="ts"> import { Vue, Component, Watch, State } from 'nuxt-property-decorator'; -import { ClientInfo } from '~/assets/ts/models/client.model'; +import { ClientInfo } from '~/shared/models/client.model'; @Component export default class ClientContactedList extends Vue { diff --git a/PAMapp/pages/myConsultantList.vue b/PAMapp/pages/myConsultantList.vue index d0b0ae0..687547c 100644 --- a/PAMapp/pages/myConsultantList.vue +++ b/PAMapp/pages/myConsultantList.vue @@ -26,7 +26,7 @@ <script lang='ts'> import { Vue, Component, Watch, State, Action } from 'nuxt-property-decorator'; -import { Consultant, ConsultantWithAppointmentId } from '~/assets/ts/models/consultant.model'; +import { Consultant, ConsultantWithAppointmentId } from '~/shared/models/consultant.model'; @Component export default class myConsultantList extends Vue { diff --git a/PAMapp/pages/myConsultantList/consultantList.vue b/PAMapp/pages/myConsultantList/consultantList.vue index 0ea42af..0b1d3b6 100644 --- a/PAMapp/pages/myConsultantList/consultantList.vue +++ b/PAMapp/pages/myConsultantList/consultantList.vue @@ -14,7 +14,7 @@ <script lang="ts"> import { Vue, Component, Prop } from 'nuxt-property-decorator'; -import { Consultant } from '~/assets/ts/models/consultant.model'; +import { Consultant } from '~/shared/models/consultant.model'; @Component @@ -27,4 +27,4 @@ } } -</script> \ No newline at end of file +</script> diff --git a/PAMapp/pages/myConsultantList/contactedList.vue b/PAMapp/pages/myConsultantList/contactedList.vue index af53d84..1977f6b 100644 --- a/PAMapp/pages/myConsultantList/contactedList.vue +++ b/PAMapp/pages/myConsultantList/contactedList.vue @@ -14,7 +14,7 @@ <script lang="ts"> import { Vue, Component, Prop } from 'nuxt-property-decorator' ; -import { Consultant } from '~/assets/ts/models/consultant.model'; +import { Consultant } from '~/shared/models/consultant.model'; @Component @@ -26,4 +26,4 @@ this.pageList = pageList; } } -</script> \ No newline at end of file +</script> diff --git a/PAMapp/pages/questionnaire/_agentNo.vue b/PAMapp/pages/questionnaire/_agentNo.vue index 9b8b5c1..5ac1167 100644 --- a/PAMapp/pages/questionnaire/_agentNo.vue +++ b/PAMapp/pages/questionnaire/_agentNo.vue @@ -140,13 +140,13 @@ <script lang="ts"> import { Vue, Component, State, Action, Watch, namespace } from 'nuxt-property-decorator'; -import { addFavoriteConsultant, appointmentDemand, AppointmentParams, AppointmentRequests ,editAppointment } from '~/assets/ts/api/consultant'; -import { getRequestQuestionFromStorage, getRequestsFromStorage, removeRequestQuestionFromStorage, setRequestsToStorage } from '~/assets/ts/storageRequests'; +import { addFavoriteConsultant, appointmentDemand, AppointmentParams, AppointmentRequests ,editAppointment } from '~/shared/api/consultant'; +import { getRequestQuestionFromStorage, getRequestsFromStorage, removeRequestQuestionFromStorage, setRequestsToStorage } from '~/shared/storageRequests'; import _ from 'lodash'; -import { Consultant } from '~/assets/ts/models/consultant.model'; -import { ContactType } from '~/assets/ts/models/enum/ContactType'; -import { Gender } from '~/assets/ts/models/enum/Gender'; -import { RegisterInfo } from '~/assets/ts/models/registerInfo'; +import { Consultant } from '~/shared/models/consultant.model'; +import { ContactType } from '~/shared/models/enum/ContactType'; +import { Gender } from '~/shared/models/enum/Gender'; +import { RegisterInfo } from '~/shared/models/registerInfo'; const roleStorage = namespace('localStorage'); @Component diff --git a/PAMapp/pages/quickFilter/index.vue b/PAMapp/pages/quickFilter/index.vue index 7c8764f..8aa5f7a 100644 --- a/PAMapp/pages/quickFilter/index.vue +++ b/PAMapp/pages/quickFilter/index.vue @@ -66,10 +66,10 @@ <script lang="ts"> import { Vue, Component, namespace } from 'nuxt-property-decorator'; -import { Consultant } from '~/assets/ts/models/consultant.model'; -import { fastQuery } from '~/assets/ts/api/consultant'; -import { questionList } from '~/assets/ts/const/quickFilter-questionList'; -import { FastQueryParams, QuestionOption, Selected } from '~/assets/ts/models/quickFilter.model'; +import { Consultant } from '~/shared/models/consultant.model'; +import { fastQuery } from '~/shared/api/consultant'; +import { questionList } from '~/shared/const/quickFilter-questionList'; +import { FastQueryParams, QuestionOption, Selected } from '~/shared/models/quickFilter.model'; const localStorage = namespace('localStorage'); @Component @@ -232,4 +232,4 @@ } } -</style> \ No newline at end of file +</style> diff --git a/PAMapp/pages/recommendConsultant/index.vue b/PAMapp/pages/recommendConsultant/index.vue index f4135c6..0d0eb55 100644 --- a/PAMapp/pages/recommendConsultant/index.vue +++ b/PAMapp/pages/recommendConsultant/index.vue @@ -95,7 +95,7 @@ State } from 'nuxt-property-decorator'; import * as _ from 'lodash'; - import { Seniority } from '~/assets/ts/models/enum/seniority'; + import { Seniority } from '~/shared/models/enum/seniority'; const localStorage = namespace('localStorage'); diff --git a/PAMapp/pages/recommendConsultant/result.vue b/PAMapp/pages/recommendConsultant/result.vue index 9f04e1e..0b0c85e 100644 --- a/PAMapp/pages/recommendConsultant/result.vue +++ b/PAMapp/pages/recommendConsultant/result.vue @@ -83,8 +83,8 @@ </template> <script lang="ts"> import {Vue,Component, State, namespace, Action} from 'nuxt-property-decorator'; -import { AgentOfStrictQuery } from '~/assets/ts/api/consultant'; -import { hideReviews } from '~/assets/ts/const/hide-reviews'; +import { AgentOfStrictQuery } from '~/shared/api/consultant'; +import { hideReviews } from '~/shared/const/hide-reviews'; const localStorage = namespace('localStorage'); diff --git a/PAMapp/pages/record/index.vue b/PAMapp/pages/record/index.vue index 692841f..db7ac04 100644 --- a/PAMapp/pages/record/index.vue +++ b/PAMapp/pages/record/index.vue @@ -12,7 +12,7 @@ </section> <section class="user-reviews-content"> - <div + <div class="user-reviews-card" v-for="(appointmentLog, index) in myAppointmentReviewLogList" :key="index"> @@ -24,25 +24,25 @@ </div> <div class="user-reviews-card-date"> <div class="date"> - <UiDateFormat + <UiDateFormat :date="appointmentLog.lastModifiedDate" onlyShowSection="DAY" /> </div> <div class="time"> - <UiDateFormat + <UiDateFormat :date="appointmentLog.lastModifiedDate" onlyShowSection="TIME" /> </div> </div> </div> </section> - + </div> </template> <script lang="ts"> import { Vue, Component, Action, State, namespace } from 'nuxt-property-decorator'; -import { AppointmentLog } from '~/assets/ts/models/appointment.model'; +import { AppointmentLog } from '~/shared/models/appointment.model'; const roleStorage = namespace('localStorage'); @@ -63,8 +63,8 @@ this.storeMyAppointmentReviewLog(); } - - + + } </script> <style lang="scss" scoped> @@ -101,7 +101,7 @@ width:52px; .date{ margin-bottom: 2px; - + } } } @@ -112,4 +112,4 @@ flex: 1; } } -</style> \ No newline at end of file +</style> diff --git a/PAMapp/pages/userReviews/index.vue b/PAMapp/pages/userReviews/index.vue index 96b0cd9..6152aad 100644 --- a/PAMapp/pages/userReviews/index.vue +++ b/PAMapp/pages/userReviews/index.vue @@ -1,9 +1,9 @@ -<template> +<template> <div class="reviews-page"> <!-- 憿批恥��遛��漲蝯阡“��� --> <div class="reviews-banner"></div> - <section class="reviews-container"> + <section class="reviews-container"> <section class="reviews-header"> <div class="reviews-header-container"> <div class="reviews-header-title">皛踵�漲隤踵</div> @@ -20,17 +20,17 @@ <div class="card-txt"> 撠憿批�� <span class="p">{{item.name}}</span>��擃���,�蝯虫�嗾憿���? - <div + <div class="card-score" v-if="!isMobileDevice"> <el-rate class="user-reviews-rate" v-model="item.avgScore"></el-rate> </div> </div> </div> - <div + <div class="card-score" v-if="isMobileDevice"> - <el-rate + <el-rate class="user-reviews-rate" v-model="item.avgScore"></el-rate> </div> @@ -49,13 +49,13 @@ <el-button type="primary" class="reviews-dialog-btn" @click.native="reviewsDialogCheck">������</el-button> </div> </PopUpFrame> - + </div> </template> <script lang="ts"> import { Vue,Component } from 'vue-property-decorator' -import { isMobileDevice } from '~/assets/ts/device'; +import { isMobileDevice } from '~/shared/device'; @Component({ @@ -209,4 +209,4 @@ } -</style> \ No newline at end of file +</style> diff --git a/PAMapp/pages/userReviewsRecord/index.vue b/PAMapp/pages/userReviewsRecord/index.vue index a0665d9..2f5471e 100644 --- a/PAMapp/pages/userReviewsRecord/index.vue +++ b/PAMapp/pages/userReviewsRecord/index.vue @@ -12,7 +12,7 @@ </section> <section class="user-reviews-content"> - <div + <div class="user-reviews-card" v-for="(appointmentLog, index) in myAppointmentReviewLogList" :key="index"> @@ -24,25 +24,25 @@ </div> <div class="user-reviews-card-date"> <div class="date"> - <UiDateFormat + <UiDateFormat :date="appointmentLog.lastModifiedDate" onlyShowSection="DAY" /> </div> <div class="time"> - <UiDateFormat + <UiDateFormat :date="appointmentLog.lastModifiedDate" onlyShowSection="TIME" /> </div> </div> </div> </section> - + </div> </template> <script lang="ts"> import { Vue, Component, Action, State, namespace } from 'nuxt-property-decorator'; -import { AppointmentLog } from '~/assets/ts/models/appointment.model'; +import { AppointmentLog } from '~/shared/models/appointment.model'; const roleStorage = namespace('localStorage'); @@ -62,7 +62,7 @@ mounted() { this.storeMyAppointmentReviewLog(); } - + } </script> <style lang="scss" scoped> @@ -99,7 +99,7 @@ width:52px; .date{ margin-bottom: 2px; - + } } } @@ -110,4 +110,4 @@ flex: 1; } } -</style> \ No newline at end of file +</style> diff --git a/PAMapp/shared/api/appointment.ts b/PAMapp/shared/api/appointment.ts index 81a90ca..9b0515a 100644 --- a/PAMapp/shared/api/appointment.ts +++ b/PAMapp/shared/api/appointment.ts @@ -1,4 +1,4 @@ -import { http } from '~/assets/ts/services/httpClient'; +import { http } from '~/shared/services/httpClient'; import { AppointmentLog } from '../models/appointment.model'; diff --git a/PAMapp/shared/api/consultant.ts b/PAMapp/shared/api/consultant.ts index 120188d..7caea29 100644 --- a/PAMapp/shared/api/consultant.ts +++ b/PAMapp/shared/api/consultant.ts @@ -2,7 +2,7 @@ import { ConsultantLoginInfo } from '../models/ConsultantLoginInfo'; import _ from 'lodash'; import { UserSetting } from '../models/account.model'; -import { Consultant } from '~/assets/ts/models/consultant.model'; +import { Consultant } from '~/shared/models/consultant.model'; import { http } from '../services/httpClient'; import { FastQueryParams } from '../models/quickFilter.model'; diff --git a/PAMapp/shared/models/enum/Role.ts b/PAMapp/shared/models/enum/Role.ts index acae4db..1b2823c 100644 --- a/PAMapp/shared/models/enum/Role.ts +++ b/PAMapp/shared/models/enum/Role.ts @@ -1,5 +1,5 @@ export enum Role{ - ADMIN = 'admin', - USER = 'user', + ADMIN = 'admin', + USER = 'user', NOT_LOGIN = '' -} \ No newline at end of file +} diff --git a/PAMapp/shared/services/my-consultant.service.ts b/PAMapp/shared/services/my-consultant.service.ts index c27a41d..1b97fed 100644 --- a/PAMapp/shared/services/my-consultant.service.ts +++ b/PAMapp/shared/services/my-consultant.service.ts @@ -1,6 +1,6 @@ import { http } from "./httpClient"; -import { AgentInfo } from '~/assets/ts/models/agent-info.model'; +import { AgentInfo } from '~/shared/models/agent-info.model'; import { Consultant } from "../models/consultant.model"; class MyConsultantService { diff --git a/PAMapp/shared/services/pamService.service.ts b/PAMapp/shared/services/pamService.service.ts deleted file mode 100644 index e89d07e..0000000 --- a/PAMapp/shared/services/pamService.service.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { AxiosResponse } from 'axios'; -import { http } from "./httpClient"; -import { editAppointmentParams } from '../models/editAppointmentParams.model'; -import { AppointmentDetail } from '../models/AppointmentDetail'; -import { UserSetting } from '../models/account.model'; -import { FastQueryParams } from '../models/quickFilter.model'; -import { Consultant } from '../models/consultant.model'; -import { StrictQueryParams } from '../models/strictQueryParams'; -import { AppointmentParams } from '../models/appointmentParams'; -import { UserReviewsConsultantsParams } from '../models/UserReviewsConsultantsParams'; -import { AgentOfStrictQuery } from '../models/agentOfStrictQuery'; -import _ from "lodash"; - - - - -class PamService { - constructor() {} - - /** ��靽憿批�� **/ - recommend():Promise<AxiosResponse<Consultant[]>>{ - return http.get('/consultant/recommend'); - } - - /** 敹恍�祟� **/ - fastQuery(data: FastQueryParams):Promise<AxiosResponse<Consultant[]>>{ - return http.post('/consultant/fastQuery', data) - } - - /** ������ **/ - strictQuery(data:StrictQueryParams):Promise<AxiosResponse<AgentOfStrictQuery[]>>{ - return http.post('/consultant/strictQuery', data) - } - - /** ��憿批�� **/ - addFavoriteConsultant(agentNoList: string[]):Promise<AxiosResponse<any>>{ - return http.post('/consultant/favorite', {agentNoList}) - } - - /** ����岷��� **/ - appointmentDemand(data: AppointmentParams):Promise<AxiosResponse<any>> { - return http.post('/appointment/customer/create', data) - } - - /** 憿批�底蝝啗��� **/ - getConsultantDetail(agentNo:string):Promise<AxiosResponse<any>>{ - return http.get('/consultant/detail', {params:{agentNo:agentNo}}) - } - - /** 蝘駁憿批�� **/ - deleteConsultant(agentId: string):Promise<AxiosResponse<any>>{ - return http.delete('/consultant/favorite/'+agentId); - } - - - - /** �����蝝啁� **/ - getAppointmentDetail(apointmentId: number):Promise<AxiosResponse<AppointmentDetail>> { - return http.get('/appointment/getDetail/'+apointmentId) - } - - /** ���蝙��董����� **/ - getUserAccountSetting():Promise<AxiosResponse<UserSetting>>{ - return http.get<UserSetting>('/customer/info'); - } - - /** ��雿輻�董����� **/ - updateAccountSetting(params: any):Promise<AxiosResponse<any>> { - return http.put('/customer/info', params); - } - - //摰X�脰�遛��漲閰�� - userReviewsConsultants(data: UserReviewsConsultantsParams):Promise<AxiosResponse<any>> { - return http.post('/satisfaction/create', data); - } - - // ������ - cancelAppointment(appointment: number):Promise<AxiosResponse<any>>{ - return http.delete('/appointment/'+appointment); - } - - // 蝺刻摩���� - editAppointment(editAppointmentParams:editAppointmentParams):Promise<AxiosResponse<any>>{ - return http.put('/appointment', editAppointmentParams); - } -} - -export default new PamService(); - - diff --git a/PAMapp/store/localStorage.ts b/PAMapp/store/localStorage.ts index 8cde46e..70f3fa2 100644 --- a/PAMapp/store/localStorage.ts +++ b/PAMapp/store/localStorage.ts @@ -1,5 +1,5 @@ import { Module, Mutation, VuexModule ,Action } from 'vuex-module-decorators'; -import { Role } from '~/shared/models/enum/Role'; +import { Role } from '~/shared/models/enum/role'; import { Selected } from '~/shared/models/quickFilter.model'; @Module export default class LocalStorage extends VuexModule { -- Gitblit v1.8.0