http.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  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 getPartyBranchList(data) {
  65. return $http.post(
  66. '/wx/partyBranch/getPartyBranchList',
  67. data, {}
  68. )
  69. }
  70. export function getActivationRanking(data) {
  71. return $http.post(
  72. '/wx/partyBranch/getActivationRanking',
  73. data, {}
  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. debugger
  202. return $http.post('/wx/interviewEscalation/listAll', {
  203. companyId: id
  204. }, {})
  205. }
  206. export function getUserInfo(data) {
  207. let laocui_user_info = JSON.parse(uni.getStorageSync('laocui_user_info'))
  208. return $http.post(
  209. '/wx/frameUser/getMyInfo?userId=' + laocui_user_info.user.id, {}, {})
  210. }
  211. export function getRoomInfo(e) {
  212. return $http.post(
  213. '/wx/ParkRoomController/getById', {
  214. id: e
  215. }, {})
  216. }
  217. export function getCompanyHouseDetails(e) {
  218. return $http.post(
  219. '/wx/company/getById', {
  220. id: e
  221. }, {})
  222. }
  223. export function handleList(e) {
  224. return $http.post(
  225. '/wx/workPaneController/handleList',
  226. e, {})
  227. }
  228. export function readList(e) {
  229. return $http.post(
  230. '/wx/workPaneController/readList',
  231. e, {})
  232. }
  233. // handleList?
  234. export function findCompanyTags(e) {
  235. return $http.post(
  236. '/wx/MnpTagInfoController/getCompanyTags/' + e, {}, {})
  237. }
  238. export function removeTagsBind(e) {
  239. return $http.post(
  240. '/wx/MnpTagInfoController/removeBind', e, {}
  241. )
  242. }
  243. export function addInterview(e) {
  244. return $http.post(
  245. "/wx/interviewEscalation/add", e, {})
  246. }
  247. export function editInterview(e) {
  248. return $http.post(
  249. "/wx/interviewEscalation/edit", e, {})
  250. }
  251. export function getInterviewList(e) {
  252. return $http.post(
  253. "/wx/interviewEscalation/list", e, {})
  254. }
  255. export function getInterviewDetails(e) {
  256. return $http.post(
  257. "/wx/interviewEscalation/getById", {
  258. id: e
  259. }, {})
  260. }
  261. export function findSafetySelfCheckingPlanById(e) {
  262. return $http.post(
  263. "/wx/SafetyController/findSafetySelfCheckingPlanById", {
  264. id: e
  265. }, {})
  266. }
  267. //
  268. export function findSafetySelfCheckingPlanList(e) {
  269. return $http.post(
  270. "/wx/SafetyController/findSafetySelfCheckingPlanList",
  271. e, {})
  272. }
  273. export function getBySaveStatus(e) {
  274. return $http.post(
  275. "/wx/interviewEscalation/getBySaveStatus", {
  276. createdBy: e
  277. }, {})
  278. }
  279. export function companyExamineAdd(e) {
  280. return $http.post(
  281. "/wx/company/add", e, {})
  282. }
  283. export function listByModel(e) {
  284. return $http.post(
  285. '/wx/SaleController/findSaleManagementListByRoomId',
  286. e, {})
  287. }
  288. export function listVo(e) {
  289. // 查询园区列表,不需要参数
  290. return $http.post(
  291. '/wx/company/listVo', e, {})
  292. }
  293. // /wx/SafetyController/addSafetySelfCheckingPlan
  294. export function addSafetySelfCheckingPlan(e) {
  295. // 查询园区列表,不需要参数
  296. return $http.post(
  297. '/wx/SafetyController/addSafetySelfCheckingPlan', {
  298. ...e
  299. }, {})
  300. }
  301. export function findSafetySelfCheckingManagetById(e) {
  302. // 查询园区列表,不需要参数
  303. return $http.post(
  304. '/wx/SafetyController/findSafetySelfCheckingManagetById', {
  305. id: e
  306. }, {})
  307. }
  308. export function findSafetySelfCheckingManageList(e) {
  309. // 查询园区列表,不需要参数
  310. return $http.post(
  311. '/wx/SafetyController/findSafetySelfCheckingManageList', e, {})
  312. }
  313. export function findYuanQuList() {
  314. // 查询园区列表,不需要参数
  315. return $http.post(
  316. '/wx/SaleController/findYuanQuList', {}, {})
  317. }
  318. export function findLongPanList(id) {
  319. // 用园区ID查询楼盘列表
  320. return $http.post(
  321. '/wx/SaleController/findLouPanList', {
  322. id: id
  323. }, {})
  324. }
  325. export function findLouDongList(id) {
  326. // 用园区ID查询楼盘列表
  327. return $http.post(
  328. '/wx/SaleController/findLouDongList', {
  329. id: id
  330. }, {})
  331. }
  332. export function clickCollect(e) {
  333. return $http.post(
  334. '/wx/parkActivity/clickCollect',
  335. e, {})
  336. }
  337. export function insertRegisSignInfo(e) {
  338. return $http.post(
  339. '/wx/parkActivity/insertRegisSignInfo',
  340. e, {})
  341. }
  342. export function richScan(e) {
  343. return $http.post(
  344. '/wx/parkActivity/richScan',
  345. e, {})
  346. }
  347. export function getActivityById(id, signInCode, userId) {
  348. return $http.get(
  349. '/wx/parkActivity/getBySignInCode?id=' + id + '&userId=' + userId + "&signInCode=" + signInCode, {}, {})
  350. }
  351. // /wx/userPower/getUserPower?userId=1088765543780974592
  352. export function getUserPower(e) {
  353. return $http.post(
  354. '/wx/userPower/getUserPower', {
  355. userId: e
  356. }, {})
  357. }
  358. export function editPassword(e) {
  359. return $http.post(
  360. '/wx/frameUser/editPassword', e, {})
  361. }
  362. export function updateListRectificationManagement(e) {
  363. return $http.post(
  364. '/wx/RectificationController/updateListRectificationManagement', e, {})
  365. }
  366. // /wx/RectificationController/findUserListByRoleWuye
  367. export function findUserListByRoleWuye() {
  368. // 用园区ID查询楼盘列表
  369. return $http.post(
  370. '/wx/RectificationController/findUserListByRoleWuye',
  371. {}, {})
  372. }
  373. export function getSelectUserTwo(e) {
  374. // 用园区ID查询楼盘列表
  375. return $http.post(
  376. '/wx/frameUser/getSelectUserTwo', {
  377. searchName: e
  378. }, {})
  379. }
  380. export function getSelectDeptTwo(e) {
  381. // 用园区ID查询楼盘列表
  382. return $http.post(
  383. '/wx/frameUser/getSelectDeptTwo',
  384. {
  385. searchName: e
  386. }, {})
  387. }
  388. export function findRoomInfoListByIds(e) {
  389. // 用园区ID查询楼盘列表
  390. return $http.post(
  391. '/wx/SaleController/findRoomInfoListByIds',
  392. {
  393. ids: e
  394. }, {})
  395. }
  396. export function findCompanyList() {
  397. // 用园区ID查询楼盘列表
  398. return $http.post(
  399. '/wx/SaleController/findCompanyList', {}, {})
  400. }
  401. export function addyixiang(e) {
  402. return $http.post(
  403. '/wx/SaleController/add',
  404. e, {})
  405. }
  406. export function findCompanyInfoList(data) {
  407. return $http.post(
  408. "/wx/SaleController/findCompanyInfoList",
  409. data, {}
  410. )
  411. }
  412. export function findRoomByCondition(params) {
  413. // 用园区ID查询楼盘列表
  414. return $http.post(
  415. '/wx/SaleController/findRoomByCondition', params, {})
  416. }
  417. export function getCompanyAll(qymc) {
  418. return $http.post(
  419. '/wx/company/listAll', {
  420. qymc: qymc ? qymc : ""
  421. }, {})
  422. }
  423. export function getByCodes(params) {
  424. // 用园区ID查询楼盘列表
  425. return $http.post(
  426. '/wx/sysDict/getByCodes',
  427. {
  428. codes: params
  429. }, {})
  430. }
  431. export function list(data) {
  432. return $http.post(
  433. parkActivity + '/getMeetingAppointList',
  434. data, {}
  435. )
  436. }
  437. export function listApp(data) {
  438. return $http.post(
  439. parkActivity + '/getMeetingAppointListApp',
  440. data, {}
  441. )
  442. }
  443. export function cancelAppoint(data) {
  444. return $http.post(
  445. parkActivity + '/cancelAppoint',
  446. data, {}
  447. )
  448. }
  449. // /wx/SaleController/
  450. export function getRepairList(data) {
  451. return $http.post(
  452. '/wx/repair/list',
  453. data, {}
  454. )
  455. }