getApiRes.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. import axios from 'axios';
  2. import global from '../Global.js'
  3. // 基础方法进行封装
  4. function getApiBasic(url, postdata) {
  5. return axios.post(url, postdata).then(function (data) {
  6. let json = data.data;
  7. return json
  8. }, function (response) {
  9. console.info(response);
  10. })
  11. }
  12. // 调用的api改写成方法
  13. export function worldDetail(postdata) {
  14. let url = headapi + 'worldDetail';
  15. return getApiBasic(url, postdata);
  16. }
  17. export function editbasicinfo(postdata) {
  18. let url = headapi + 'editbasicinfo';
  19. return getApiBasic(url, postdata);
  20. }
  21. export function modPwd(postdata) {
  22. let url = headapi + 'modPwd';
  23. return getApiBasic(url, postdata);
  24. }
  25. export function logout(postdata) {
  26. let url = headapi + 'logout';
  27. return getApiBasic(url, postdata);
  28. }
  29. // 调用的api改写成方法
  30. export function testTable(postdata) {
  31. let url = headapi + 'testTable';
  32. return getApiBasic(url, postdata);
  33. }
  34. export function testTableLong(postdata) {
  35. let url = headapi + 'testTableLong';
  36. return getApiBasic(url, postdata);
  37. }
  38. export function testSelect(postdata) {
  39. let url = headapi + 'testSelect';
  40. return getApiBasic(url, postdata);
  41. }
  42. // Auth
  43. // 获取验证图片
  44. export function GenVerifyPic(postdata) {
  45. let url = headapi + 'v1/Auth/GenVerifyPic';
  46. return getApiBasic(url, postdata);
  47. }
  48. // 修改密码 √
  49. export function PassEdit(postdata) {
  50. let url = headapi + 'v1/Auth/PassEdit';
  51. return getApiBasic(url, postdata);
  52. }
  53. // 用户登录 √
  54. export function SignIn(postdata) {
  55. let url = headapi + 'v1/Auth/SignIn';
  56. return getApiBasic(url, postdata);
  57. }
  58. // 用户退出
  59. export function SignOut(postdata) {
  60. let url = headapi + 'v1/Auth/SignOut';
  61. return getApiBasic(url, postdata);
  62. }
  63. // 用户添加
  64. export function SignUp(postdata) {
  65. let url = headapi + 'v1/Auth/SignUp';
  66. return getApiBasic(url, postdata);
  67. }
  68. // 用户微信登录
  69. export function WXSignIn(postdata) {
  70. let url = headapi + 'v1/Auth/WXSignIn';
  71. return getApiBasic(url, postdata);
  72. }
  73. // class
  74. // √ 课程添加
  75. export function ClassAdd(postdata) {
  76. let url = headapi + 'v1/Class/ClassAdd';
  77. return getApiBasic(url, postdata);
  78. }
  79. // 课程统计
  80. export function ClassStatistics(postdata) {
  81. let url = headapi + 'v1/Class/ClassStatistics';
  82. return getApiBasic(url, postdata);
  83. }
  84. // √ 课程颜色修改
  85. export function ClassColorEdit(postdata) {
  86. let url = headapi + 'v1/Class/ClassColorEdit';
  87. return getApiBasic(url, postdata);
  88. }
  89. // 课程单条查询
  90. export function ClassDetailOne(postdata) {
  91. let url = headapi + 'v1/Class/ClassDetailOne';
  92. return getApiBasic(url, postdata);
  93. }
  94. // √ 课程基本信息修改
  95. export function ClassEdit(postdata) {
  96. let url = headapi + 'v1/Class/ClassEdit';
  97. return getApiBasic(url, postdata);
  98. }
  99. // √ 课程列表查询
  100. export function ClassListQuery(postdata) {
  101. let url = headapi + 'v1/Class/ClassListQuery';
  102. return getApiBasic(url, postdata);
  103. }
  104. // √ 课程状态修改
  105. export function ClassStatusEdit(postdata) {
  106. let url = headapi + 'v1/Class/ClassStatusEdit';
  107. return getApiBasic(url, postdata);
  108. }
  109. // 课程会员增删
  110. export function ClassVipuserEdit(postdata) {
  111. let url = headapi + 'v1/Class/ClassVipuserEdit';
  112. return getApiBasic(url, postdata);
  113. }
  114. // 课程会员查询
  115. export function ClassVipuserQuery(postdata) {
  116. let url = headapi + 'v1/Class/ClassVipuserQuery';
  117. return getApiBasic(url, postdata);
  118. }
  119. // 课程微信可见状态修改
  120. export function ClassVisibleStatusEdit(postdata) {
  121. let url = headapi + 'v1/Class/ClassVisibleStatusEdit';
  122. return getApiBasic(url, postdata);
  123. }
  124. // order
  125. // 管理员今日预约添加
  126. export function OrderAddByManager(postdata) {
  127. let url = headapi + 'v1/Order/OrderAddByManager';
  128. return getApiBasic(url, postdata);
  129. }
  130. // 管理员今日预约取消
  131. export function OrderCancelByManager(postdata) {
  132. let url = headapi + 'v1/Order/OrderCancelByManager';
  133. return getApiBasic(url, postdata);
  134. }
  135. // 预约记录查询
  136. export function OrderListQuery(postdata) {
  137. let url = headapi + 'v1/Order/OrderListQuery';
  138. return getApiBasic(url, postdata);
  139. }
  140. // 今日预约统计
  141. export function OrderStatistics(postdata) {
  142. let url = headapi + 'v1/Order/OrderStatistics';
  143. return getApiBasic(url, postdata);
  144. }
  145. // 今日课程预约总览
  146. export function TodayClassOrderQuery(postdata) {
  147. let url = headapi + 'v1/Order/TodayClassOrderQuery';
  148. return getApiBasic(url, postdata);
  149. }
  150. // 课程预约列表
  151. export function ClassOrderQuery(postdata) {
  152. let url = headapi + 'v1/Order/ClassOrderQuery';
  153. return getApiBasic(url, postdata);
  154. }
  155. // 今日会员预约列表查询
  156. export function TodayVipOrderQuery(postdata) {
  157. let url = headapi + 'v1/Order/TodayVipOrderQuery';
  158. return getApiBasic(url, postdata);
  159. }
  160. // 会员预约列表查询
  161. export function VipUserOrderQuery(postdata) {
  162. let url = headapi + 'v1/Order/VipUserOrderQuery';
  163. return getApiBasic(url, postdata);
  164. }
  165. // SchoolTimeTable
  166. // 正在进行课程列表
  167. export function ClassOngoingList(postdata) {
  168. let url = headapi + 'v1/SchoolTimeTable/ClassOngoingList';
  169. return getApiBasic(url, postdata);
  170. }
  171. // 下课记录详情删除
  172. export function ClassOverDetailDel(postdata) {
  173. let url = headapi + 'v1/SchoolTimeTable/ClassOverDetailDel';
  174. return getApiBasic(url, postdata);
  175. }
  176. // 课程表详情微信可预约状态修改
  177. export function STTDetailWxOrderEdit(postdata) {
  178. let url = headapi + 'v1/SchoolTimeTable/STTDetailWxOrderEdit';
  179. return getApiBasic(url, postdata);
  180. }
  181. // 某日课程表查询
  182. export function ClassListByOrderDate(postdata) {
  183. let url = headapi + 'v1/SchoolTimeTable/ClassListByOrderDate';
  184. return getApiBasic(url, postdata);
  185. }
  186. // 确认下课
  187. export function ClassOverConfirm(postdata) {
  188. let url = headapi + 'v1/SchoolTimeTable/ClassOverConfirm';
  189. return getApiBasic(url, postdata);
  190. }
  191. // 下课记录详情添加
  192. export function ClassOverDetailAdd(postdata) {
  193. let url = headapi + 'v1/SchoolTimeTable/ClassOverDetailAdd';
  194. return getApiBasic(url, postdata);
  195. }
  196. // 下课记录详情列表
  197. export function ClassOverDetailListQuery(postdata) {
  198. let url = headapi + 'v1/SchoolTimeTable/ClassOverDetailListQuery';
  199. return getApiBasic(url, postdata);
  200. }
  201. // 下课记录详情状态修改
  202. export function ClassOverDetailStatusEdit(postdata) {
  203. let url = headapi + 'v1/SchoolTimeTable/ClassOverDetailStatusEdit';
  204. return getApiBasic(url, postdata);
  205. }
  206. // 待下课课程列表
  207. export function ClassOverPrepare(postdata) {
  208. let url = headapi + 'v1/SchoolTimeTable/ClassOverPrepare';
  209. return getApiBasic(url, postdata);
  210. }
  211. // 下课准备
  212. export function ClassPreFinishListQuery(postdata) {
  213. let url = headapi + 'v1/SchoolTimeTable/ClassPreFinishListQuery';
  214. return getApiBasic(url, postdata);
  215. }
  216. // 课程表基本信息添加
  217. export function STTBasicAdd(postdata) {
  218. let url = headapi + 'v1/SchoolTimeTable/STTBasicAdd';
  219. return getApiBasic(url, postdata);
  220. }
  221. // 课程表基本信息修改
  222. export function STTBasicEdit(postdata) {
  223. let url = headapi + 'v1/SchoolTimeTable/STTBasicEdit';
  224. return getApiBasic(url, postdata);
  225. }
  226. // 课程表基本列表查询
  227. export function STTBasicListQuery(postdata) {
  228. let url = headapi + 'v1/SchoolTimeTable/STTBasicListQuery';
  229. return getApiBasic(url, postdata);
  230. }
  231. // 课程表上下线状态修改
  232. export function STTBasicOfflineEdit(postdata) {
  233. let url = headapi + 'v1/SchoolTimeTable/STTBasicOfflineEdit';
  234. return getApiBasic(url, postdata);
  235. }
  236. // 课程表状态修改
  237. export function STTBasicStatusEdit(postdata) {
  238. let url = headapi + 'v1/SchoolTimeTable/STTBasicStatusEdit';
  239. return getApiBasic(url, postdata);
  240. }
  241. // 课程表详情批量保存
  242. export function STTDetailBatchSave(postdata) {
  243. let url = headapi + 'v1/SchoolTimeTable/STTDetailBatchSave';
  244. return getApiBasic(url, postdata);
  245. }
  246. // 课程表详情列表查询
  247. export function STTDetailListQuery(postdata) {
  248. let url = headapi + 'v1/SchoolTimeTable/STTDetailListQuery';
  249. return getApiBasic(url, postdata);
  250. }
  251. // 复制课程表
  252. export function SchoolTimeTableCopy(postdata) {
  253. let url = headapi + 'v1/SchoolTimeTable/SchoolTimeTableCopy';
  254. return getApiBasic(url, postdata);
  255. }
  256. // 今日未上课课程列表查询
  257. export function WaitingBeginClassList(postdata) {
  258. let url = headapi + 'v1/SchoolTimeTable/WaitingBeginClassList';
  259. return getApiBasic(url, postdata);
  260. }
  261. // shop
  262. // √ 店铺添加
  263. export function ShopAdd(postdata) {
  264. let url = headapi + 'v1/Shop/ShopAdd';
  265. return getApiBasic(url, postdata);
  266. }
  267. // 店铺微信预约状态修改
  268. export function ShopWxStatusEdit(postdata) {
  269. let url = headapi + 'v1/Shop/ShopWxStatusEdit';
  270. return getApiBasic(url, postdata);
  271. }
  272. // 店铺单条查询
  273. export function ShopDetailOne(postdata) {
  274. let url = headapi + 'v1/Shop/ShopDetailOne';
  275. return getApiBasic(url, postdata);
  276. }
  277. // √ 店铺详情查询
  278. export function ShopDetailQuery(postdata) {
  279. let url = headapi + 'v1/User/ShopDetailQuery';
  280. return getApiBasic(url, postdata);
  281. }
  282. // 操作日志列表查询
  283. export function OptLogListQuery(postdata) {
  284. let url = headapi + 'v1/User/OptLogListQuery';
  285. return getApiBasic(url, postdata);
  286. }
  287. // 店铺修改
  288. export function ShopEdit(postdata) {
  289. let url = headapi + 'v1/Shop/ShopEdit';
  290. return getApiBasic(url, postdata);
  291. }
  292. // 店铺列表查询
  293. export function ShopListQuery(postdata) {
  294. let url = headapi + 'v1/Shop/ShopListQuery';
  295. return getApiBasic(url, postdata);
  296. }
  297. // 店铺状态修改
  298. export function ShopStatusEdit(postdata) {
  299. let url = headapi + 'v1/Shop/ShopStatusEdit';
  300. return getApiBasic(url, postdata);
  301. }
  302. // SttPlan
  303. // 课程表模板基本信息添加
  304. export function SttPlanBasicAdd(postdata) {
  305. let url = headapi + 'v1/SttPlan/SttPlanBasicAdd';
  306. return getApiBasic(url, postdata);
  307. }
  308. // 课程表模板基本信息修改
  309. export function SttPlanBasicEdit(postdata) {
  310. let url = headapi + 'v1/SttPlan/SttPlanBasicEdit';
  311. return getApiBasic(url, postdata);
  312. }
  313. // 课程表模板基本信息列表查询
  314. export function SttPlanBasicListQuery(postdata) {
  315. let url = headapi + 'v1/SttPlan/SttPlanBasicListQuery';
  316. return getApiBasic(url, postdata);
  317. }
  318. // 课程表模板店铺通用修改
  319. export function SttPlanBasicShopEdit(postdata) {
  320. let url = headapi + 'v1/SttPlan/SttPlanBasicShopEdit';
  321. return getApiBasic(url, postdata);
  322. }
  323. // 课程表模板复制
  324. export function SttPlanCopy(postdata) {
  325. let url = headapi + 'v1/SttPlan/SttPlanCopy';
  326. return getApiBasic(url, postdata);
  327. }
  328. // 课程表模板基本信息状态修改
  329. export function SttPlanBasicStatusEdit(postdata) {
  330. let url = headapi + 'v1/SttPlan/SttPlanBasicStatusEdit';
  331. return getApiBasic(url, postdata);
  332. }
  333. // 课程表模板详情列表查询
  334. export function SttPlanDetailListQuery(postdata) {
  335. let url = headapi + 'v1/SttPlan/SttPlanDetailListQuery';
  336. return getApiBasic(url, postdata);
  337. }
  338. // 课程表模板发布
  339. export function SttPlanPublish(postdata) {
  340. let url = headapi + 'v1/SttPlan/SttPlanPublish';
  341. return getApiBasic(url, postdata);
  342. }
  343. // 课程表模板详情批量保存
  344. export function SttPlanDetailBatchSave(postdata) {
  345. let url = headapi + 'v1/SttPlan/SttPlanDetailBatchSave';
  346. return getApiBasic(url, postdata);
  347. }
  348. // teacher
  349. // 教练信息添加 √
  350. export function TeacherAdd(postdata) {
  351. let url = headapi + 'v1/Teacher/TeacherAdd';
  352. return getApiBasic(url, postdata);
  353. }
  354. // 教练信息修改 √
  355. export function TeacherEdit(postdata) {
  356. let url = headapi + 'v1/Teacher/TeacherEdit';
  357. return getApiBasic(url, postdata);
  358. }
  359. // 教练信息列表查询 √
  360. export function TeacherListQuery(postdata) {
  361. let url = headapi + 'v1/Teacher/TeacherListQuery';
  362. return getApiBasic(url, postdata);
  363. }
  364. // 教练状态修改 √
  365. export function TeacherStatusEdit(postdata) {
  366. let url = headapi + 'v1/Teacher/TeacherStatusEdit';
  367. return getApiBasic(url, postdata);
  368. }
  369. // User
  370. // √
  371. export function ManagerSelfQuery(postdata) {
  372. let url = headapi + 'v1/User/ManagerSelfQuery';
  373. return getApiBasic(url, postdata);
  374. }
  375. // √ 店铺管理员添加
  376. export function ShopManagerAdd(postdata) {
  377. let url = headapi + 'v1/User/ShopManagerAdd';
  378. return getApiBasic(url, postdata);
  379. }
  380. // 店铺管理员修改
  381. export function ShopManagerEdit(postdata) {
  382. let url = headapi + 'v1/User/ShopManagerEdit';
  383. return getApiBasic(url, postdata);
  384. }
  385. // 店铺管理员列表查询
  386. export function ShopManagerListQuery(postdata) {
  387. let url = headapi + 'v1/User/ShopManagerListQuery';
  388. return getApiBasic(url, postdata);
  389. }
  390. // 店铺管理员状态修改
  391. export function ShopManagerStatusEdit(postdata) {
  392. let url = headapi + 'v1/User/ShopManagerStatusEdit';
  393. return getApiBasic(url, postdata);
  394. }
  395. // 会员用户课时调整
  396. export function VipUserHourEdit(postdata) {
  397. let url = headapi + 'v1/User/VipUserHourEdit';
  398. return getApiBasic(url, postdata);
  399. }
  400. // 会员统计
  401. export function VipUserStatistics(postdata) {
  402. let url = headapi + 'v1/User/VipUserStatistics';
  403. return getApiBasic(url, postdata);
  404. }
  405. // 会员课程增删
  406. export function VipUserClassEdit(postdata) {
  407. let url = headapi + 'v1/User/VipUserClassEdit';
  408. return getApiBasic(url, postdata);
  409. }
  410. // 会员有效期调整
  411. export function VipUserExpEdit(postdata) {
  412. let url = headapi + 'v1/User/VipUserExpEdit';
  413. return getApiBasic(url, postdata);
  414. }
  415. // 会员用户添加
  416. export function VipUserAdd(postdata) {
  417. let url = headapi + 'v1/User/VipUserAdd ';
  418. return getApiBasic(url, postdata);
  419. }
  420. // 会员用户基本信息修改
  421. export function VipUserEdit(postdata) {
  422. let url = headapi + 'v1/User/VipUserEdit ';
  423. return getApiBasic(url, postdata);
  424. }
  425. // 会员消费记录查询
  426. export function VipUserConsumeListQuery(postdata) {
  427. let url = headapi + 'v1/User/VipUserConsumeListQuery ';
  428. return getApiBasic(url, postdata);
  429. }
  430. // 会员用户列表
  431. export function VipUserListQuery(postdata) {
  432. let url = headapi + 'v1/User/VipUserListQuery';
  433. return getApiBasic(url, postdata);
  434. }
  435. // 会员用户基本信息查询
  436. export function VipUserSimpleQuery(postdata) {
  437. let url = headapi + 'v1/User/VipUserSimpleQuery ';
  438. return getApiBasic(url, postdata);
  439. }
  440. // 会员用户状态修改
  441. export function VipUserStatusEdit(postdata) {
  442. let url = headapi + 'v1/User/VipUserStatusEdit ';
  443. return getApiBasic(url, postdata);
  444. }