ready.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. import BaseStore from '@src/stores/base';
  2. export default class ReadyStore extends BaseStore {
  3. getReadyRead() {
  4. return this.apiGet('/setting/ready_read');
  5. }
  6. setReadyRead(params) {
  7. return this.apiPut('/setting/ready_read', params);
  8. }
  9. allCategory(params) {
  10. return this.apiGet('/ready/category/all', params);
  11. }
  12. editCategory(params) {
  13. return this.apiPut('/ready/category/edit', params);
  14. }
  15. deleteCategory(params) {
  16. return this.apiDel('/ready/category/delete', params);
  17. }
  18. listArticle(params) {
  19. return this.apiGet('/ready/article/list', params);
  20. }
  21. addArticle(params) {
  22. return this.apiPost('/ready/article/add', params);
  23. }
  24. editArticle(params) {
  25. return this.apiPut('/ready/article/edit', params);
  26. }
  27. delArticle(params) {
  28. return this.apiDel('/ready/article/delete', params);
  29. }
  30. getArticle(params) {
  31. return this.apiGet('/ready/article/detail', params);
  32. }
  33. allArea(params) {
  34. return this.apiGet('/ready/area/all', params);
  35. }
  36. listRoom(params) {
  37. return this.apiGet('/ready/room/list', params);
  38. }
  39. addRoom(params) {
  40. return this.apiPost('/ready/room/add', params);
  41. }
  42. editRoom(params) {
  43. return this.apiPut('/ready/room/edit', params);
  44. }
  45. delRoom(params) {
  46. return this.apiDel('/ready/room/delete', params);
  47. }
  48. getRoom(params) {
  49. return this.apiGet('/ready/room/detail', params);
  50. }
  51. listRead(params) {
  52. return this.apiGet('/ready/read/list', params);
  53. }
  54. addRead(params) {
  55. return this.apiPost('/ready/read/add', params);
  56. }
  57. editRead(params) {
  58. return this.apiPut('/ready/read/edit', params);
  59. }
  60. delRead(params) {
  61. return this.apiDel('/ready/read/delete', params);
  62. }
  63. getRead(params) {
  64. return this.apiGet('/ready/read/detail', params);
  65. }
  66. listData(params) {
  67. return this.apiGet('/ready/data/list', params);
  68. }
  69. addData(params) {
  70. return this.apiPost('/ready/data/add', params);
  71. }
  72. editData(params) {
  73. return this.apiPut('/ready/data/edit', params);
  74. }
  75. delData(params) {
  76. return this.apiDel('/ready/data/delete', params);
  77. }
  78. getData(params) {
  79. return this.apiGet('/ready/data/detail', params);
  80. }
  81. }
  82. export const Ready = new ReadyStore({ key: 'ready' });