index.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. import oldRequest from "../../../core/utils/request";
  2. export const request = async ({
  3. url,
  4. data,
  5. ...other
  6. }) => {
  7. const [err, result] = await oldRequest({
  8. url,
  9. data,
  10. ...other
  11. });
  12. if (err && err.code !== 200) {
  13. my.showToast({
  14. type: 'fail',
  15. content: err.msg || '操作失败'
  16. });
  17. }
  18. return [err, result];
  19. }; // 查询商家列表
  20. export function listMerchantStores(data) {
  21. return request({
  22. url: '/api/v1/proxy/soldier/listMerchantStores',
  23. data
  24. });
  25. } // 查询商家检索条件配置
  26. export function merchantQueryConfig(data) {
  27. return request({
  28. url: '/api/v1/proxy/soldier/merchantQueryConfig',
  29. data
  30. });
  31. } // 查询商家详情
  32. export function queryMerchantStoreDetail(data) {
  33. return request({
  34. url: '/api/v1/proxy/soldier/queryMerchantStoreDetail',
  35. data
  36. });
  37. }
  38. /*
  39. * 证件列表查询
  40. * */
  41. export const soldierListCerts = () => {
  42. return request({
  43. url: '/api/v1/proxy/soldier/listCerts',
  44. method: 'POST'
  45. });
  46. };
  47. /*
  48. * 证件详情
  49. * @para certType string
  50. * */
  51. export const queryCertDetail = certType => {
  52. return request({
  53. url: '/api/v1/proxy/soldier/queryCertDetail',
  54. method: 'POST',
  55. data: {
  56. certType
  57. }
  58. });
  59. };
  60. /*
  61. * 激活证件
  62. * @para certType string
  63. * @para userCertifyResult boolean
  64. * */
  65. export const activeCert = params => {
  66. return request({
  67. url: '/api/v1/proxy/soldier/activeCert',
  68. method: 'POST',
  69. data: params
  70. });
  71. };
  72. /*
  73. * 通过服务码查询服务信息
  74. * @para code string
  75. * */
  76. export const queryServiceByCode = code => {
  77. return request({
  78. url: '/api/v1/service/queryByCode',
  79. method: 'GET',
  80. data: {
  81. code
  82. }
  83. });
  84. };
  85. /*
  86. *获取证件码
  87. * @para certType string
  88. * */
  89. export const getCertQrCode = certType => {
  90. return request({
  91. url: '/api/v1/proxy/soldier/getCertQrCode',
  92. method: 'post',
  93. data: {
  94. certType
  95. }
  96. });
  97. };