From f2fe7c2bacd26cde387d4d3a17ce6161dd189e26 Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期一, 06 十二月 2021 12:39:24 +0800 Subject: [PATCH] Merge branch 'master' of https://192.168.0.10:8443/r/pcalife/PAM --- PAMapp/store/index.ts | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/PAMapp/store/index.ts b/PAMapp/store/index.ts index 1f7af2a..4fe433a 100644 --- a/PAMapp/store/index.ts +++ b/PAMapp/store/index.ts @@ -1,8 +1,10 @@ import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators' -import { allAppointmentsView, ClientInfo, getMyAppointmentList } from '~/assets/ts/api/appointment'; +import { ClientInfo, getMyAppointmentList, getMyReviewLog, allAppointmentsView } from '~/assets/ts/api/appointment'; // import * as consultant from '~/assets/ts/api/consultant'; -import { Consultants,recommend,AgentOfStrictQuery, getFavoriteConsultant, addFavoriteConsultant, deleteConsultant, strictQuery } from '~/assets/ts/api/consultant'; +import { recommend, AgentOfStrictQuery, getFavoriteConsultant, addFavoriteConsultant, deleteConsultant, strictQuery } from '~/assets/ts/api/consultant'; +import { Consultants } from '~/assets/ts/models/consultant.model'; import { isLogin } from '~/assets/ts/auth'; +import { AppointmentLog } from '~/assets/ts/models/appointment.model'; import { getFavoriteFromStorage, setFavoriteToStorage } from '~/assets/ts/storageConsultant'; @Module @@ -12,6 +14,8 @@ myConsultantList: Consultants[] = []; myAppointmentList: ClientInfo[] = []; + + myAppointmentReviewLogList: AppointmentLog[] = []; @Mutation updateRecommend(data: Consultants[]) { this.recommendList = data; @@ -27,6 +31,10 @@ @Mutation updateMyAppointmentList(data: ClientInfo[]) { this.myAppointmentList = data; + } + + @Mutation updateMyAppointmentReviewLog(data: AppointmentLog[]) { + this.myAppointmentReviewLogList = data; } @Action storeRecommendList() { @@ -104,6 +112,13 @@ }); } + @Action + storeMyAppointmentReviewLog() { + getMyReviewLog().then((data) => { + this.context.commit('updateMyAppointmentReviewLog', data); + }); + } + @Action updateMyAppointment(myAppointment: ClientInfo) { const data = this.myAppointmentList.filter(item => item.id !== myAppointment.id); data.unshift(myAppointment); -- Gitblit v1.8.0