weixin.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import request from '@/apis/utils/requestWhite'
  2. export function saveLoginRecord(data) {
  3. return request({
  4. method: 'post',
  5. data: data,
  6. url: '/mobile/user/saveLoginRecord'
  7. })
  8. }
  9. //根据code换取openid
  10. export function getDataByCode(code) {
  11. return request({
  12. url: '/wechat/findUserInfo/' + code,
  13. data: {},
  14. method: 'get',
  15. })
  16. }
  17. //根据code换取openid
  18. export function findAppletUserInfo(code) {
  19. return request({
  20. url: '/wechat/findAppletUserInfo/' + code,
  21. data: {},
  22. method: 'get',
  23. })
  24. }
  25. export function findUserPhoneNumber(code) {
  26. return request({
  27. url: '/wechat/findUserPhoneNumber/' + code,
  28. data: {},
  29. method: 'get',
  30. })
  31. }
  32. export function findByOpenId(data) {
  33. return request({
  34. url: '/mobile/user/findByOpenId',
  35. data: data,
  36. method: 'get',
  37. })
  38. }
  39. export function findValueByName(data) {
  40. return request({
  41. url: '/mobile/dictionary/findValueByName',
  42. data: data,
  43. method: 'post',
  44. })
  45. }
  46. export function findListByCatalogName(data) {
  47. return request({
  48. url: '/mobile/dictionary/findListByCatalogName',
  49. data: data,
  50. method: 'post',
  51. })
  52. }
  53. //根据code换取openid
  54. export function decryptData(data) {
  55. return request({
  56. url: '/wechat/decryptData/',
  57. data: data,
  58. method: 'post',
  59. })
  60. }