sentence.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import BaseStore from '@src/stores/base';
  2. export default class SentenceStore extends BaseStore {
  3. getStruct() {
  4. return this.apiGet('/setting/sentence');
  5. }
  6. setStruct(params) {
  7. return this.apiPut('/setting/sentence', params);
  8. }
  9. listArticle(params) {
  10. return this.apiGet('/sentence/article/list', params);
  11. }
  12. getArticle(params) {
  13. return this.apiGet('/sentence/article/detail', params);
  14. }
  15. addArticle(params) {
  16. return this.apiPost('/sentence/article/add', params);
  17. }
  18. editArticle(params) {
  19. return this.apiPut('/sentence/article/edit', params);
  20. }
  21. delArticle(params) {
  22. return this.apiDel('/sentence/article/delete', params);
  23. }
  24. searchQuestion(params) {
  25. return this.apiGet('/sentence/question/search', params);
  26. }
  27. listQuestion(params) {
  28. return this.apiGet('/sentence/question/list', params);
  29. }
  30. getQuestion(params) {
  31. return this.apiGet('/sentence/question/detail', params);
  32. }
  33. addQuestion(params) {
  34. return this.apiPost('/sentence/question/add', params);
  35. }
  36. editQuestion(params) {
  37. return this.apiPut('/sentence/question/edit', params);
  38. }
  39. delQuestion(params) {
  40. return this.apiDel('/sentence/question/delete', params);
  41. }
  42. auto() {
  43. return this.apiPost('/sentence/paper/auto');
  44. }
  45. autoStatus() {
  46. return this.apiGet('/sentence/paper/auto');
  47. }
  48. }
  49. export const Sentence = new SentenceStore({ key: 'sentence' });