data.js 1011 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import request from './request';
  2. //查询省
  3. export const getProvince = () => {
  4. return request({
  5. url: `area/PROVINCE`,
  6. method: 'get'
  7. })
  8. }
  9. //查询市
  10. export const getCityByPro = params => {
  11. return request({
  12. url: `area/CITY/${params.id}`,
  13. method: 'get'
  14. })
  15. }
  16. //查询区
  17. export const getDistrictByCity = params => {
  18. return request({
  19. url: `area/DISTRICT/${params.id}`,
  20. method: 'get'
  21. })
  22. }
  23. // 根据字典code查询选项
  24. export const getLookUpDatas = (params) => {
  25. return request({
  26. url: `lookup/findByLookup/${params.type}`,
  27. method: 'get',
  28. data:{}
  29. }).then(res=>res.data)
  30. }
  31. // 查询用户头像和昵称是否已存在
  32. export const findWxUserInfo = (params) => {
  33. return request({
  34. url: `wxuser/findWxUserInfo`,
  35. method: 'post',
  36. data:params
  37. }).then(res=>res.data)
  38. }
  39. // 更新用户头像和昵称信息
  40. export const wxUserUpdate = (params) => {
  41. return request({
  42. url: `wxuser/update`,
  43. method: 'post',
  44. data:params
  45. }).then(res=>res.data)
  46. }