api.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import ajax from '../utils/request.js'
  2. export default {
  3. // 获取注册身份下拉框信息
  4. getIdentifyList(data) {
  5. return ajax.get('/sp-admin/app/AppRole/getList', data)
  6. },
  7. //服务协议
  8. getAgreement(data) {
  9. return ajax.get('/level-one-server/app/TbAgreement/getById', data)
  10. },
  11. // 轮播图
  12. getBanner(data) {
  13. return ajax.get('/level-one-server/app/TbBanner/getList', data)
  14. },
  15. // 根据职务获取菜单
  16. getRoleMenu(data) {
  17. return ajax.get('/sp-admin/ReRoleMenu/getList', data)
  18. },
  19. // 首页菜单
  20. getMenu(data) {
  21. return ajax.get('/sp-admin/AppMenu/getList', data)
  22. },
  23. //登录
  24. doLogin(data) {
  25. return ajax.postForm('/sp-admin/app/AppUser/login', data)
  26. },
  27. //获取注册手机验证码
  28. getPhoneSmsCode() {
  29. return ajax.get('/sp-admin/app/AppUser/getPhoneSmsCode')
  30. },
  31. //注册
  32. doRefister(data) {
  33. return ajax.postJson('/sp-admin/app/AppUser/register', data)
  34. },
  35. //获取轮播图
  36. getBannerList() {
  37. return ajax.get('/level-one-server/app/TbBanner/getList')
  38. },
  39. //获取最新资讯
  40. getNewestList(data) {
  41. return ajax.get('/level-one-server/app/TbPortNews/getNewestList', data)
  42. },
  43. //获取商品列表
  44. getGoodsList(data) {
  45. return ajax.get('/level-one-server/TbGoodsTransit/getTransitList', data)
  46. },
  47. //查看商品详情
  48. getGoodsDetails(data) {
  49. return ajax.get('/level-one-server/TbGoodsTransit/getById', data)
  50. },
  51. // 添加购物车
  52. addCar(data) {
  53. return ajax.postJson('/level-one-server/app/TbGoodsCart/addGoodsInShopCart',data)
  54. },
  55. // 获取商户发布的商品
  56. getTransitList() {
  57. return ajax.postJson('/level-one-server/app/TbGoodsTransit/getTransitList')
  58. }
  59. }