http.js 14 KB

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