http.js 12 KB

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