common.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // 公共api 方法
  2. import {httpGet,httpPost} from "@/utils/request.js"
  3. /**
  4. * 获取手机验证码
  5. * @param mobile 手机号
  6. * @param area_num 手机号区号
  7. */
  8. export const apiGetSMSCode=params=>{
  9. return httpGet('/user/get_sms_code',params)
  10. }
  11. /**
  12. * 获取邮箱验证码
  13. * @param email 邮箱
  14. */
  15. export const apiGetEmailCode=params=>{
  16. return httpGet('/user/get_email_code',params)
  17. }
  18. /**
  19. * 获取所有可以申请的品种权限列表
  20. */
  21. export const apiGetPermissionList=params=>{
  22. return httpGet('/public/get_apply_variety_list')
  23. }
  24. // 获取手机号
  25. export const apiGetWechatPhone=params=>{
  26. return httpPost('/wechat/getEncryptInfo',params)
  27. }
  28. /**
  29. * 获取海报
  30. * @param code_page 分享海报小程序页面地址
  31. * @param code_scene 小程序页面参数
  32. * @param source 来源 activity_detail(活动详情) activity_list(活动列表)
  33. * special_column_list(专栏列表) special_column_detail(专栏详情)
  34. * report_list(报告列表) report_detail(报告详情)
  35. * chart_list(图库列表) chart_detail(图库详情)
  36. * sandbox_list(沙盘列表) sandbox_detail(沙盘详情)
  37. * @param version
  38. * @param pars 生成海报需要的页面参数
  39. */
  40. export const apiGetPoster=params=>{
  41. return httpPost('/public/get_share_poster',{version:'3.0',...params})
  42. }
  43. /**
  44. * 获取通过海报二维码扫码进入的页面所需要的参数
  45. * @param scene_key
  46. */
  47. export const apiGetSceneToParams=params=>{
  48. return httpGet('/public/get_suncode_scene',params)
  49. }
  50. /**
  51. * 获取标签树
  52. */
  53. export const apiGetTagTree = params=>{
  54. return httpGet('/public/get_variety_tag_tree',params)
  55. }