http.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  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 findRectificationManagementInOutList(data) {
  65. return $http.post(
  66. '/wx/RectificationController/findRectificationManagementInOutList',
  67. data, {}
  68. )
  69. }
  70. export function findRectificationManagementInOutById(e) {
  71. return $http.post(
  72. '/wx/RectificationController/findRectificationManagementInOutById', {
  73. id: e
  74. }, {}
  75. )
  76. }
  77. export function repairList(data) {
  78. return $http.post(
  79. '/wx/repair/list',
  80. data, {}
  81. )
  82. }
  83. export function addSafetySelfCheckingManage(data) {
  84. return $http.post(
  85. '/wx/SafetyController/addSafetySelfCheckingManage',
  86. data, {}
  87. )
  88. }
  89. export function updateSafetySelfCheckingManage(data) {
  90. return $http.post(
  91. '/wx/SafetyController/updateSafetySelfCheckingManage',
  92. data, {}
  93. )
  94. }
  95. export function editRepair(data) {
  96. return $http.post(
  97. '/wx/repair/edit',
  98. data, {}
  99. )
  100. }
  101. export function addRepair(data) {
  102. return $http.post(
  103. '/wx/repair/add',
  104. data, {}
  105. )
  106. }
  107. export function getRepairDispatchById(id) {
  108. return $http.post(
  109. '/wx/repair/getById', {
  110. id: id
  111. }, {}
  112. )
  113. }
  114. export function getDispatchToPerson(data) {
  115. return $http.post(
  116. '/wx/repair/getDispatchToPerson',
  117. data, {}
  118. )
  119. }
  120. export function getCompanyById(data) {
  121. return $http.post(
  122. '/wx/repair/getCompanyById', data, {},
  123. )
  124. }
  125. export function getWxCompanyTags(e) {
  126. return $http.post(
  127. '/wx/MnpTagInfoController/tagInfoList', e, {}
  128. )
  129. }
  130. export function tagsBind(e) {
  131. return $http.post(
  132. '/wx/MnpTagInfoController/bind', e, {}
  133. )
  134. }
  135. export function getDetial(e) {
  136. return $http.post(
  137. '/wx/meetingAppoint/meetingAppointDetail', e, {}
  138. )
  139. }
  140. export function saleControllerGetById(e) {
  141. return $http.post(
  142. '/wx/SaleController/getById', {
  143. id: e
  144. }, {}
  145. )
  146. }
  147. export function getAppUserMain(data) {
  148. return $http.post(
  149. '/wx/company/getById',
  150. data, {}
  151. )
  152. }
  153. export function confirmAudit(data) {
  154. return $http.post(
  155. '/wx/meetingAppoint/confirmAudit',
  156. data, {}
  157. )
  158. }
  159. export function getCompanyTags(e) {
  160. return $http.post(
  161. '/wx/MnpTagInfoController/getCompanyTags', e, {}
  162. )
  163. }
  164. export function getCompanyTagsByQybq(qybq) {
  165. return $http.post(
  166. '/wx/MnpTagInfoController/getCompanyTagsByQybq', {
  167. qybq: qybq
  168. }, {})
  169. }
  170. export function companyECdit(data) {
  171. return $http.post(
  172. '/wx/company/edit', data, {})
  173. }
  174. export function tagInfoList(e) {
  175. return $http.post(
  176. '/wx/MnpTagInfoController/tagInfoList',
  177. e, {})
  178. }
  179. export function findDeptList() {
  180. return $http.post(
  181. '/wx/SaleController/findDeptList', {}, {})
  182. }
  183. export function tagCategoryList() {
  184. return $http.post(
  185. '/wx/MnpTagController/tagCategoryList', {}, {}
  186. )
  187. }
  188. export function interviewEscalationListAll(id) {
  189. debugger
  190. return $http.post('/wx/interviewEscalation/listAll', {
  191. companyId: id
  192. }, {})
  193. }
  194. export function getUserInfo(data) {
  195. let laocui_user_info = JSON.parse(uni.getStorageSync('laocui_user_info'))
  196. return $http.post(
  197. '/wx/frameUser/getMyInfo?userId=' + laocui_user_info.user.id, {}, {})
  198. }
  199. export function getRoomInfo(e) {
  200. return $http.post(
  201. '/wx/ParkRoomController/getById', {
  202. id: e
  203. }, {})
  204. }
  205. export function getCompanyHouseDetails(e) {
  206. return $http.post(
  207. '/wx/company/getById', {
  208. id: e
  209. }, {})
  210. }
  211. export function handleList(e) {
  212. return $http.post(
  213. '/wx/workPaneController/handleList',
  214. e, {})
  215. }
  216. export function readList(e) {
  217. return $http.post(
  218. '/wx/workPaneController/readList',
  219. e, {})
  220. }
  221. // handleList?
  222. export function findCompanyTags(e) {
  223. return $http.post(
  224. '/wx/MnpTagInfoController/getCompanyTags/' + e, {}, {})
  225. }
  226. export function removeTagsBind(e) {
  227. return $http.post(
  228. '/wx/MnpTagInfoController/removeBind', e, {}
  229. )
  230. }
  231. export function addInterview(e) {
  232. return $http.post(
  233. "/wx/interviewEscalation/add", e, {})
  234. }
  235. export function editInterview(e) {
  236. return $http.post(
  237. "/wx/interviewEscalation/edit", e, {})
  238. }
  239. export function getInterviewList(e) {
  240. return $http.post(
  241. "/wx/interviewEscalation/list", e, {})
  242. }
  243. export function getInterviewDetails(e) {
  244. return $http.post(
  245. "/wx/interviewEscalation/getById", {
  246. id: e
  247. }, {})
  248. }
  249. export function findSafetySelfCheckingPlanById(e) {
  250. return $http.post(
  251. "/wx/SafetyController/findSafetySelfCheckingPlanById", {
  252. id: e
  253. }, {})
  254. }
  255. //
  256. export function findSafetySelfCheckingPlanList(e) {
  257. return $http.post(
  258. "/wx/SafetyController/findSafetySelfCheckingPlanList",
  259. e, {})
  260. }
  261. export function getBySaveStatus(e) {
  262. return $http.post(
  263. "/wx/interviewEscalation/getBySaveStatus", {
  264. createdBy: e
  265. }, {})
  266. }
  267. export function companyExamineAdd(e) {
  268. return $http.post(
  269. "/wx/company/add", e, {})
  270. }
  271. export function listByModel(e) {
  272. return $http.post(
  273. '/wx/SaleController/findSaleManagementListByRoomId',
  274. e, {})
  275. }
  276. export function listVo(e) {
  277. // 查询园区列表,不需要参数
  278. return $http.post(
  279. '/wx/company/listVo', e, {})
  280. }
  281. // /wx/SafetyController/addSafetySelfCheckingPlan
  282. export function addSafetySelfCheckingPlan(e) {
  283. // 查询园区列表,不需要参数
  284. return $http.post(
  285. '/wx/SafetyController/addSafetySelfCheckingPlan', {
  286. ...e
  287. }, {})
  288. }
  289. export function findSafetySelfCheckingManagetById(e) {
  290. // 查询园区列表,不需要参数
  291. return $http.post(
  292. '/wx/SafetyController/findSafetySelfCheckingManagetById', {
  293. id: e
  294. }, {})
  295. }
  296. export function findSafetySelfCheckingManageList(e) {
  297. // 查询园区列表,不需要参数
  298. return $http.post(
  299. '/wx/SafetyController/findSafetySelfCheckingManageList', e, {})
  300. }
  301. export function findYuanQuList() {
  302. // 查询园区列表,不需要参数
  303. return $http.post(
  304. '/wx/SaleController/findYuanQuList', {}, {})
  305. }
  306. export function findLongPanList(id) {
  307. // 用园区ID查询楼盘列表
  308. return $http.post(
  309. '/wx/SaleController/findLouPanList', {
  310. id: id
  311. }, {})
  312. }
  313. export function findLouDongList(id) {
  314. // 用园区ID查询楼盘列表
  315. return $http.post(
  316. '/wx/SaleController/findLouDongList', {
  317. id: id
  318. }, {})
  319. }
  320. export function clickCollect(e) {
  321. return $http.post(
  322. '/wx/parkActivity/clickCollect',
  323. e, {})
  324. }
  325. export function insertRegisSignInfo(e) {
  326. return $http.post(
  327. '/wx/parkActivity/insertRegisSignInfo',
  328. e, {})
  329. }
  330. export function richScan(e) {
  331. return $http.post(
  332. '/wx/parkActivity/richScan',
  333. e, {})
  334. }
  335. export function getActivityById(id, signInCode, userId) {
  336. return $http.get(
  337. '/wx/parkActivity/getBySignInCode?id=' + id + '&userId=' + userId + "&signInCode=" + signInCode, {}, {})
  338. }
  339. // /wx/userPower/getUserPower?userId=1088765543780974592
  340. export function getUserPower(e) {
  341. return $http.post(
  342. '/wx/userPower/getUserPower', {
  343. userId: e
  344. }, {})
  345. }
  346. export function editPassword(e) {
  347. return $http.post(
  348. '/wx/frameUser/editPassword', e, {})
  349. }
  350. export function updateListRectificationManagement(e) {
  351. return $http.post(
  352. '/wx/RectificationController/updateListRectificationManagement', e, {})
  353. }
  354. // /wx/RectificationController/findUserListByRoleWuye
  355. export function findUserListByRoleWuye() {
  356. // 用园区ID查询楼盘列表
  357. return $http.post(
  358. '/wx/RectificationController/findUserListByRoleWuye',
  359. {}, {})
  360. }
  361. export function getSelectUserTwo(e) {
  362. // 用园区ID查询楼盘列表
  363. return $http.post(
  364. '/wx/frameUser/getSelectUserTwo', {
  365. searchName: e
  366. }, {})
  367. }
  368. export function getSelectDeptTwo(e) {
  369. // 用园区ID查询楼盘列表
  370. return $http.post(
  371. '/wx/frameUser/getSelectDeptTwo',
  372. {
  373. searchName: e
  374. }, {})
  375. }
  376. export function findRoomInfoListByIds(e) {
  377. // 用园区ID查询楼盘列表
  378. return $http.post(
  379. '/wx/SaleController/findRoomInfoListByIds',
  380. {
  381. ids: e
  382. }, {})
  383. }
  384. export function findCompanyList() {
  385. // 用园区ID查询楼盘列表
  386. return $http.post(
  387. '/wx/SaleController/findCompanyList', {}, {})
  388. }
  389. export function addyixiang(e) {
  390. return $http.post(
  391. '/wx/SaleController/add',
  392. e, {})
  393. }
  394. export function findCompanyInfoList(data) {
  395. return $http.post(
  396. "/wx/SaleController/findCompanyInfoList",
  397. data, {}
  398. )
  399. }
  400. export function findRoomByCondition(params) {
  401. // 用园区ID查询楼盘列表
  402. return $http.post(
  403. '/wx/SaleController/findRoomByCondition', params, {})
  404. }
  405. export function getCompanyAll(qymc) {
  406. return $http.post(
  407. '/wx/company/listAll', {
  408. qymc: qymc ? qymc : ""
  409. }, {})
  410. }
  411. export function getByCodes(params) {
  412. // 用园区ID查询楼盘列表
  413. return $http.post(
  414. '/wx/sysDict/getByCodes',
  415. {
  416. codes: params
  417. }, {})
  418. }
  419. export function list(data) {
  420. return $http.post(
  421. parkActivity + '/getMeetingAppointList',
  422. data, {}
  423. )
  424. }
  425. export function listApp(data) {
  426. return $http.post(
  427. parkActivity + '/getMeetingAppointListApp',
  428. data, {}
  429. )
  430. }
  431. export function cancelAppoint(data) {
  432. return $http.post(
  433. parkActivity + '/cancelAppoint',
  434. data, {}
  435. )
  436. }
  437. // /wx/SaleController/
  438. export function getRepairList(data) {
  439. return $http.post(
  440. '/wx/repair/list',
  441. data, {}
  442. )
  443. }