masterInfoApi.uts 3.1 KB

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