index.js 12 KB

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