http.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  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 loginByCompany(data) {
  13. return $http.post(
  14. '/wx/auth/loginByCompany',
  15. data, {}
  16. )
  17. }
  18. export function addRectificationManagement(data) {
  19. return $http.post(
  20. '/wx/RectificationController/addRectificationManagement',
  21. data, {}
  22. )
  23. }
  24. export function loginByWeixin2(code) {
  25. return $http.post(
  26. '/wx/auth/login_by_weixin2',
  27. code, {}
  28. )
  29. }export function switchCommonUser(code) {
  30. return $http.post(
  31. '/wx/auth/switchCommonUser',
  32. code, {}
  33. )
  34. }
  35. export function getUserLocalStorageInfo() {
  36. const userInfo = JSON.parse(
  37. uni.getStorageSync("USERINFO"));
  38. return userInfo
  39. }
  40. export function uploadPDF() {
  41. uni.showLoading({
  42. title: '加载中',
  43. mask: true
  44. });
  45. return new Promise((resolve, reject) => {
  46. uni.chooseMessageFile({
  47. count: 1, //默认100
  48. type: 'file',
  49. success: (res) => {
  50. uni.uploadFile({
  51. url: BASE_URI + "/wx/fileController/upload",
  52. filePath: res.tempFiles[0].path,
  53. name: "file",
  54. formData: {
  55. user: "test"
  56. },
  57. success(successRes) {
  58. // 上传完成需要更新 fileList
  59. let data = JSON.parse(successRes.data);
  60. uni.showToast({
  61. title: '提交成功',
  62. duration: 500
  63. });
  64. resolve({
  65. url: data.data[0],
  66. name: res.tempFiles[0].name
  67. })
  68. },
  69. fail(res) { },
  70. });
  71. },
  72. fail(e) {
  73. uni.showToast({
  74. title: '提交成功',
  75. duration: 0
  76. });
  77. }
  78. });
  79. })
  80. }
  81. export function getBuildDetails(data) {
  82. return $http.post(
  83. '/wx/MnpBuildingController/getById',
  84. data, {}
  85. )
  86. }
  87. export function addZaiti(data) {
  88. return $http.post(
  89. '/wx/ParkRoomController/add',
  90. data, {}
  91. )
  92. }
  93. export function getCompanyById2(data) {
  94. return $http.post(
  95. '/wx/roadShow/getCompanyById',
  96. data, {}
  97. )
  98. }
  99. export function add(data) {
  100. return $http.post(
  101. '/wx/repair/add',
  102. data, {}
  103. )
  104. }
  105. export function getPartyBranchList(data) {
  106. return $http.post(
  107. '/wx/partyBranch/getPartyBranchList',
  108. data, {}
  109. )
  110. }
  111. export function selectByCompanyId(data) {
  112. return $http.post(
  113. '/wx/SocialCarrierController/selectByCompanyId',
  114. data, {}
  115. )
  116. }
  117. export function getTreeData2(data) {
  118. return $http.post(
  119. '/wx/ParkInfoController/getTreeData2',
  120. data, {}
  121. )
  122. }
  123. export function getTreeData6(data) {
  124. return $http.post(
  125. '/wx/ParkInfoController/getTreeData6',
  126. data, {}
  127. )
  128. }
  129. export function getActivationRanking(data) {
  130. return $http.post(
  131. '/wx/partyBranch/getActivationRanking',
  132. data, {}
  133. )
  134. }
  135. export function findRectificationManagementInOutList(data) {
  136. return $http.post(
  137. '/wx/RectificationController/findRectificationManagementInOutList',
  138. data, {}
  139. )
  140. }
  141. export function findRectificationManagementInOutById(e) {
  142. return $http.post(
  143. '/wx/RectificationController/findRectificationManagementInOutById', {
  144. id: e
  145. }, {}
  146. )
  147. }
  148. export function repairList(data) {
  149. return $http.post(
  150. '/wx/repair/list',
  151. data, {}
  152. )
  153. }
  154. export function addSafetySelfCheckingManage(data) {
  155. return $http.post(
  156. '/wx/SafetyController/addSafetySelfCheckingManage',
  157. data, {}
  158. )
  159. }
  160. export function updateSafetySelfCheckingManage(data) {
  161. return $http.post(
  162. '/wx/SafetyController/updateSafetySelfCheckingManage',
  163. data, {}
  164. )
  165. }
  166. export function editRepair(data) {
  167. return $http.post(
  168. '/wx/repair/edit',
  169. data, {}
  170. )
  171. }
  172. export function addRepair(data) {
  173. return $http.post(
  174. '/wx/repair/add',
  175. data, {}
  176. )
  177. }
  178. export function getRepairDispatchById(id) {
  179. return $http.post(
  180. '/wx/repair/getById', {
  181. id: id
  182. }, {}
  183. )
  184. }
  185. export function getDispatchToPerson(data) {
  186. return $http.post(
  187. '/wx/repair/getDispatchToPerson',
  188. data, {}
  189. )
  190. }
  191. export function getCompanyById(data) {
  192. return $http.post(
  193. '/wx/repair/getCompanyById', data, {},
  194. )
  195. }
  196. export function getWxCompanyTags(e) {
  197. return $http.post(
  198. '/wx/MnpTagInfoController/tagInfoList', e, {}
  199. )
  200. }
  201. export function tagsBind(e) {
  202. return $http.post(
  203. '/wx/MnpTagInfoController/bind', e, {}
  204. )
  205. }
  206. export function getDetial(e) {
  207. return $http.post(
  208. '/wx/meetingAppoint/meetingAppointDetail', e, {}
  209. )
  210. }
  211. export function saleControllerGetById(e) {
  212. return $http.post(
  213. '/wx/SaleController/getById', {
  214. id: e
  215. }, {}
  216. )
  217. }
  218. export function getAppUserMain(data) {
  219. return $http.post(
  220. '/wx/company/getById',
  221. data, {}
  222. )
  223. }
  224. export function confirmAudit(data) {
  225. return $http.post(
  226. '/wx/meetingAppoint/confirmAudit',
  227. data, {}
  228. )
  229. }
  230. export function getCompanyTags(e) {
  231. return $http.post(
  232. '/wx/MnpTagInfoController/getCompanyTags', e, {}
  233. )
  234. }
  235. export function getCompanyTagsByQybq(qybq) {
  236. return $http.post(
  237. '/wx/MnpTagInfoController/getCompanyTagsByQybq', {
  238. qybq: qybq
  239. }, {})
  240. }
  241. export function companyECdit(data) {
  242. return $http.post(
  243. '/wx/company/edit', data, {})
  244. }
  245. export function tagInfoList(e) {
  246. return $http.post(
  247. '/wx/MnpTagInfoController/tagInfoList',
  248. e, {})
  249. }
  250. export function findDeptList() {
  251. return $http.post(
  252. '/wx/SaleController/findDeptList', {}, {})
  253. }
  254. export function tagCategoryList() {
  255. return $http.post(
  256. '/wx/MnpTagController/tagCategoryList', {}, {}
  257. )
  258. }
  259. export function interviewEscalationListAll(id) {
  260. return $http.post('/wx/interviewEscalation/listAll', {
  261. companyId: id
  262. }, {})
  263. }
  264. export function getUserInfo(data) {
  265. let laocui_user_info = JSON.parse(uni.getStorageSync('laocui_user_info'))
  266. return $http.post(
  267. '/wx/frameUser/getMyInfo?userId=' + laocui_user_info.user.id, {}, {})
  268. }
  269. export function getRoomInfo(e) {
  270. return $http.post(
  271. '/wx/ParkRoomController/getById', {
  272. id: e
  273. }, {})
  274. }
  275. export function getCompanyHouseDetails(e) {
  276. return $http.post(
  277. '/wx/company/getById', {
  278. id: e
  279. }, {})
  280. }
  281. export function handleList(e) {
  282. return $http.post(
  283. '/wx/workPaneController/handleList',
  284. e, {})
  285. }
  286. export function readList(e) {
  287. return $http.post(
  288. '/wx/workPaneController/readList',
  289. e, {})
  290. }
  291. // handleList?
  292. export function findCompanyTags(e) {
  293. return $http.post(
  294. '/wx/MnpTagInfoController/getCompanyTags/' + e, {}, {})
  295. }
  296. export function removeTagsBind(e) {
  297. return $http.post(
  298. '/wx/MnpTagInfoController/removeBind', e, {}
  299. )
  300. }
  301. export function addInterview(e) {
  302. return $http.post(
  303. "/wx/interviewEscalation/add", e, {})
  304. }
  305. export function editInterview(e) {
  306. return $http.post(
  307. "/wx/interviewEscalation/edit", e, {})
  308. }
  309. export function getInterviewList(e) {
  310. return $http.post(
  311. "/wx/interviewEscalation/list", e, {})
  312. }
  313. export function getInterviewDetails(e) {
  314. return $http.post(
  315. "/wx/interviewEscalation/getById", {
  316. id: e
  317. }, {})
  318. }
  319. export function findSafetySelfCheckingPlanById(e) {
  320. return $http.post(
  321. "/wx/SafetyController/findSafetySelfCheckingPlanById", {
  322. id: e
  323. }, {})
  324. }
  325. //
  326. export function findSafetySelfCheckingPlanList(e) {
  327. return $http.post(
  328. "/wx/SafetyController/findSafetySelfCheckingPlanList",
  329. e, {})
  330. }
  331. export function getBySaveStatus(e) {
  332. return $http.post(
  333. "/wx/interviewEscalation/getBySaveStatus", {
  334. createdBy: e
  335. }, {})
  336. }
  337. export function companyExamineAdd(e) {
  338. return $http.post(
  339. "/wx/company/add", e, {})
  340. }
  341. export function listByModel(e) {
  342. return $http.post(
  343. '/wx/SaleController/findSaleManagementListByRoomId',
  344. e, {})
  345. }
  346. export function listVo(e) {
  347. // 查询园区列表,不需要参数
  348. return $http.post(
  349. '/wx/company/listVo', e, {})
  350. }
  351. // /wx/SafetyController/addSafetySelfCheckingPlan
  352. export function addSafetySelfCheckingPlan(e) {
  353. // 查询园区列表,不需要参数
  354. return $http.post(
  355. '/wx/SafetyController/addSafetySelfCheckingPlan', {
  356. ...e
  357. }, {})
  358. }
  359. export function findSafetySelfCheckingManagetById(e) {
  360. // 查询园区列表,不需要参数
  361. return $http.post(
  362. '/wx/SafetyController/findSafetySelfCheckingManagetById', {
  363. id: e
  364. }, {})
  365. }
  366. export function findSafetySelfCheckingManageList(e) {
  367. // 查询园区列表,不需要参数
  368. return $http.post(
  369. '/wx/SafetyController/findSafetySelfCheckingManageList', e, {})
  370. }
  371. export function findYuanQuList() {
  372. // 查询园区列表,不需要参数
  373. return $http.post(
  374. '/wx/SaleController/findYuanQuList', {}, {})
  375. }
  376. export function findLongPanList(id) {
  377. // 用园区ID查询楼盘列表
  378. return $http.post(
  379. '/wx/SaleController/findLouPanList', {
  380. id: id
  381. }, {})
  382. }
  383. export function findLouDongList(id) {
  384. // 用园区ID查询楼盘列表
  385. return $http.post(
  386. '/wx/SaleController/findLouDongList', {
  387. id: id
  388. }, {})
  389. }
  390. export function clickCollect(e) {
  391. return $http.post(
  392. '/wx/parkActivity/clickCollect',
  393. e, {})
  394. }
  395. export function insertRegisSignInfo(e) {
  396. return $http.post(
  397. '/wx/parkActivity/insertRegisSignInfo',
  398. e, {})
  399. }
  400. export function richScan(e) {
  401. return $http.post(
  402. '/wx/parkActivity/richScan',
  403. e, {})
  404. }
  405. export function getActivityById(id, signInCode, userId) {
  406. return $http.get(
  407. '/wx/parkActivity/getBySignInCode?id=' + id + '&userId=' + userId + "&signInCode=" + signInCode, {}, {})
  408. }
  409. // /wx/userPower/getUserPower?userId=1088765543780974592
  410. export function getUserPower(e) {
  411. return $http.post(
  412. '/wx/userPower/getUserPower', {
  413. userId: e
  414. }, {})
  415. }
  416. export function editPassword(e) {
  417. return $http.post(
  418. '/wx/frameUser/editPassword', e, {})
  419. }
  420. export function updateListRectificationManagement(e) {
  421. return $http.post(
  422. '/wx/RectificationController/updateListRectificationManagement', e, {})
  423. }
  424. // /wx/RectificationController/findUserListByRoleWuye
  425. export function findUserListByRoleWuye() {
  426. // 用园区ID查询楼盘列表
  427. return $http.post(
  428. '/wx/RectificationController/findUserListByRoleWuye',
  429. {}, {})
  430. }
  431. export function listAllUserMain() {
  432. // 用园区ID查询楼盘列表
  433. return $http.post(
  434. '/wx/UserMainExpandController/listAllUserMain',
  435. {}, {})
  436. }
  437. export function userList(e) {
  438. // http://192.168.2.112:9011/wx/frameUser/userList
  439. return $http.post(
  440. '/wx/frameUser/userList',
  441. e
  442. , {})
  443. }
  444. export function findAllSimpleCompanies(e) {
  445. // http://192.168.2.112:9011/wx/frameUser/userList
  446. return $http.post(
  447. '/wx/company/findAllSimpleCompanies', { searchInfo: e.qymc, pageNum: 1, pageSize: 10000 }, {})
  448. }
  449. export function findTrackUserList() {
  450. // http://192.168.2.112:9011/wx/frameUser/userList
  451. return $http.post(
  452. '/wx/SaleController/findTrackUserList', {}, {})
  453. }
  454. export function getSelectUserTwo(e) {
  455. // 用园区ID查询楼盘列表
  456. return $http.post(
  457. '/wx/frameUser/getSelectUserTwo', {
  458. searchName: e
  459. }, {})
  460. }
  461. export function getSelectDeptTwo(e) {
  462. // 用园区ID查询楼盘列表
  463. return $http.post(
  464. '/wx/frameUser/getSelectDeptTwo',
  465. {
  466. searchName: e
  467. }, {})
  468. }
  469. export function findRoomInfoListByIds(e) {
  470. // 用园区ID查询楼盘列表
  471. return $http.post(
  472. '/wx/SaleController/findRoomInfoListByIds',
  473. {
  474. ids: e
  475. }, {})
  476. }
  477. export function findCompanyList() {
  478. // 用园区ID查询楼盘列表
  479. return $http.post(
  480. '/wx/SaleController/findCompanyList', {}, {})
  481. }
  482. export function addyixiang(e) {
  483. return $http.post(
  484. '/wx/SaleController/add',
  485. e, {})
  486. }
  487. export function editSave(e) {
  488. return $http.post(
  489. '/wx/SaleController/editSave',
  490. e, {})
  491. }
  492. export function findCompanyInfoList(data) {
  493. return $http.post(
  494. "/wx/SaleController/findCompanyInfoList",
  495. data, {}
  496. )
  497. }
  498. export function findRoomByCondition(params) {
  499. // 用园区ID查询楼盘列表
  500. return $http.post(
  501. '/wx/SaleController/findRoomByCondition', params, {})
  502. }
  503. export function getCompanyAll(qymc) {
  504. return $http.post(
  505. '/wx/company/listAll', {
  506. qymc: qymc ? qymc : ""
  507. }, {})
  508. }
  509. export function getByCodes(params) {
  510. // 用园区ID查询楼盘列表
  511. return $http.post(
  512. '/wx/sysDict/getByCodes',
  513. {
  514. codes: params
  515. }, {})
  516. }
  517. export function list(data) {
  518. return $http.post(
  519. parkActivity + '/getMeetingAppointList',
  520. data, {}
  521. )
  522. }
  523. export function listApp(data) {
  524. return $http.post(
  525. parkActivity + '/getMeetingAppointListApp',
  526. data, {}
  527. )
  528. }
  529. export function cancelAppoint(data) {
  530. return $http.post(
  531. parkActivity + '/cancelAppoint',
  532. data, {}
  533. )
  534. }
  535. // /wx/SaleController/
  536. export function getRepairList(data) {
  537. return $http.post(
  538. '/wx/repair/list',
  539. data, {}
  540. )
  541. }
  542. export function editHomeCommunityActivity(data) {
  543. return $http.post(
  544. '/wx/homeActivity/editHomeCommunityActivity',
  545. data, {}
  546. )
  547. }
  548. export function listHomeCommunityActivity(data) {
  549. return $http.post(
  550. '/wx/homeActivity/listHomeCommunityActivity',
  551. data, {}
  552. )
  553. }
  554. export function isFinishComInfo(data) {
  555. return $http.post(
  556. '/wx/company/isFinishComInfo',
  557. data, {}
  558. )
  559. }
  560. export function getById(data) {
  561. return $http.post(
  562. '/wx/company/getById',
  563. data, {}
  564. )
  565. }
  566. export function addCompanyExamine(data) {
  567. return $http.post(
  568. '/wx/companyExamine/add',
  569. data, {}
  570. )
  571. }
  572. export function upload(data) {
  573. return $http.post(
  574. '/wx/fileController/upload',
  575. data, {}
  576. )
  577. }
  578. export function newNotice(data) {
  579. return $http.post(
  580. '/wx/noticePark/newNotice',
  581. data, {}
  582. )
  583. }
  584. export function noticeParkList(data) {
  585. return $http.post(
  586. '/wx/noticePark/list',
  587. data, {}
  588. )
  589. }
  590. export function propertyNoticeList(data) {
  591. return $http.post(
  592. '/wx/propertyNotice/list',
  593. data, {}
  594. )
  595. }
  596. export function noticeParkClickCollect(data) {
  597. return $http.post(
  598. '/wx/noticePark/clickCollect',
  599. data, {}
  600. )
  601. }
  602. export function propertyNoticeClickCollect(data) {
  603. return $http.post(
  604. '/wx/propertyNotice/clickCollect ',
  605. data, {}
  606. )
  607. }
  608. export function userNoticeAdd(data) {
  609. return $http.post(
  610. '/wx/userNotice/add',
  611. data, {}
  612. )
  613. }
  614. // 园区通知发布
  615. export function noticeParkAdd(data) {
  616. return $http.post(
  617. '/wx/noticePark/add',
  618. data, {}
  619. )
  620. }
  621. export function noticeParkGetById(data) {
  622. return $http.post(
  623. '/wx/noticePark/getById',
  624. data, {}
  625. )
  626. }
  627. // 园区通知编辑
  628. export function noticeParkEdit(data) {
  629. return $http.post(
  630. '/wx/noticePark/edit',
  631. data, {}
  632. )
  633. }
  634. // 新增我的反馈
  635. export function parkFeedbackInfoAdd(data) {
  636. return $http.post(
  637. '/wx/parkFeedbackInfo/add',
  638. data, {}
  639. )
  640. }
  641. // 新增我的反馈
  642. export function parkFeedbackInfoList(data) {
  643. return $http.post(
  644. '/wx/parkFeedbackInfo/list',
  645. data, {}
  646. )
  647. }
  648. // 获取我的反馈详情
  649. export function parkFeedbackInfoGetById(data) {
  650. return $http.get(
  651. '/wx/parkFeedbackInfo/getById',
  652. data, {}
  653. )
  654. }
  655. // 我的收藏列表
  656. export function parkUserCollectorsList(data) {
  657. return $http.post(
  658. '/wx/parkUserCollectors/list',
  659. data, {}
  660. )
  661. }
  662. // 产业政策列表
  663. export function policyList(data) {
  664. return $http.post(
  665. '/wx/policy/list',
  666. data, {}
  667. )
  668. }
  669. // 产业政策类型
  670. export function policyListAll(data) {
  671. return $http.post(
  672. '/wx/policyType/listAll',
  673. data, {}
  674. )
  675. }