http.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. import $http from "./request/requestConfig"
  2. import {
  3. BASE_URI
  4. } from "../pages/utils/constant.js";
  5. import qs from 'qs';
  6. const baseUri = '/smartParkH5Server'
  7. const parkActivity = '/wx/meetingAppoint'
  8. export function login(data) {
  9. return $http.post(
  10. '/wx/auth/login_by_app_main?' + qs.stringify(data), {}, {})
  11. }
  12. export function addRectificationManagement(data) {
  13. return $http.post(
  14. '/wx/RectificationController/addRectificationManagement',
  15. data, {}
  16. )
  17. }
  18. // /wx/dock/getCarDataByBiz
  19. export function loginByWeChat(data) {
  20. return $http.post(
  21. '/wx/auth/loginByWeChat',
  22. data, {}
  23. )
  24. }
  25. export function bindWxOpenId(data) {
  26. return $http.post(
  27. '/wx/frameUser/bindWxOpenId',
  28. data, {}
  29. )
  30. }
  31. export function getMeetingAppointListAppCount(data) {
  32. return $http.post(
  33. '/wx/meetingAppoint/getMeetingAppointListAppCount',
  34. { states: '1,3' }, {}
  35. )
  36. }
  37. export function getVenueAppointListAppCount(data) {
  38. return $http.post(
  39. '/wx/WxParkVenueAppointController/getVenueAppointListAppCount',
  40. { states: '1,3' }, {}
  41. )
  42. }
  43. export function editWanderAboutStatus(data) {
  44. return $http.post(
  45. '/wx/repair/editWanderAboutStatus',
  46. data, {}
  47. )
  48. }
  49. export function unbindWxId(data) {
  50. return $http.post(
  51. '/wx/frameUser/unbindWxOpenId',
  52. data, {}
  53. )
  54. }
  55. export function getUserLocalStorageInfo() {
  56. const userInfo = JSON.parse(
  57. uni.getStorageSync("laocui_user_info"));
  58. return userInfo
  59. }
  60. export function uploadPDF() {
  61. uni.showLoading({
  62. title: '加载中',
  63. mask: true
  64. });
  65. return new Promise((resolve, reject) => {
  66. uni.chooseMessageFile({
  67. count: 1, //默认100
  68. type: 'file',
  69. success: (res) => {
  70. uni.uploadFile({
  71. url: BASE_URI + "/wx/fileController/upload",
  72. filePath: res.tempFiles[0].path,
  73. name: "file",
  74. formData: {
  75. user: "test"
  76. },
  77. success(successRes) {
  78. // 上传完成需要更新 fileList
  79. let data = JSON.parse(successRes.data);
  80. uni.showToast({
  81. title: '提交成功',
  82. duration: 500
  83. });
  84. resolve({
  85. url: data.data[0],
  86. name: res.tempFiles[0].name
  87. })
  88. },
  89. fail(res) { },
  90. });
  91. },
  92. fail(e) {
  93. uni.showToast({
  94. title: '提交成功',
  95. duration: 0
  96. });
  97. }
  98. });
  99. })
  100. }
  101. export function getBuildDetails(data) {
  102. return $http.post(
  103. '/wx/MnpBuildingController/getById',
  104. data, {}
  105. )
  106. }
  107. export function addZaiti(data) {
  108. return $http.post(
  109. '/wx/ParkRoomController/add',
  110. data, {}
  111. )
  112. }
  113. export function getPartyBranchList(data) {
  114. return $http.post(
  115. '/wx/partyBranch/getPartyBranchList',
  116. data, {}
  117. )
  118. }
  119. export function selectByCompanyId(data) {
  120. return $http.post(
  121. '/wx/SocialCarrierController/selectByCompanyId',
  122. data, {}
  123. )
  124. }
  125. export function getRoomNameByCompanyId(data) {
  126. return $http.post(
  127. '/wx/ParkContractManageController/getRoomNameByCompanyId', data, {}
  128. )
  129. }
  130. export function getTreeData2(data) {
  131. return $http.post(
  132. '/wx/ParkInfoController/getTreeData2',
  133. data, {}
  134. )
  135. }
  136. export function getTreeData6(data) {
  137. return $http.post(
  138. '/wx/ParkInfoController/getTreeData6',
  139. data, {}
  140. )
  141. }
  142. export function getTreeData4(data) {
  143. return $http.post(
  144. '/wx/ParkInfoController/getTreeData4',
  145. data, {}
  146. )
  147. }
  148. export function getActivationRanking(data) {
  149. return $http.post(
  150. '/wx/partyBranch/getActivationRanking',
  151. data, {}
  152. )
  153. }
  154. export function findRectificationManagementInOutList(data) {
  155. return $http.post(
  156. '/wx/RectificationController/findRectificationManagementInOutList',
  157. data, {}
  158. )
  159. }
  160. export function findRectificationManagementInOutById(e) {
  161. return $http.post(
  162. '/wx/RectificationController/findRectificationManagementInOutById', {
  163. id: e
  164. }, {}
  165. )
  166. }
  167. export function repairList(data) {
  168. return $http.post(
  169. '/wx/repair/serviceList',
  170. data, {}
  171. )
  172. }
  173. export function repairList2(data) {
  174. return $http.post(
  175. '/wx/repair/list',
  176. data, {}
  177. )
  178. }
  179. export function addSafetySelfCheckingManage(data) {
  180. return $http.post(
  181. '/wx/SafetyController/addSafetySelfCheckingManage',
  182. data, {}
  183. )
  184. }
  185. export function updateSafetySelfCheckingManage(data) {
  186. return $http.post(
  187. '/wx/SafetyController/updateSafetySelfCheckingManage',
  188. data, {}
  189. )
  190. }
  191. export function editRepair(data) {
  192. return $http.post(
  193. '/wx/repair/edit',
  194. data, {}
  195. )
  196. }
  197. export function addRepair(data) {
  198. return $http.post(
  199. '/wx/repair/add',
  200. data, {}
  201. )
  202. }
  203. export function getRepairDispatchById(id) {
  204. return $http.post(
  205. '/wx/repair/getById', {
  206. id: id
  207. }, {}
  208. )
  209. }
  210. export function getDispatchToPerson(data) {
  211. return $http.post(
  212. '/wx/repair/getDispatchToPerson',
  213. data, {}
  214. )
  215. }
  216. export function getCompanyById(data) {
  217. return $http.post(
  218. '/wx/repair/getCompanyById', data, {},
  219. )
  220. }
  221. export function getWxCompanyTags(e) {
  222. return $http.post(
  223. '/wx/MnpTagInfoController/tagInfoList', e, {}
  224. )
  225. }
  226. export function tagsBind(e) {
  227. return $http.post(
  228. '/wx/MnpTagInfoController/bind', e, {}
  229. )
  230. }
  231. export function getDetial(e) {
  232. return $http.post(
  233. '/wx/meetingAppoint/meetingAppointDetail', e, {}
  234. )
  235. }
  236. export function saleControllerGetById(e) {
  237. return $http.post(
  238. '/wx/SaleController/getById', {
  239. id: e
  240. }, {}
  241. )
  242. }
  243. export function getAppUserMain(data) {
  244. return $http.post(
  245. '/wx/company/getById',
  246. data, {}
  247. )
  248. }
  249. export function confirmAudit(data) {
  250. return $http.post(
  251. '/wx/meetingAppoint/confirmAudit',
  252. data, {}
  253. )
  254. }
  255. export function getCompanyTags(e) {
  256. return $http.post(
  257. '/wx/MnpTagInfoController/getCompanyTags', e, {}
  258. )
  259. }
  260. export function getCompanyTagsByQybq(qybq) {
  261. return $http.post(
  262. '/wx/MnpTagInfoController/getCompanyTagsByQybq', {
  263. qybq: qybq
  264. }, {})
  265. }
  266. export function companyECdit(data) {
  267. return $http.post(
  268. '/wx/company/edit', data, {})
  269. }
  270. export function tagInfoList(e) {
  271. return $http.post(
  272. '/wx/MnpTagInfoController/tagInfoList',
  273. e, {})
  274. }
  275. export function findDeptList() {
  276. return $http.post(
  277. '/wx/SaleController/findDeptList', {}, {})
  278. }
  279. export function tagCategoryList() {
  280. return $http.post(
  281. '/wx/MnpTagController/tagCategoryList', {}, {}
  282. )
  283. }
  284. export function interviewEscalationListAll(id) {
  285. return $http.post('/wx/interviewEscalation/listAll', {
  286. companyId: id
  287. }, {})
  288. }
  289. export function getUserInfo(data) {
  290. let laocui_user_info = JSON.parse(uni.getStorageSync('laocui_user_info'))
  291. return $http.post(
  292. '/wx/frameUser/getMyInfo?userId=' + laocui_user_info.user.id, {}, {})
  293. }
  294. export function getWxUserById(userId) {
  295. return $http.get('/wx/frameUser/getWxUserById?userId=' + userId, {})
  296. }
  297. export function getRoomInfo(e) {
  298. return $http.post(
  299. '/wx/ParkRoomController/getById', {
  300. id: e
  301. }, {})
  302. }
  303. export function getCompanyHouseDetails(e) {
  304. return $http.post(
  305. '/wx/company/getById', {
  306. id: e
  307. }, {})
  308. }
  309. export function handleList(e) {
  310. return $http.post(
  311. '/wx/workPaneController/handleList',
  312. e, {})
  313. }
  314. export function readList(e) {
  315. return $http.post(
  316. '/wx/workPaneController/readList',
  317. e, {})
  318. }
  319. // handleList?
  320. export function findCompanyTags(e) {
  321. return $http.post(
  322. '/wx/MnpTagInfoController/getCompanyTags/' + e, {}, {})
  323. }
  324. export function removeTagsBind(e) {
  325. return $http.post(
  326. '/wx/MnpTagInfoController/removeBind', e, {}
  327. )
  328. }
  329. export function addInterview(e) {
  330. return $http.post(
  331. "/wx/interviewEscalation/add", e, {})
  332. }
  333. export function editInterview(e) {
  334. return $http.post(
  335. "/wx/interviewEscalation/edit", e, {})
  336. }
  337. export function getInterviewList(e) {
  338. return $http.post(
  339. "/wx/interviewEscalation/list", e, {})
  340. }
  341. export function getInterviewDetails(e) {
  342. return $http.post(
  343. "/wx/interviewEscalation/getById", {
  344. id: e
  345. }, {})
  346. }
  347. export function findSafetySelfCheckingPlanById(e) {
  348. return $http.post(
  349. "/wx/SafetyController/findSafetySelfCheckingPlanById", {
  350. id: e
  351. }, {})
  352. }
  353. //
  354. export function findSafetySelfCheckingPlanList(e) {
  355. return $http.post(
  356. "/wx/SafetyController/findSafetySelfCheckingPlanList",
  357. e, {})
  358. }
  359. export function getBySaveStatus(e) {
  360. return $http.post(
  361. "/wx/interviewEscalation/getBySaveStatus", {
  362. createdBy: e
  363. }, {})
  364. }
  365. export function companyExamineAdd(e) {
  366. return $http.post(
  367. "/wx/company/add", e, {})
  368. }
  369. export function listByModel(e) {
  370. return $http.post(
  371. '/wx/SaleController/findSaleManagementListByRoomId',
  372. e, {})
  373. }
  374. export function listVo(e) {
  375. // 查询园区列表,不需要参数
  376. return $http.post(
  377. '/wx/company/listVo', e, {})
  378. }
  379. // /wx/SafetyController/addSafetySelfCheckingPlan
  380. export function addSafetySelfCheckingPlan(e) {
  381. // 查询园区列表,不需要参数
  382. return $http.post(
  383. '/wx/SafetyController/addSafetySelfCheckingPlan', {
  384. ...e
  385. }, {})
  386. }
  387. export function findSafetySelfCheckingManagetById(e) {
  388. // 查询园区列表,不需要参数
  389. return $http.post(
  390. '/wx/SafetyController/findSafetySelfCheckingManagetById', {
  391. id: e
  392. }, {})
  393. }
  394. export function findSafetySelfCheckingManageList(e) {
  395. // 查询园区列表,不需要参数
  396. return $http.post(
  397. '/wx/SafetyController/findSafetySelfCheckingManageList', e, {})
  398. }
  399. export function findYuanQuList() {
  400. // 查询园区列表,不需要参数
  401. return $http.post(
  402. '/wx/SaleController/findYuanQuList', {}, {})
  403. }
  404. export function findLongPanList(id) {
  405. // 用园区ID查询楼盘列表
  406. return $http.post(
  407. '/wx/SaleController/findLouPanList', {
  408. id: id
  409. }, {})
  410. }
  411. export function findLouDongList(id) {
  412. // 用园区ID查询楼盘列表
  413. return $http.post(
  414. '/wx/SaleController/findLouDongList', {
  415. id: id
  416. }, {})
  417. }
  418. export function clickCollect(e) {
  419. return $http.post(
  420. '/wx/parkActivity/clickCollect',
  421. e, {})
  422. }
  423. export function insertRegisSignInfo(e) {
  424. return $http.post(
  425. '/wx/parkActivity/insertRegisSignInfo',
  426. e, {})
  427. }
  428. export function richScan(e) {
  429. return $http.post(
  430. '/wx/parkActivity/richScan',
  431. e, {})
  432. }
  433. export function getActivityById(id, signInCode, userId) {
  434. return $http.get(
  435. '/wx/parkActivity/getBySignInCode?id=' + id + '&userId=' + userId + "&signInCode=" + signInCode, {}, {})
  436. }
  437. export function getActivityById1(id, signInCode, userId) {
  438. return $http.get(
  439. '/wx/parkActivity/getActivityById?id=' + id + '&userId=' + userId, {}, {})
  440. }
  441. export function getUserPower(e) {
  442. return $http.post(
  443. '/wx/userPower/getUserPower', {
  444. userId: e
  445. }, {})
  446. }
  447. export function editBizPassword(e) {
  448. return $http.post(
  449. '/wx/handleUser/editBizPassword', e, {})
  450. }
  451. export function editFramePassword(e) {
  452. return $http.post(
  453. '/wx/handleUser/editFramePassword', e, {})
  454. }
  455. // /wx/handleUser/editDriverPassword
  456. export function editDriverPassword(e) {
  457. return $http.post(
  458. '/wx/handleUser/editDriverPassword', e, {})
  459. }
  460. export function updateListRectificationManagement(e) {
  461. return $http.post(
  462. '/wx/RectificationController/updateListRectificationManagement', e, {})
  463. }
  464. export function findListBySaleManagementId(e) {
  465. return $http.post(
  466. '/wx/SaleController/findListBySaleManagementId', e, {})
  467. }
  468. export function findSuccessListBySaleManagementId(e) {
  469. return $http.post(
  470. '/wx/SaleController/findSuccessListBySaleManagementId', e, {})
  471. }
  472. export function findUserListByRoleWuye() {
  473. // 用园区ID查询楼盘列表
  474. return $http.post(
  475. '/wx/RectificationController/findUserListByRoleWuye',
  476. {}, {})
  477. }
  478. export function listAllUserMain() {
  479. // 用园区ID查询楼盘列表
  480. return $http.post(
  481. '/wx/UserMainExpandController/listAllUserMain',
  482. {}, {})
  483. }
  484. export function userList(e) {
  485. return $http.post(
  486. '/wx/frameUser/userList',
  487. e
  488. , {})
  489. }
  490. export function findAllSimpleCompanies(e) {
  491. // http://192.168.2.112:9011/wx/frameUser/userList
  492. return $http.post(
  493. '/wx/company/findAllSimpleCompanies', { searchInfo: e.qymc, pageNum: 1, pageSize: 10000 }, {})
  494. }
  495. export function findTrackUserList() {
  496. // http://192.168.2.112:9011/wx/frameUser/userList
  497. return $http.post(
  498. '/wx/SaleController/findTrackUserList', {}, {})
  499. }
  500. export function getSelectUserTwo(e) {
  501. // 用园区ID查询楼盘列表
  502. return $http.post(
  503. '/wx/frameUser/getSelectUserTwo', {
  504. searchName: e
  505. }, {})
  506. }
  507. export function getSelectDeptTwo(e) {
  508. // 用园区ID查询楼盘列表
  509. return $http.post(
  510. '/wx/frameUser/getSelectDeptTwo',
  511. {
  512. searchName: e
  513. }, {})
  514. }
  515. export function findRoomInfoListByIds(e) {
  516. // 用园区ID查询楼盘列表
  517. return $http.post(
  518. '/wx/SaleController/findRoomInfoListByIds',
  519. {
  520. ids: e
  521. }, {})
  522. }
  523. export function findCompanyList() {
  524. // 用园区ID查询楼盘列表
  525. return $http.post(
  526. '/wx/SaleController/findCompanyList', {}, {})
  527. }
  528. export function addyixiang(e) {
  529. return $http.post(
  530. '/wx/SaleController/add',
  531. e, {})
  532. }
  533. export function editSave(e) {
  534. return $http.post(
  535. '/wx/SaleController/editSave',
  536. e, {})
  537. }
  538. export function findCompanyInfoList(data) {
  539. return $http.post(
  540. "/wx/SaleController/findCompanyInfoList",
  541. data, {}
  542. )
  543. }
  544. export function findRoomByCondition(params) {
  545. // 用园区ID查询楼盘列表
  546. return $http.post(
  547. '/wx/SaleController/findRoomByCondition', params, {})
  548. }
  549. export function getCompanyAll(qymc) {
  550. return $http.post(
  551. '/wx/company/listAll', {
  552. qymc: qymc ? qymc : ""
  553. }, {})
  554. }
  555. export function getByCodes(params) {
  556. // 用园区ID查询楼盘列表
  557. return $http.post(
  558. '/wx/sysDict/getByCodes',
  559. {
  560. codes: params
  561. }, {})
  562. }
  563. export function list(data) {
  564. return $http.post(
  565. parkActivity + '/getMeetingAppointList',
  566. data, {}
  567. )
  568. }
  569. export function listApp(data) {
  570. return $http.post(
  571. parkActivity + '/getMeetingAppointListApp',
  572. data, {}
  573. )
  574. }
  575. export function cancelAppoint(data) {
  576. return $http.post(
  577. parkActivity + '/cancelAppoint',
  578. data, {}
  579. )
  580. }
  581. // /wx/SaleController/
  582. export function getRepairList(data) {
  583. return $http.post(
  584. '/wx/repair/list',
  585. data, {}
  586. )
  587. }