http.js 13 KB

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