weixin.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. }
  61. export function newsList(data) {
  62. return request({
  63. method: 'post',
  64. data: data,
  65. url: '/mobile/news/newsList'
  66. })
  67. }
  68. export function bannerList(data) {
  69. var url='/mobile/banner/bannerList';
  70. return request({
  71. method: 'post',
  72. data: data,
  73. url: url
  74. })
  75. }