system.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. import BaseStore from '@src/stores/base';
  2. export default class SystemStore extends BaseStore {
  3. listManager(params) {
  4. return this.apiGet('/manager/list', params);
  5. }
  6. addManager(params) {
  7. return this.apiPost('/manager/add', params);
  8. }
  9. getManager(params) {
  10. return this.apiGet('/manager/detail', params);
  11. }
  12. putManager(params) {
  13. return this.apiPut('/manager/edit', params);
  14. }
  15. delManager(params) {
  16. return this.apiDel('/manager/delete', params);
  17. }
  18. getIndex() {
  19. return this.apiGet('/setting/index');
  20. }
  21. setIndex(params) {
  22. return this.apiPut('/setting/index', params);
  23. }
  24. getBase() {
  25. return this.apiGet('/setting/base');
  26. }
  27. setBase(params) {
  28. return this.apiPut('/setting/base', params);
  29. }
  30. getPlace() {
  31. return this.apiGet('/setting/place');
  32. }
  33. setPlace(params) {
  34. return this.apiPut('/setting/place', params);
  35. }
  36. getSentence() {
  37. return this.apiGet('/setting/sentence');
  38. }
  39. setSentence(params) {
  40. return this.apiPut('/setting/sentence', params);
  41. }
  42. getFilterTime() {
  43. return this.apiGet('/setting/filter_time');
  44. }
  45. setFilterTime(params) {
  46. return this.apiPut('/setting/filter_time', params);
  47. }
  48. getExercisePaperAuto() {
  49. return this.apiGet('/setting/exercise_paper_auto');
  50. }
  51. setExercisePaperAuto(params) {
  52. return this.apiPut('/setting/exercise_paper_auto', params);
  53. }
  54. getExerciseTime() {
  55. return this.apiGet('/setting/exercise_time');
  56. }
  57. setExerciseTime(params) {
  58. return this.apiPut('/setting/exercise_time', params);
  59. }
  60. getSentenceTime() {
  61. return this.apiGet('/setting/sentence_time');
  62. }
  63. setSentenceTime(params) {
  64. return this.apiPut('/setting/sentence_time', params);
  65. }
  66. getTextbookTime() {
  67. return this.apiGet('/setting/textbook_time');
  68. }
  69. setTextbookTime(params) {
  70. return this.apiPut('/setting/textbook_time', params);
  71. }
  72. getTextbookConfig() {
  73. return this.apiGet('/setting/textbook_config');
  74. }
  75. setTextbookConfig(params) {
  76. return this.apiPut('/setting/textbook_config', params);
  77. }
  78. getExaminationTime() {
  79. return this.apiGet('/setting/examination_time');
  80. }
  81. setExaminationTime(params) {
  82. return this.apiPut('/setting/examination_time', params);
  83. }
  84. getScoreSwitch() {
  85. return this.apiGet('/setting/score_switch');
  86. }
  87. setScoreSwitch(params) {
  88. return this.apiPut('/setting/score_switch', params);
  89. }
  90. getServiceVip() {
  91. return this.apiGet('/setting/service_vip');
  92. }
  93. setServiceVip(params) {
  94. return this.apiPut('/setting/service_vip', params);
  95. }
  96. getServiceTextbook() {
  97. return this.apiGet('/setting/service_textbook');
  98. }
  99. setServiceTextbook(params) {
  100. return this.apiPut('/setting/service_textbook', params);
  101. }
  102. getServiceQxCat() {
  103. return this.apiGet('/setting/service_qx_cat');
  104. }
  105. setServiceQxCat(params) {
  106. return this.apiPut('/setting/service_qx_cat', params);
  107. }
  108. getCourseIndex() {
  109. return this.apiGet('/setting/course_index');
  110. }
  111. setCourseIndex(params) {
  112. return this.apiPut('/setting/course_index', params);
  113. }
  114. getPromote() {
  115. return this.apiGet('/setting/promote');
  116. }
  117. setPromote(params) {
  118. return this.apiPut('/setting/promote', params);
  119. }
  120. getExperienceInfo() {
  121. return this.apiGet('/setting/experience_info');
  122. }
  123. setExperienceInfo(params) {
  124. return this.apiPut('/setting/experience_info', params);
  125. }
  126. getWechatInfo() {
  127. return this.apiGet('/setting/wechat_info');
  128. }
  129. setWechatInfo(params) {
  130. return this.apiPut('/setting/wechat_info', params);
  131. }
  132. getTips() {
  133. return this.apiGet('/setting/tips');
  134. }
  135. setTips(params) {
  136. return this.apiPut('/setting/tips', params);
  137. }
  138. getPrepareInfo() {
  139. return this.apiGet('/setting/prepare_info');
  140. }
  141. setPrepareInfo(params) {
  142. return this.apiPut('/setting/prepare_info', params);
  143. }
  144. getSentenceInfo() {
  145. return this.apiGet('/setting/sentence_info');
  146. }
  147. setSentenceInfo(params) {
  148. return this.apiPut('/setting/sentence_info', params);
  149. }
  150. allContract(params) {
  151. return this.apiGet('/setting/contract/all', params);
  152. }
  153. getContract(params) {
  154. return this.apiGet('/setting/contract/detail', params);
  155. }
  156. setContract(params) {
  157. return this.apiPut('/setting/contract/edit', params);
  158. }
  159. listRank(params) {
  160. return this.apiGet('/setting/rank/list', params);
  161. }
  162. addRank(params) {
  163. return this.apiPost('/setting/rank/add', params);
  164. }
  165. editRank(params) {
  166. return this.apiPut('/setting/rank/edit', params);
  167. }
  168. delRank(params) {
  169. return this.apiDel('/setting/rank/delete', params);
  170. }
  171. importRank(params) {
  172. return this.apiForm('/setting/rank/import', params);
  173. }
  174. listComment(params) {
  175. return this.apiGet('/setting/comment/list', params);
  176. }
  177. addComment(params) {
  178. return this.apiPost('/setting/comment/add', params);
  179. }
  180. editComment(params) {
  181. return this.apiPut('/setting/comment/edit', params);
  182. }
  183. orderComment(params) {
  184. return this.apiPut('/setting/comment/order', params);
  185. }
  186. delComment(params) {
  187. return this.apiDel('/setting/comment/delete', params);
  188. }
  189. listFAQ(params) {
  190. return this.apiGet('/setting/faq/list', params);
  191. }
  192. addFAQ(params) {
  193. return this.apiPost('/setting/faq/add', params);
  194. }
  195. editFAQ(params) {
  196. return this.apiPut('/setting/faq/edit', params);
  197. }
  198. orderFAQ(params) {
  199. return this.apiPut('/setting/faq/order', params);
  200. }
  201. delFAQ(params) {
  202. return this.apiDel('/setting/faq/delete', params);
  203. }
  204. listMessage(params) {
  205. return this.apiGet('/setting/message/list', params);
  206. }
  207. getMessage(params) {
  208. return this.apiGet('/setting/message/detail', params);
  209. }
  210. addMessage(params) {
  211. return this.apiPost('/setting/message/add', params);
  212. }
  213. editMessage(params) {
  214. return this.apiPut('/setting/message/edit', params);
  215. }
  216. delMessage(params) {
  217. return this.apiDel('/setting/message/delete', params);
  218. }
  219. listAd(params) {
  220. return this.apiGet('/setting/ad/list', params);
  221. }
  222. addAd(params) {
  223. return this.apiPost('/setting/ad/add', params);
  224. }
  225. editAd(params) {
  226. return this.apiPut('/setting/ad/edit', params);
  227. }
  228. delAd(params) {
  229. return this.apiDel('/setting/ad/delete', params);
  230. }
  231. getAd(params) {
  232. return this.apiGet('/setting/ad/detail', params);
  233. }
  234. uploadImage(file) {
  235. return this.apiForm('/common/upload/image', { file });
  236. }
  237. uploadVideo(file) {
  238. return this.apiForm('/common/upload/video', { file }, { time: 1 * 3600 * 1000 });
  239. }
  240. }
  241. export const System = new SystemStore({ key: 'system' });