getApiRes.js 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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 ClassColorEdit(postdata) {
  81. let url = headapi + '/v1/Class/ClassColorEdit';
  82. return getApiBasic(url, postdata);
  83. }
  84. // 课程单条查询
  85. export function ClassDetailOne(postdata) {
  86. let url = headapi + '/v1/Class/ClassDetailOne';
  87. return getApiBasic(url, postdata);
  88. }// √ 课程基本信息修改
  89. export function ClassEdit(postdata) {
  90. let url = headapi + '/v1/Class/ClassEdit';
  91. return getApiBasic(url, postdata);
  92. }
  93. // √ 课程列表查询
  94. export function ClassListQuery(postdata) {
  95. let url = headapi + '/v1/Class/ClassListQuery';
  96. return getApiBasic(url, postdata);
  97. }
  98. // √ 课程状态修改
  99. export function ClassStatusEdit(postdata) {
  100. let url = headapi + '/v1/Class/ClassStatusEdit';
  101. return getApiBasic(url, postdata);
  102. }
  103. // 课程会员增删
  104. export function ClassVipuserEdit(postdata) {
  105. let url = headapi + '/v1/Class/ClassVipuserEdit';
  106. return getApiBasic(url, postdata);
  107. }
  108. // 课程会员查询
  109. export function ClassVipuserQuery(postdata) {
  110. let url = headapi + '/v1/Class/ClassVipuserQuery';
  111. return getApiBasic(url, postdata);
  112. }
  113. // 课程微信可见状态修改
  114. export function ClassVisibleStatusEdit(postdata) {
  115. let url = headapi + '/v1/Class/ClassVisibleStatusEdit';
  116. return getApiBasic(url, postdata);
  117. }
  118. // shop
  119. // √ 店铺添加
  120. export function ShopAdd(postdata) {
  121. let url = headapi + '/v1/Shop/ShopAdd';
  122. return getApiBasic(url, postdata);
  123. }
  124. // √ 店铺详情查询
  125. export function ShopDetailQuery(postdata) {
  126. let url = headapi + '/v1/User/ShopDetailQuery';
  127. return getApiBasic(url, postdata);
  128. }
  129. // 店铺修改
  130. export function ShopEdit(postdata) {
  131. let url = headapi + '/v1/Shop/ShopEdit';
  132. return getApiBasic(url, postdata);
  133. }
  134. // 店铺列表查询
  135. export function ShopListQuery(postdata) {
  136. let url = headapi + '/v1/Shop/ShopListQuery';
  137. return getApiBasic(url, postdata);
  138. }
  139. // 店铺状态修改
  140. export function ShopStatusEdit(postdata) {
  141. let url = headapi + '/v1/Shop/ShopStatusEdit';
  142. return getApiBasic(url, postdata);
  143. }
  144. // SttPlan
  145. // 课程表模板基本信息添加
  146. export function SttPlanBasicAdd(postdata) {
  147. let url = headapi + '/v1/SttPlan/SttPlanBasicAdd';
  148. return getApiBasic(url, postdata);
  149. }
  150. // 课程表模板基本信息修改
  151. export function SttPlanBasicEdit(postdata) {
  152. let url = headapi + '/v1/SttPlan/SttPlanBasicEdit';
  153. return getApiBasic(url, postdata);
  154. }
  155. // 课程表模板基本信息列表查询
  156. export function SttPlanBasicListQuery(postdata) {
  157. let url = headapi + '/v1/SttPlan/SttPlanBasicListQuery';
  158. return getApiBasic(url, postdata);
  159. }
  160. // 课程表模板店铺通用修改
  161. export function SttPlanBasicShopEdit(postdata) {
  162. let url = headapi + '/v1/SttPlan/SttPlanBasicShopEdit';
  163. return getApiBasic(url, postdata);
  164. }
  165. // 课程表模板复制
  166. export function SttPlanCopy(postdata) {
  167. let url = headapi + '/v1/SttPlan/SttPlanCopy';
  168. return getApiBasic(url, postdata);
  169. }
  170. // 课程表模板基本信息状态修改
  171. export function SttPlanBasicStatusEdit(postdata) {
  172. let url = headapi + '/v1/SttPlan/SttPlanBasicStatusEdit';
  173. return getApiBasic(url, postdata);
  174. }
  175. // 课程表模板详情列表查询
  176. export function SttPlanDetailListQuery(postdata) {
  177. let url = headapi + '/v1/SttPlan/SttPlanDetailListQuery';
  178. return getApiBasic(url, postdata);
  179. }
  180. // 课程表模板详情批量保存
  181. export function SttPlanDetailBatchSave(postdata) {
  182. let url = headapi + '/v1/SttPlan/SttPlanDetailBatchSave';
  183. return getApiBasic(url, postdata);
  184. }
  185. // User
  186. // √
  187. export function ManagerSelfQuery(postdata) {
  188. let url = headapi + '/v1/User/ManagerSelfQuery';
  189. return getApiBasic(url, postdata);
  190. }
  191. // √ 店铺管理员添加
  192. export function ShopManagerAdd(postdata) {
  193. let url = headapi + '/v1/User/ShopManagerAdd';
  194. return getApiBasic(url, postdata);
  195. }
  196. // 店铺管理员修改
  197. export function ShopManagerEdit(postdata) {
  198. let url = headapi + '/v1/User/ShopManagerEdit';
  199. return getApiBasic(url, postdata);
  200. }
  201. // 店铺管理员列表查询
  202. export function ShopManagerListQuery(postdata) {
  203. let url = headapi + '/v1/User/ShopManagerListQuery';
  204. return getApiBasic(url, postdata);
  205. }
  206. // 店铺管理员状态修改
  207. export function ShopManagerStatusEdit(postdata) {
  208. let url = headapi + '/v1/User/ShopManagerStatusEdit';
  209. return getApiBasic(url, postdata);
  210. }
  211. // 会员用户添加
  212. export function VipUserAdd(postdata) {
  213. let url = headapi + '/v1/User/VipUserAdd ';
  214. return getApiBasic(url, postdata);
  215. }
  216. // 会员用户基本信息修改
  217. export function VipUserEdit(postdata) {
  218. let url = headapi + '/v1/User/VipUserEdit ';
  219. return getApiBasic(url, postdata);
  220. }
  221. // 会员用户列表
  222. export function VipUserListQuery(postdata) {
  223. let url = headapi + '/v1/User/VipUserListQuery';
  224. return getApiBasic(url, postdata);
  225. }
  226. // 会员用户基本信息查询
  227. export function VipUserSimpleQuery(postdata) {
  228. let url = headapi + '/v1/User/VipUserSimpleQuery ';
  229. return getApiBasic(url, postdata);
  230. }
  231. // 会员用户状态修改
  232. export function VipUserStatusEdit(postdata) {
  233. let url = headapi + '/v1/User/VipUserStatusEdit ';
  234. return getApiBasic(url, postdata);
  235. }