api.js 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. // Promise封装请求
  2. // import Request from './request.js';
  3. // let request = Request.http
  4. // export default {
  5. // getJobList: function () {
  6. // return request('/jobList',{name:123},"Post",1)
  7. // },
  8. // getList: function (data) {
  9. // return request('/jobList',data,"Post",1)
  10. // }
  11. // }
  12. // flyio封装请求 拦截
  13. import request from "./request.js";
  14. let fly = request.fly;
  15. export default {
  16. //登录获取token
  17. getUserLogin:(data)=>{
  18. return fly.request("user",data,{
  19. method:"post",
  20. timeout:5000 //超时设置为5s
  21. })
  22. },
  23. //首页
  24. getIndex:(data)=> { //首页加载数据
  25. return fly.request("p_search/show",data,{
  26. method:"post",
  27. timeout:5000 //超时设置为5s
  28. })
  29. },
  30. //获取用户状态 入驻 审核中 管理店铺
  31. // getUserStatus:(data)=>{
  32. // return fly.request("p_search/show",data,{
  33. // method:"post",
  34. // timeout:5000 //超时设置为5s
  35. // })
  36. // },
  37. //商家详情页
  38. getShopDetail:(data)=>{
  39. return fly.request("p_search/provider_detail",data,{
  40. method:"post",
  41. timeout:5000 //超时设置为5s
  42. })
  43. },
  44. //商家详情跳转图册
  45. getShopPhoto:(data)=>{
  46. return fly.request("p_search/photo",data,{
  47. method:"post",
  48. timeout:5000 //超时设置为5s
  49. })
  50. },
  51. //商家详情跳转主营信息明细
  52. getShopMessage:(data)=>{
  53. return fly.request("service_category/showServiceItemChoose",data,{
  54. method:"post",
  55. timeout:5000 //超时设置为5s
  56. })
  57. },
  58. //商家详情页服务项目导航栏点击查询
  59. getShopProject:(data)=>{
  60. return fly.request("p_search/list_service_item",data,{
  61. method:"post",
  62. timeout:5000 //超时设置为5s
  63. })
  64. },
  65. //商家服务项目详情
  66. getShopProjectDetail:(data)=>{
  67. return fly.request("p_search/service_item_detail",data,{
  68. method:"post",
  69. timeout:5000 //超时设置为5s
  70. })
  71. },
  72. //商家品牌详情查询
  73. getShopBrand:(data)=>{
  74. return fly.request("p_search/get_brand",data,{
  75. method:"post",
  76. timeout:5000 //超时设置为5s
  77. })
  78. },
  79. //查询品牌下其他店铺
  80. getBrandOther:(data)=>{
  81. return fly.request("p_search/other_provider",data,{
  82. method:"post",
  83. timeout:5000 //超时设置为5s
  84. })
  85. },
  86. //点击收藏商家
  87. collect:(data)=>{
  88. return fly.request("common/collection/save",data,{
  89. method:"post",
  90. timeout:5000 //超时设置为5s
  91. })
  92. },
  93. //商家报错页面查询数据
  94. getShopError:(data)=>{
  95. return fly.request("p_search/provider_show",data,{
  96. method:"post",
  97. timeout:5000 //超时设置为5s
  98. })
  99. },
  100. //商家报错提交数据
  101. submitShopError:(data)=>{
  102. return fly.request("p_search/save_correction",data,{
  103. method:"post",
  104. timeout:5000 //超时设置为5s
  105. })
  106. },
  107. //活动资讯加载列表
  108. getNewsList:(data)=>{
  109. return fly.request("p_search/activity_show",'',{
  110. method:"post",
  111. timeout:5000 //超时设置为5s
  112. })
  113. },
  114. // 导航栏切换查询数据
  115. getNewsItem:(data)=>{
  116. return fly.request("p_search/get_activity_type",data,{
  117. method:"post",
  118. timeout:5000 //超时设置为5s
  119. })
  120. },
  121. //新闻列表跳详情
  122. getNewsDetail:(data)=>{
  123. return fly.request("p_search/get_activity",data,{
  124. method:"post",
  125. timeout:5000 //超时设置为5s
  126. })
  127. },
  128. //入驻绑定手机号发送验证码
  129. getCode:(data)=>{
  130. return fly.request("wx/send_sms_code",data,{
  131. method:"post",
  132. timeout:5000 //超时设置为5s
  133. })
  134. },
  135. //入驻绑定手机号提交
  136. bindPhone:(data)=>{
  137. return fly.request("wx/user_binding",data,{
  138. method:"post",
  139. timeout:5000 //超时设置为5s
  140. })
  141. },
  142. //入驻填写资料获取地理位置
  143. getAddress:(data)=>{
  144. return fly.request("common/getAddress",data,{
  145. method:"post",
  146. timeout:5000 //超时设置为5s
  147. })
  148. },
  149. //获取服务商主营信息
  150. getServiceMessage:(data)=>{
  151. return fly.request("service_category/mainBusinessChoose",data,{
  152. method:"post",
  153. timeout:5000 //超时设置为5s
  154. })
  155. },
  156. //入驻提交信息
  157. freeEnterSubmit:(data)=>{
  158. return fly.request("provider/save",data,{
  159. method:"post",
  160. timeout:5000 //超时设置为5s
  161. })
  162. },
  163. //提交认证资料
  164. submitVipData:(data)=>{
  165. return fly.request("authentication/save",data,{
  166. method:"post",
  167. timeout:5000 //超时设置为5s
  168. })
  169. },
  170. //从用户下单起计算时间
  171. getUserEnterTime:(data)=>{
  172. return fly.request("authentication/getAuthTimeBucket",data,{
  173. method:"post",
  174. timeout:5000 //超时设置为5s
  175. })
  176. },
  177. //下单使用默认优惠券
  178. getUserDiscount:(data)=>{
  179. return fly.request("authCoupon/default_useCoupon",data,{
  180. method:"post",
  181. timeout:5000 //超时设置为5s
  182. })
  183. },
  184. //下单支付
  185. getUserPay:(data)=>{
  186. return fly.request("order/unified_order",data,{
  187. method:"post",
  188. timeout:5000 //超时设置为5s
  189. })
  190. },
  191. //获取用户所有的优惠券
  192. getUserAllDiscount:(data)=>{
  193. return fly.request("authCoupon/listAuthCoupon",data,{
  194. method:"post",
  195. timeout:5000 //超时设置为5s
  196. })
  197. },
  198. //支付成功加载订单信息
  199. getUserOrder:(data)=>{
  200. return fly.request("order/get_order",data,{
  201. method:"post",
  202. timeout:5000 //超时设置为5s
  203. })
  204. },
  205. //个人中心
  206. //加载留言反馈数据
  207. getUserFeedBack:(data)=>{
  208. return fly.request("common/all_feedback",data,{
  209. method:"post",
  210. timeout:5000 //超时设置为5s
  211. })
  212. },
  213. //留言反馈 提交表单
  214. submitUserFeenBack:(data)=>{
  215. return fly.request("common/save_feedback",data,{
  216. method:"post",
  217. timeout:5000 //超时设置为5s
  218. })
  219. },
  220. //留言反馈 回复内容
  221. getUserFeedReply:(data)=>{
  222. return fly.request("common/tab_feedback",data,{
  223. method:"post",
  224. timeout:5000 //超时设置为5s
  225. })
  226. },
  227. //消息中心列表
  228. getUserMessageList:(data)=>{
  229. return fly.request("common/all_message",data,{
  230. method:"post",
  231. timeout:5000 //超时设置为5s
  232. })
  233. },
  234. //消息中心详情页
  235. getUserMessageDetail:(data)=>{
  236. return fly.request("common/get_message",data,{
  237. method:"post",
  238. timeout:5000 //超时设置为5s
  239. })
  240. },
  241. //个人中心我的收藏
  242. getUserMyCollect:(data)=>{
  243. return fly.request("common/all_collection",data,{
  244. method:"post",
  245. timeout:5000 //超时设置为5s
  246. })
  247. },
  248. //删除我的收藏
  249. deleteMyCollect:(data)=>{
  250. return fly.request("common/del_collection",data,{
  251. method:"post",
  252. timeout:5000 //超时设置为5s
  253. })
  254. },
  255. //浏览记录
  256. getUserMyHistory:(data)=>{
  257. return fly.request("common/all_browse_record",data,{
  258. method:"post",
  259. timeout:5000 //超时设置为5s
  260. })
  261. },
  262. //删除浏览记录
  263. deleteMyhistory:(data)=>{
  264. return fly.request("common/del_browse_record",data,{
  265. method:"post",
  266. timeout:5000 //超时设置为5s
  267. })
  268. },
  269. //加载分享人的数据
  270. getUserMyShare:(data)=>{
  271. return fly.request("authCoupon/invitationInfo",data,{
  272. method:"post",
  273. timeout:5000 //超时设置为5s
  274. })
  275. },
  276. //个人中心关于我们
  277. getUserAbout:()=>{
  278. return fly.request("common/get_about",'',{
  279. method:"post",
  280. timeout:5000 //超时设置为5s
  281. })
  282. },
  283. //帮助中心
  284. getUserHelp:()=>{
  285. return fly.request("common/all_hc",'',{
  286. method:"post",
  287. timeout:5000 //超时设置为5s
  288. })
  289. },
  290. //帮助中心导航栏点击查询
  291. getUserHelpHeader:(data)=>{
  292. return fly.request("common/all_hc_type",data,{
  293. method:"post",
  294. timeout:5000 //超时设置为5s
  295. })
  296. },
  297. //个人中心店铺管理
  298. getUserStoreMessage:(data)=>{
  299. return fly.request("provider/get_one",data,{
  300. method:"post",
  301. timeout:5000 //超时设置为5s
  302. })
  303. },
  304. //个人中心服务项目查询
  305. getUserStoreMyServe:(data)=>{
  306. return fly.request("service_item/get_all",data,{
  307. method:"post",
  308. timeout:5000 //超时设置为5s
  309. })
  310. },
  311. //店铺管理服务项目导航栏点击查询
  312. getUserStoreServeItem:(data)=>{
  313. return fly.request("p_search/list_service_item",data,{
  314. method:"post",
  315. timeout:5000 //超时设置为5s
  316. })
  317. },
  318. //店铺管理删除服务项目
  319. delUserMyServe:(data)=>{
  320. return fly.request("service_item/remove",data,{
  321. method:"post",
  322. timeout:5000 //超时设置为5s
  323. })
  324. },
  325. //项目类别
  326. getUserMyServeClass:(data)=>{
  327. return fly.request("service_category/serviceItemChoose",data,{
  328. method:"post",
  329. timeout:5000 //超时设置为5s
  330. })
  331. },
  332. //添加服务项目保存
  333. submitUserMyServe:(data)=>{
  334. return fly.request("service_item/save",data,{
  335. method:"post",
  336. timeout:5000 //超时设置为5s
  337. })
  338. },
  339. //服务项目编辑,回显信息
  340. getUserMyServrWrite:(data)=>{
  341. return fly.request("p_search/service_item_show",data,{
  342. method:"post",
  343. timeout:5000 //超时设置为5s
  344. })
  345. },
  346. //个人中心修改主营业务
  347. getUserMyMessage:(data)=>{
  348. return fly.request("service_category/update_mainBusinessChoose",data,{
  349. method:"post",
  350. timeout:5000 //超时设置为5s
  351. })
  352. }
  353. }