masterInfoApi.uts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. import { request } from '../request.uts'
  2. // 基础 URL 配置
  3. // #ifdef APP-ANDROID
  4. const BASE_URL = 'http://192.168.0.9:8001'
  5. // #endif
  6. // #ifdef APP-IOS
  7. const BASE_URL = 'http://192.168.0.9:8001'
  8. // #endif
  9. // #ifdef H5
  10. const BASE_URL = ''
  11. // #endif
  12. // #ifdef MP-WEIXIN
  13. const BASE_URL = 'http://192.168.0.9:8001'
  14. // #endif
  15. // #ifdef MP-HARMONY
  16. const BASE_URL = 'http://192.168.0.9:8001'
  17. // #endif
  18. // 获取技师详情信息
  19. export function getCoachDetaile() : Promise<any> {
  20. return request({
  21. url: `${BASE_URL}/api/client/v3/user/checkCoachReview`,
  22. method: "GET"
  23. })
  24. }
  25. /**
  26. * 提交实名认证信息
  27. * @param {Object} data - 实名认证信息
  28. * @param {string} data.name - 真实姓名
  29. * @param {string} data.idCard - 身份证号码
  30. * @param {string} data.idCardFrontUrl - 身份证正面照片URL
  31. * @param {string} data.idCardBackUrl - 身份证背面照片URL
  32. * @returns {Promise<any>} 提交结果
  33. */
  34. export function submitRealName(data : any) : Promise<any> {
  35. return request({
  36. url: `${BASE_URL}/api/coach/v3/account/real-name`,
  37. method: "POST",
  38. data: data
  39. })
  40. }
  41. // 修改商户基本信息
  42. export function editRealName(data : any) : Promise<any> {
  43. return request({
  44. url: `${BASE_URL}/api/coach/v3/account/update-basic-info`,
  45. method: "POST",
  46. data: data
  47. })
  48. }
  49. /**
  50. * 提交技师资质认证信息
  51. * @param {Object} data - 资质认证信息
  52. * @param {string} data.certificateUrl - 资格证书照片URL
  53. * @param {string} data.certificateNo - 资格证书编号
  54. * @param {string} data.mobile - 手机号
  55. * @returns {Promise<any>} 提交结果
  56. */
  57. export function submitQualification(data : any) : Promise<any> {
  58. return request({
  59. url: `${BASE_URL}/api/coach/v3/account/qualification`,
  60. method: "POST",
  61. data: data
  62. })
  63. }
  64. // 获取标签列表
  65. export function getCoachFlagList() : Promise<any> {
  66. return request({
  67. url: `${BASE_URL}/api/coach/v3/account/coach-tag`,
  68. method: "GET"
  69. })
  70. }
  71. // 更新接单位置
  72. export function updateLocation(data : any) : Promise<any> {
  73. return request({
  74. url: `${BASE_URL}/api/coach/v3/account/location`,
  75. method: "POST",
  76. data: data
  77. })
  78. }
  79. /**
  80. * 获取技师二维码
  81. * @returns {Promise<{qrcode: string}>} 技师二维码信息
  82. */
  83. export function getCoachQrcode() : Promise<any> {
  84. return request({
  85. url: `${BASE_URL}/api/coach/v3/account/qrcode`,
  86. method: "GET"
  87. })
  88. }
  89. // 一键报警
  90. export function orderAlarm() : Promise<any> {
  91. return request({
  92. url: `${BASE_URL}/api/coach/v3/orders/alerts`,
  93. method: "GET"
  94. })
  95. }
  96. // 获取当前区域配置
  97. export function getAreaConfig(params : any) : Promise<any> {
  98. return request({
  99. url: `${BASE_URL}/api/coach/v3/wallet/withdraw-fee-rate`,
  100. method: "GET",
  101. params: params
  102. })
  103. }
  104. // 消息通知
  105. export function getNotice(params : any) : Promise<any> {
  106. return request({
  107. url: `${BASE_URL}/api/coach/v3/inform/inform`,
  108. method: "GET",
  109. params: params
  110. })
  111. }