http.js 15 KB

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