123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- import BaseStore from '@src/stores/base';
- export default class UserStore extends BaseStore {
- locationUser(id, url) {
- this.token({ id })
- .then(token => {
- const w = window.open('about:blank');
- w.location.href = `${url}?token=${encodeURIComponent(token)}`;
- });
- }
- add(params) {
- return this.apiPost('/user/add', params);
- }
- list(params) {
- return this.apiGet('/user/list', params);
- }
- listStudent(params) {
- return this.apiGet('/user/student/list', params);
- }
- token(params) {
- return this.apiGet('/user/token', params);
- }
- get(params) {
- return this.apiGet('/user/detail', params);
- }
- addMoney(params) {
- return this.apiPost('/user/money/add', params);
- }
- frozen(params) {
- return this.apiPost('/user/frozen', params);
- }
- noFrozen(params) {
- return this.apiPost('/user/nofrozen', params);
- }
- real(params) {
- return this.apiPost('/user/real', params);
- }
- listFeedbackError(params) {
- return this.apiGet('/user/feedback_error/list', params);
- }
- editFeedbackError(params) {
- return this.apiPut('/user/feedback_error/edit', params);
- }
- getFeedbackError(params) {
- return this.apiGet('/user/feedback_error/detail', params);
- }
- listTextbookFeedback(params) {
- return this.apiGet('/user/textbook_feedback/list', params);
- }
- editTextbookFeedback(params) {
- return this.apiPut('/user/textbook_feedback/edit', params);
- }
- getTextbookFeedback(params) {
- return this.apiGet('/user/textbook_feedback/detail', params);
- }
- listReadyRoomFeedback(params) {
- return this.apiGet('/user/ready_room_feedback/list', params);
- }
- editReadyRoomFeedback(params) {
- return this.apiPut('/user/ready_room_feedback/edit', params);
- }
- getReadyRoomFeedback(params) {
- return this.apiGet('/user/ready_room_feedback/detail', params);
- }
- listService(params) {
- return this.apiGet('/user/service/list', params);
- }
- addService(params) {
- return this.apiPost('/user/service/add', params);
- }
- addData(params) {
- return this.apiPost('/user/data/add', params);
- }
- validMobile(params) {
- return this.apiGet('/user/valid/mobile', params);
- }
- allCourseRecord(params) {
- return this.apiGet('/user/course/record/all', params);
- }
- listCourseAppointment(params) {
- return this.apiGet('/user/course/appointment/list', params);
- }
- addCourseAppointment(params) {
- return this.apiPost('/user/course/appointment/add', params);
- }
- editCourseAppointment(params) {
- return this.apiPut('/user/course/appointment/edit', params);
- }
- getCourseAppointment(params) {
- return this.apiGet('/user/course/appointment/detail', params);
- }
- delCourseAppointment(params) {
- return this.apiDel('/user/course/appointment/delete', params);
- }
- allCourseAppointmentComment(params) {
- return this.apiGet('/user/course/appointment/comment/all', params);
- }
- addCourseAppointmentComment(params) {
- return this.apiPost('/user/course/appointment/comment/add', params);
- }
- editCourseAppointmentComment(params) {
- return this.apiPut('/user/course/appointment/comment/edit', params);
- }
- delCourseAppointmentComment(params) {
- return this.apiDel('/user/course/appointment/comment/delete', params);
- }
- listInvoice(params) {
- return this.apiGet('/user/invoice/list', params);
- }
- finishInvoice(params) {
- return this.apiPut('/user/invoice/finish', params);
- }
- downloadInvoice(params) {
- return this.apiPut('/user/invoice/download', params);
- }
- getOrder(params) {
- return this.apiGet('/user/order/detail', params);
- }
- listOrder(params) {
- return this.apiGet('/user/order/list', params);
- }
- finishOrder(params) {
- return this.apiPut('/user/order/finish', params);
- }
- stopRecord(params) {
- return this.apiPut('/user/record/stop', params);
- }
- listRecord(params) {
- return this.apiGet('/user/record/list', params);
- }
- listAbnormal(params) {
- return this.apiGet('/user/abnormal/list', params);
- }
- getAbnormal(params) {
- return this.apiGet('/user/abnormal/detail', params);
- }
- handleAbnormal(params) {
- return this.apiPost('/user/abnormal/handler', params);
- }
- }
- export const User = new UserStore({ key: 'users' });
|