index.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. import request from "@/utils/request.js";
  2. //区域根据name获取code接口
  3. export function getCityCode(data) {
  4. return request({
  5. method: 'post',
  6. url: '/area/city',
  7. data
  8. });
  9. }
  10. // 图片上传(多个)
  11. export function imgsUpload(data) {
  12. return request({
  13. method: 'post',
  14. url: '/common/uploads',
  15. data,
  16. header: {
  17. 'content-type': 'multipart/form-data'
  18. }
  19. });
  20. }
  21. // 视频上传(单个)
  22. export function videoUpload(data) {
  23. return request({
  24. method: 'post',
  25. url: '/common/uploadVi',
  26. data,
  27. header: {
  28. 'content-type': 'multipart/form-data'
  29. }
  30. });
  31. }
  32. // 获取token
  33. export function getAccessToken(data) {
  34. return request({
  35. method: 'get',
  36. url: '/weChat/getAccessToken',
  37. data
  38. });
  39. }
  40. // 轮播图
  41. export function getBannerList(data) {
  42. return request({
  43. method: 'get',
  44. url: '/api/lbt/v1/getAll',
  45. data
  46. });
  47. }
  48. // 项目
  49. export function getProjectList(data) {
  50. return request({
  51. method: 'post',
  52. url: '/api/xiangmu/v1/wx/getAll',
  53. data
  54. });
  55. }
  56. // 查询指定技师的项目
  57. export function getProjectByJsId(data) {
  58. return request({
  59. method: 'get',
  60. url: '/api/xiangmu/v1/wx/getByJsId',
  61. data
  62. });
  63. }
  64. // 商户-列表
  65. export function engineer(data) {
  66. return request({
  67. method: 'get',
  68. url: '/api/js/v1/wx/select',
  69. data
  70. });
  71. }
  72. // 商户信息
  73. export function engineerDetails(data) {
  74. return request({
  75. method: 'post',
  76. url: '/api/js/v1/wx/getByid',
  77. data
  78. });
  79. }
  80. // 获取用户信息
  81. export function getInfo(data) {
  82. return request({
  83. method: 'get',
  84. url: '/wx/getUserInfo',
  85. data
  86. });
  87. }
  88. // 微信支付验证
  89. export function getSignature(data) {
  90. return request({
  91. method: 'get',
  92. url: '/weChat/getSignature',
  93. data
  94. });
  95. }
  96. // 上下岗
  97. export function netStaffWork(data) {
  98. return request({
  99. method: 'post',
  100. url: '/api/js/v1/wx/post',
  101. data
  102. });
  103. }
  104. // 商户详情
  105. export function getMerchantData(data) {
  106. return request({
  107. method: 'post',
  108. url: '/api/js/v1/wx/getByOpenId',
  109. data
  110. });
  111. }
  112. // 订单-分类
  113. export function getStatusList(data) {
  114. return request({
  115. method: 'get',
  116. url: '/api/order/v1/getStatus',
  117. data
  118. });
  119. }
  120. // 订单列表
  121. export function orderList(data) {
  122. return request({
  123. method: 'get',
  124. url: '/api/order/v1/select',
  125. data
  126. });
  127. }
  128. // 创建订单
  129. export function addOrder(data) {
  130. return request({
  131. method: 'post',
  132. url: '/api/order/v1/wx/add',
  133. data
  134. });
  135. }
  136. // 修改订单
  137. export function updateOrder(data) {
  138. return request({
  139. method: 'post',
  140. url: '/api/order/v1/update',
  141. data
  142. });
  143. }
  144. // 评论订单
  145. export function commentOrder(data) {
  146. return request({
  147. method: 'post',
  148. url: '/tCommentUser/wx/add',
  149. data
  150. });
  151. }
  152. // 充值
  153. export function pay(data) {
  154. return request({
  155. method: 'post',
  156. url: '/wx/pay/pay',
  157. data
  158. });
  159. }
  160. // 支付
  161. export function payoff(data) {
  162. return request({
  163. method: 'post',
  164. url: '/api/order/v1/wx/pay',
  165. data
  166. });
  167. }
  168. // 提现
  169. export function withdraw(data) {
  170. return request({
  171. method: 'post',
  172. url: '/api/tx/record/wx/applicationCash',
  173. data
  174. });
  175. }
  176. // 上次提现记录
  177. export function last(data) {
  178. return request({
  179. method: 'post',
  180. url: '/api/tx/record/wx/last',
  181. data
  182. });
  183. }
  184. // 总提现记录
  185. export function getTXRecordData(data) {
  186. return request({
  187. method: 'get',
  188. url: '/api/tx/record/select',
  189. data
  190. });
  191. }
  192. // 添加收藏
  193. export function addCollect(data) {
  194. return request({
  195. method: 'post',
  196. url: '/api/collect/v1/wx/addCollect',
  197. data
  198. });
  199. }
  200. // 取消收藏
  201. export function cancleCollect(data) {
  202. return request({
  203. method: 'post',
  204. url: '/api/collect/v1/wx/delCollect',
  205. data
  206. });
  207. }
  208. // 获取收藏列表
  209. export function getCollect(data) {
  210. return request({
  211. method: 'post',
  212. url: '/api/collect/v1/wx/getCollect',
  213. data
  214. });
  215. }
  216. // 实时更新商户的位置
  217. export function getJsLocation(data) {
  218. return request({
  219. method: 'post',
  220. url: '/api/js/v1/wx/updateLocation/f',
  221. data
  222. });
  223. }
  224. // 到达服务订单位置
  225. export function arriveOderLocation(data) {
  226. return request({
  227. method: 'post',
  228. url: '/api/order/v1/wx/reach',
  229. data
  230. });
  231. }
  232. // 开始服务
  233. export function enterService(data) {
  234. return request({
  235. method: 'post',
  236. url: '/api/order/v1/wx/service',
  237. data
  238. });
  239. }
  240. // 报警
  241. export function alertOrder(data) {
  242. return request({
  243. method: 'post',
  244. url: '/ylxAlarm/addAlarm',
  245. data
  246. });
  247. }
  248. // 获取优惠券
  249. export function getCoupon(data) {
  250. return request({
  251. method: 'post',
  252. url: '/couponReceive/myCoupon',
  253. data
  254. });
  255. }
  256. // 获取弹框优惠券
  257. export function getShareVolutionDetail(data) {
  258. return request({
  259. method: 'get',
  260. url: '/couponReceive/getShareVolutionDetail',
  261. data
  262. })
  263. }
  264. // 领取优惠券
  265. export function receiveCoupon(data) {
  266. return request({
  267. method: 'post',
  268. url: '/couponReceive/receiveCoupon',
  269. data,
  270. header: {
  271. 'Authorization': `tf:${uni.getStorageSync('access-token')}`
  272. }
  273. })
  274. }
  275. // 获取二维码
  276. export function getwxQrCode(data) {
  277. return request({
  278. method: 'get',
  279. url: '/weChat/getwxQrCode',
  280. data
  281. });
  282. }
  283. // 投诉举报
  284. export function complain(data) {
  285. return request({
  286. method: 'post',
  287. url: '/complaint/add',
  288. data
  289. });
  290. }
  291. // 投诉举报类型
  292. export function complaintEnum(data) {
  293. return request({
  294. method: 'post',
  295. url: '/complaint/complaintEnum',
  296. data
  297. });
  298. }
  299. // 获取部门车费
  300. export function getFareSetting(data) {
  301. return request({
  302. method: 'get',
  303. url: '/tFareSetting/selectAll',
  304. data
  305. });
  306. }
  307. // 商户出发
  308. export function depart(data) {
  309. return request({
  310. method: 'post',
  311. url: '/api/order/v1/wx/depart',
  312. data
  313. });
  314. }
  315. // 商户到达
  316. export function reach(data) {
  317. return request({
  318. method: 'post',
  319. url: '/api/order/v1/wx/reach',
  320. data
  321. });
  322. }
  323. // 商户提前完成
  324. export function confirm(data) {
  325. return request({
  326. method: 'post',
  327. url: '/api/order/v1/wx/confirm',
  328. data
  329. });
  330. }
  331. // 商户评价客户
  332. export function tCommentUser(data) {
  333. return request({
  334. method: 'post',
  335. url: '/tCommentUser/add',
  336. data
  337. });
  338. }
  339. // 查看客户评论
  340. export function userComment(data) {
  341. return request({
  342. method: 'get',
  343. url: '/tCommentUser/selectAll',
  344. data
  345. });
  346. }
  347. // 首页优惠券弹窗
  348. export function getCouponList(data) {
  349. return request({
  350. method: 'post',
  351. url: '/couponReceive/windows',
  352. data
  353. });
  354. }
  355. // 首页领取优惠券
  356. export function netCouponReceive(data) {
  357. return request({
  358. method: 'post',
  359. url: '/couponReceive/submits',
  360. data
  361. });
  362. }
  363. // 首页领取优惠券
  364. export function verification(data) {
  365. return request({
  366. method: 'post',
  367. url: '/api/order/v1/wx/verification',
  368. data
  369. });
  370. }
  371. // 获取员工工作数据
  372. export function getStaffWorkData(data) {
  373. return request({
  374. method: 'get',
  375. url: '/tJsDay/selectApp',
  376. data
  377. });
  378. }
  379. // 余额记录
  380. export function consumptionLog(data) {
  381. return request({
  382. method: 'get',
  383. url: '/tConsumptionLog/selectAll',
  384. data
  385. });
  386. }
  387. // 退出登录
  388. export function logout(data) {
  389. return request({
  390. method: 'post',
  391. url: '/logout',
  392. data
  393. });
  394. }
  395. // 获取银行卡列表
  396. export function bankList(data) {
  397. return request({
  398. method: 'get',
  399. url: '/tBankUser/bankList',
  400. data
  401. });
  402. }
  403. // 绑定银行卡
  404. export function addBnak(data) {
  405. return request({
  406. method: 'post',
  407. url: '/tBankUser/save',
  408. data
  409. });
  410. }
  411. // 我的银行卡
  412. export function myBank(data) {
  413. return request({
  414. method: 'get',
  415. url: '/tBankUser/myBank',
  416. data
  417. });
  418. }
  419. // 推荐商户
  420. export function getRecommendList(data) {
  421. return request({
  422. method: 'get',
  423. url: '/api/xiangmu/v1/wx/recommend',
  424. data
  425. });
  426. }
  427. // 获取订单数量-待接单
  428. export function getWaitOrder(data) {
  429. return request({
  430. method: 'get',
  431. url: '/api/order/v1/wx/waitOrder',
  432. data
  433. });
  434. }
  435. // 商户收益
  436. export function myIncome() {
  437. return request({
  438. method: 'get',
  439. url: '/api/order/v1/wx/myIncome'
  440. })
  441. }
  442. // 收入明细
  443. export function myIncomeDetail(data) {
  444. return request({
  445. method: 'get',
  446. url: '/api/order/v1/wx/myIncomeDetail',
  447. data
  448. })
  449. }
  450. // 提现记录
  451. export function withDraw(data) {
  452. return request({
  453. method: 'get',
  454. url: '/api/tx/record/wx/select',
  455. data
  456. })
  457. }
  458. // 绑定手机号
  459. export function bindPhone(data) {
  460. return request({
  461. method: 'post',
  462. url: '/weChat/bindPhone',
  463. data
  464. })
  465. }
  466. // 手机号登录
  467. export function phoneLogin(data) {
  468. return request({
  469. method: 'post',
  470. url: '/weChat/phoneLogin',
  471. data
  472. })
  473. }
  474. // 查询用户是否绑定一账通
  475. export function queryBind(data) {
  476. return request({
  477. method: 'post',
  478. url: '/userCenter/userApp/queryBind',
  479. data
  480. })
  481. }
  482. // 广誉源账户绑定一账通
  483. export function useBind(data) {
  484. return request({
  485. method: 'post',
  486. url: '/userCenter/userApp/bind',
  487. data
  488. })
  489. }
  490. // 一账通登录
  491. export function uuidLogin(data) {
  492. return request({
  493. method: 'post',
  494. url: '/weChat/uuidLogin',
  495. data
  496. })
  497. }
  498. // 抽奖活动过来的 - 本地生活积分领取
  499. export function pointDraw(data) {
  500. return request({
  501. method: 'post',
  502. url: '/user/point/draw',
  503. data
  504. })
  505. }
  506. // 查看是否有抽奖机会
  507. export function getIsLottery(data) {
  508. return request({
  509. method: 'post',
  510. url: '/lottery/isLottery',
  511. data
  512. })
  513. }
  514. // 商户注册接口
  515. export function technicianApply(data) {
  516. return request({
  517. method: 'post',
  518. url: '/technician/technician/apply',
  519. data,
  520. // header: {
  521. // 'content-type': 'multipart/form-data'
  522. // }
  523. });
  524. }
  525. //获取手机验证码
  526. export function sendMsg(data) {
  527. return request({
  528. method: 'get',
  529. url: '/weChat/sendMsg',
  530. data
  531. });
  532. }
  533. //查询开通服务接口
  534. export function getServiceCategoryList(dictType) {
  535. return request({
  536. method: 'get',
  537. url: `/system/dict/data/type/${dictType}`
  538. });
  539. }
  540. //查询商户注册和入驻信息
  541. export function getTechnicianInfo(data) {
  542. return request({
  543. method: 'get',
  544. //url:'/technician/technician/getTechnicianInfo',
  545. url:'/technician/technician/profile',
  546. data
  547. });
  548. }
  549. //入驻申请提交
  550. export function applyFile(data) {
  551. return request({
  552. method: 'post',
  553. url:'/technician/technician/applyFile',
  554. data
  555. });
  556. }
  557. //修改资料
  558. export function updateTechnician(data) {
  559. return request({
  560. method: 'post',
  561. url:'/technician/technician/updateTechnician',
  562. data
  563. });
  564. }