http.js 15 KB

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