api.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. import {
  2. baseUrl,
  3. baseApiUrl
  4. } from './config.js';
  5. import * as common from './common.js' //引入common
  6. import * as db from './db.js' //引入common
  7. // 需要登陆的,都写到这里,否则就是不需要登陆的接口
  8. let methodsToken = ['profile', 'refreshUser', 'wxLogin', 'changeMobile', 'addCart',
  9. 'previewOrder', 'getWuyuanUser', 'archives_post', 'get_channel_fields', 'get_channel', 'lists', 'details',
  10. 'logOffVolunteer', 'getCrProperty', 'joinTeam', 'getTeamMember', 'getPatrolTask', 'claimCr',
  11. 'getPatrolLog', 'claimCrList', 'claimCrDetails', 'editMainBodyUser', , 'contribute',
  12. 'getPatrolTaskDetails', 'getContentDetail', 'examineVolunteer', 'userManageRegionCrAuth', 'applyVolunteer',
  13. 'getPhoneNumber', 'editApplyVolunteer', 'mobileBindVolunteer', 'getTeamDetails', 'examineTask', 'removeMemberm',
  14. 'getScoreLog', 'rankingList', 'getMainBodyColumnContentList', 'regionData', 'cityData', 'checkIn',
  15. 'getMainBodyUser', 'getUserContribute', 'getUserHonor', 'submitTask', 'exportPatrolRecord', 'userManageCrAuth',
  16. 'getDevices'
  17. ];
  18. const post = (method, data, callback, type, orgurl) => {
  19. //填入默认主体id为1
  20. data.main_body_id = 1;
  21. let userToken = '';
  22. let auth = '';
  23. // 判断token是否存在
  24. console.log("method: ", method);
  25. if (methodsToken.indexOf(method) >= 0) {
  26. // 获取用户token
  27. let auth = db.get("auth");
  28. // console.log(auth);
  29. let nowdate = (new Date()) / 1000; //当前时间戳
  30. //新增用户判断是否登录逻辑begin
  31. common.isLogin();
  32. //新增用户判断是否登录逻辑end
  33. if (!auth || auth.createtime + auth.expires_in < nowdate) {
  34. common.toLogin();
  35. return false;
  36. } else {
  37. userToken = auth.token;
  38. }
  39. }
  40. if (type) {
  41. method = type + '/' + method
  42. } else {
  43. method = '/' + method
  44. }
  45. let realurl = baseApiUrl + method;
  46. if (orgurl) {
  47. realurl = baseUrl + orgurl;
  48. }
  49. uni.showLoading({
  50. title: '',
  51. icon: 'loading'
  52. });
  53. uni.request({
  54. url: realurl,
  55. data: data,
  56. header: {
  57. 'Accept': 'application/json',
  58. 'Content-Type': 'application/x-www-form-urlencoded',
  59. 'token': userToken,
  60. '__token__': userToken
  61. },
  62. method: 'POST',
  63. success: (response) => {
  64. uni.hideLoading();
  65. const result = response.data
  66. if (result.msg == 'Please login' || result.msg == '请登陆') {
  67. db.del("user");
  68. db.del("auth");
  69. console.log('未登陆')
  70. uni.showToast({
  71. title: result.msg,
  72. icon: 'none',
  73. duration: 2000,
  74. complete: function() {
  75. uni.reLaunch({
  76. url: '/pages/index/index',
  77. })
  78. }
  79. });
  80. }
  81. callback(result);
  82. },
  83. fail: (error) => {
  84. uni.hideLoading();
  85. if (error && error.response) {
  86. showError(error.response);
  87. }
  88. },
  89. });
  90. }
  91. // 上传图片
  92. export const uploadImage = (method, data = {}, callback, num = 9, type) => {
  93. if (type) {
  94. method = type + '/' + method
  95. } else {
  96. method = method
  97. }
  98. let userToken = '';
  99. let auth = db.get("auth");
  100. userToken = auth.token;
  101. uni.chooseImage({
  102. count: num,
  103. success: (res) => {
  104. uni.showLoading({
  105. title: '上传中...'
  106. });
  107. let tempFilePaths = res.tempFilePaths
  108. for (var i = 0; i < tempFilePaths.length; i++) {
  109. data.file = tempFilePaths[i]
  110. uni.uploadFile({
  111. url: baseApiUrl + method,
  112. filePath: tempFilePaths[i],
  113. fileType: 'image',
  114. name: 'file',
  115. headers: {
  116. 'Accept': 'application/json',
  117. 'Content-Type': 'multipart/form-data',
  118. 'token': userToken
  119. },
  120. formData: data,
  121. success: (uploadFileRes) => {
  122. callback(JSON.parse(uploadFileRes.data))
  123. },
  124. fail: (error) => {
  125. if (error && error.response) {
  126. common.showError(error.response);
  127. }
  128. },
  129. complete: () => {
  130. setTimeout(function() {
  131. uni.hideLoading();
  132. }, 250);
  133. },
  134. });
  135. }
  136. }
  137. });
  138. }
  139. const get = (url, callback) => {
  140. uni.showLoading({
  141. title: '加载中'
  142. });
  143. let realurl = baseUrl + url;
  144. if (url.indexOf('http:') >= 0 || url.indexOf('https:') >= 0) {
  145. let realurl = url;
  146. }
  147. uni.request({
  148. url: realurl,
  149. header: {
  150. 'Accept': 'application/json',
  151. 'Content-Type': 'application/x-www-form-urlencoded', //自定义请求头信息
  152. },
  153. method: 'GET',
  154. success: (response) => {
  155. callback(response.data);
  156. },
  157. fail: (error) => {
  158. if (error && error.response) {
  159. showError(error.response);
  160. }
  161. },
  162. complete: () => {
  163. setTimeout(function() {
  164. uni.hideLoading();
  165. }, 250);
  166. }
  167. });
  168. }
  169. const showError = error => {
  170. let errorMsg = ''
  171. switch (error.status) {
  172. case 400:
  173. errorMsg = '请求参数错误'
  174. break
  175. case 401:
  176. errorMsg = '未授权,请登录'
  177. break
  178. case 403:
  179. errorMsg = '跨域拒绝访问'
  180. break
  181. case 404:
  182. errorMsg = `请求地址出错: ${error.config.url}`
  183. break
  184. case 408:
  185. errorMsg = '请求超时'
  186. break
  187. case 500:
  188. errorMsg = '服务器内部错误'
  189. break
  190. case 501:
  191. errorMsg = '服务未实现'
  192. break
  193. case 502:
  194. errorMsg = '网关错误'
  195. break
  196. case 503:
  197. errorMsg = '服务不可用'
  198. break
  199. case 504:
  200. errorMsg = '网关超时'
  201. break
  202. case 505:
  203. errorMsg = 'HTTP版本不受支持'
  204. break
  205. default:
  206. errorMsg = error.msg
  207. break
  208. }
  209. uni.showToast({
  210. title: errorMsg,
  211. icon: 'none',
  212. duration: 2000
  213. });
  214. }
  215. const syncget = (url, data) => {
  216. return new Promise(function(resolve, reject) {
  217. get(url + queryParams(data, true), (result) => {
  218. try {
  219. resolve(result);
  220. } catch (e) {
  221. reject(e);
  222. }
  223. })
  224. })
  225. }
  226. const syncpost = (f, m, d) => {
  227. return new Promise(function(resolve, reject) {
  228. post(f, d, (result) => {
  229. try {
  230. resolve(result);
  231. } catch (e) {
  232. reject(e);
  233. }
  234. }, m, m);
  235. })
  236. }
  237. // 登录
  238. export const third = (data, callback) => post('third', data, callback, 'content/main_body_user');
  239. // 用户绑定手机
  240. export const bindphone = (data, callback) => post('bind', data, callback, 'discover/User');
  241. // 修改用户信息
  242. export const profile = (data, callback) => post('profile', data, callback, 'discover/User');
  243. // 发送验证码
  244. export const sendSmsVerify = (data, callback) => post('sendSmsVerify', data, callback, 'discover/User');
  245. // 刷新用户
  246. export const refreshUser = (data, callback) => post('refreshUser', data, callback, 'content/main_body_user');
  247. // 注册
  248. export const register = (data, callback) => post('register', data, callback, 'discover/User');
  249. // 登录
  250. export const login = (data, callback) => post('login', data, callback, 'discover/User');
  251. // 退出登录
  252. export const logout = (data, callback) => post('logout', data, callback, 'discover/User');
  253. // 上传头像
  254. export const upload = (data, callback) => post('upload', data, callback, 'discover/Ajax');
  255. // 绑定手机
  256. export const changeMobile = (data, callback) => post('changeMobile', data, callback, 'discover/User');
  257. //获取手机号前先登录
  258. export const wxLogin = (data, callback) => post('wxLogin', data, callback, 'user');
  259. //获取手机号
  260. // export const getMobile = (data, callback) => post('getPhoneNumber', data, callback, 'user');
  261. //取CMS配置
  262. export const getConfig = async (params = {}) => await syncget('addons/cms/api.common/init', params);
  263. function queryParams(data = {}, isPrefix = true, arrayFormat = 'brackets') {
  264. //填入默认主体id为1
  265. data.main_body_id = 1;
  266. let prefix = isPrefix ? '?' : ''
  267. let _result = []
  268. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';
  269. for (let key in data) {
  270. let value = data[key]
  271. // 去掉为空的参数
  272. if (['', undefined, null].indexOf(value) >= 0) {
  273. continue;
  274. }
  275. if (value.length > 0) {
  276. value = value.replace(/%/g, "%25");
  277. value = value.replace(/\&/g, "%26");
  278. value = value.replace(/\+/g, "%2B");
  279. }
  280. // 如果值为数组,另行处理
  281. if (value.constructor === Array) {
  282. // e.g. {ids: [1, 2, 3]}
  283. switch (arrayFormat) {
  284. case 'indices':
  285. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  286. for (let i = 0; i < value.length; i++) {
  287. _result.push(key + '[' + i + ']=' + value[i])
  288. }
  289. break;
  290. case 'brackets':
  291. // 结果: ids[]=1&ids[]=2&ids[]=3
  292. value.forEach(_value => {
  293. _result.push(key + '[]=' + _value)
  294. })
  295. break;
  296. case 'repeat':
  297. // 结果: ids=1&ids=2&ids=3
  298. value.forEach(_value => {
  299. _result.push(key + '=' + _value)
  300. })
  301. break;
  302. case 'comma':
  303. // 结果: ids=1,2,3
  304. let commaStr = "";
  305. value.forEach(_value => {
  306. commaStr += (commaStr ? "," : "") + _value;
  307. })
  308. _result.push(key + '=' + commaStr)
  309. break;
  310. default:
  311. value.forEach(_value => {
  312. _result.push(key + '[]=' + _value)
  313. })
  314. }
  315. } else {
  316. _result.push(key + '=' + value)
  317. }
  318. }
  319. return _result.length ? prefix + _result.join('&') : ''
  320. }
  321. // 模型的主体栏目列表
  322. export const getColumnList = (data, callback) => post('getColumnList', data, callback,
  323. 'content/main_body_column');
  324. // 内容详情
  325. export const getContentDetail = (data, callback) => post('getContentDetail', data, callback,
  326. 'content/content');
  327. // 模型内容列表
  328. export const getContentList = (data, callback) => post('getContentList', data, callback,
  329. 'content/content');
  330. // 模型主体栏目的内容列表
  331. export const getMainBodyColumnContentList = (data, callback) => post('getMainBodyColumnContentList', data, callback,
  332. 'content/content');
  333. // 培训分类列表
  334. export const getCategoryList = (data, callback) => post('getCategoryList', data, callback, '',
  335. 'addons/yuneducation/course/getCategoryList');
  336. // 学院底部课程
  337. export const getHomeData = (data, callback) => post('getHomeData', data, callback, '',
  338. 'addons/yuneducation/page/getHomeData');
  339. // 课程界面数据
  340. export const getCourseList = (data, callback) => post('getCourseList', data, callback, '',
  341. 'addons/yuneducation/course/getCourseList');
  342. // 课程详情
  343. export const getCourseDetail = (data, callback) => post('getCourseDetail', data, callback, '',
  344. 'addons/yuneducation/course/getCourseDetail');
  345. // 获取课程考核
  346. export const getCourseExamine = (data, callback) => post('getCourseExamine', data, callback, '',
  347. 'addons/yuneducation/course/getCourseExamine');
  348. // 课程开始学习
  349. export const startLearn = (data, callback) => post('startLearn', data, callback, '',
  350. 'addons/yuneducation/course/startLearn');
  351. // 加入购物车
  352. export const addCart = (data, callback) => post('addCart', data, callback, '',
  353. 'addons/yuneducation/order/addCart');
  354. // 预览订单
  355. export const previewOrder = (data, callback) => post('previewOrder', data, callback, '',
  356. 'addons/yuneducation/order/previewOrder');
  357. // 提交订单
  358. export const submitOrder = (data, callback) => post('submitOrder', data, callback, '',
  359. 'addons/yuneducation/order/submitOrder');
  360. // 移除购物车
  361. export const removeCart = (data, callback) => post('removeCart', data, callback, '',
  362. 'addons/yuneducation/order/removeCart');
  363. // 讲师详情
  364. export const getTeacherDetail = (data, callback) => post('getTeacherDetail', data, callback, '',
  365. 'addons/yuneducation/teacher/getTeacherDetail');
  366. // 获取培训列表
  367. export const getScheduleList = (data, callback) => post('getScheduleList', data, callback, '',
  368. 'addons/yuneducation/schedule/getScheduleList');
  369. // 获取培训详情
  370. export const getScheduleDetail = (data, callback) => post('getScheduleDetail', data, callback, '',
  371. 'addons/yuneducation/schedule/getScheduleDetail');
  372. // 培训开始学习
  373. export const scheduleStartLearn = (data, callback) => post('startLearn', data, callback, '',
  374. 'addons/yuneducation/schedule/startLearn');
  375. // 获取我的课程列表
  376. export const getMineCourseList = (data, callback) => post('getMineCourseList', data, callback, '',
  377. 'addons/yuneducation/course/getMineCourseList');
  378. // 试播
  379. // export const getContentDetail = (data, callback) => post('getContentDetail', data, callback, '',
  380. // 'addons/yuneducation/course/getContentDetail');
  381. //获取栏目
  382. export const getChannel = async (params = {}) => await syncpost('get_channel', '/addons/cms/api.archives/get_channel',
  383. params);
  384. //我发的文章
  385. export const myArchives = async (params = {}) => await syncpost('my', '/addons/cms/api.archives/my', params);
  386. // 文物管理相关
  387. //场馆详情页获取管理员权限
  388. export const userManageCrAuth = (data, callback) => post('userManageCrAuth', data, callback, 'auth/user_manage_cr');
  389. export const getDevices = (data, callback) => post('getDevices', data, callback, 'zhoujie/device');
  390. //取文巡查记录
  391. export const getPatrolLog = (data, callback) => post('getPatrolLog', data, callback, 'wuyuan/volunteer');
  392. //取文物详情
  393. export const getCulturalDetails = (data, callback) => get('api/wuyuan/cultural_relic/details' + queryParams(data, true),
  394. callback);
  395. // 文物管理相关end
  396. //取轮播图
  397. export const getBannerList = (data, callback) => get('/api/wuyuan/swiper_icon/lists' + queryParams(data, true),
  398. callback);
  399. // //人物列表 传 type参数类型:inheritor=非遗传承人,history=历史人物,folklore=民俗学者,specialist=文史专家
  400. // export const getPeopleList = (data, callback) => get('api/wuyuan/biographies/lists' + queryParams(data, true), callback);
  401. // //人物详情
  402. // export const getPeopleDetails = (data, callback) => get('api/wuyuan/biographies/details' + queryParams(data, true), callback);
  403. // 获取用户信息
  404. export const getMainBodyUser = (data, callback) => post('getMainBodyUser', data, callback,
  405. 'content/main_body_user/getMainBodyUser');
  406. //修改头像
  407. export const editMainBodyUser = (data, callback) => post('editMainBodyUser', data, callback,
  408. 'content/main_body_user');
  409. //取任务列表
  410. export const getTaskList = (data, callback) => post('lists', data, callback, 'wuyuan/task');
  411. //取法律文章列表
  412. export const getArchives = async (params = {}) => await syncget('https://huli-app.wenlvti.net/addons/cms/api', params);
  413. // 积分信息
  414. export const getWuyuanUser = (data, callback) => post('getWuyuanUser', data, callback, 'wuyuan/user');
  415. //取文物分类 参数传type类型
  416. export const getCulturalRelicCategory = (data, callback) => get('api/content/category/getCategoryList' + queryParams(
  417. data,
  418. true), callback);
  419. //取级联分类
  420. export const getCategoryCascadeList = (data, callback) => get('api/content/category/getCategoryCascadeList' +
  421. queryParams(
  422. data, true), callback);
  423. // 投稿
  424. export const contribute = (data, callback) => post('contribute', data, callback, '',
  425. 'api/content/style/contribute');
  426. //取文物场景列表
  427. export const getCulturalRelic = (data, callback) => get('api/content/cultural_relic/lists' + queryParams(data, true),
  428. callback);
  429. // 志愿报名
  430. export const applyVolunteer = (data, callback) => post('applyVolunteer', data, callback, '',
  431. 'api/volunteer/volunteer/applyVolunteer');
  432. // 志愿者列表
  433. export const lists = (data, callback) => post('lists', data, callback, '', 'api/volunteer/volunteer/lists');
  434. // 志愿者详情
  435. export const details = (data, callback) => post('details', data, callback, '', 'api/volunteer/volunteer/details');
  436. // 注销志愿者
  437. export const logOffVolunteer = (data, callback) => post('logOffVolunteer', data, callback, '',
  438. 'api/volunteer/volunteer/logOffVolunteer');
  439. // 志愿者巡查文物资产列表
  440. export const getCrProperty = (data, callback) => post('getCrProperty', data, callback, '',
  441. 'api/volunteer/patrol_property/getCrProperty');
  442. // 加入志愿者团队
  443. export const joinTeam = (data, callback) => post('joinTeam', data, callback, '',
  444. 'api/volunteer/team_member/joinTeam');
  445. // 获取团队成员列表
  446. export const getTeamMember = (data, callback) => post('getTeamMember', data, callback, '',
  447. 'api/volunteer/team/getTeamMember');
  448. // 移除成员
  449. export const removeMemberm = (data, callback) => post('removeMemberm', data, callback, '',
  450. 'api/volunteer/team_member/removeMember');
  451. // 获取志愿者任务列表
  452. export const getPatrolTask = (data, callback) => post('getPatrolTask', data, callback, '',
  453. 'api/volunteer/patrol_task/getPatrolTask');
  454. // 获取任务列详情
  455. export const getPatrolTaskDetails = (data, callback) => post('getPatrolTaskDetails', data, callback, '',
  456. 'api/volunteer/patrol_task/getPatrolTaskDetails');
  457. // 提交巡查任务
  458. export const submitTask = (data, callback) => post('submitTask', data, callback, '',
  459. 'api/volunteer/patrol_task/submitTask');
  460. // 计算志愿者与文物点的距离
  461. export const distanceCheck = (data, callback) => post('distanceCheck', data, callback, '',
  462. 'api/volunteer/patrol_task/distanceCheck');
  463. // 认领文物
  464. export const claimCr = (data, callback) => post('claimCr', data, callback, '',
  465. 'api/volunteer/claim_cr/claimCr');
  466. // 认领文物列表
  467. export const claimCrList = (data, callback) => post('claimCrList', data, callback, '',
  468. 'api/volunteer/claim_cr/claimCrList');
  469. // 认领文物详情暂未调用
  470. export const claimCrDetails = (data, callback) => post('claimCrDetails', data, callback, '',
  471. 'api/volunteer/claim_cr/claimCrDetails');
  472. // 最新公告
  473. export const getNotice = (data, callback) => post('getNotice', data, callback, '',
  474. 'api/system/notice/getNotice');
  475. // 区域
  476. export const getCategoryOnlyChildList = (data, callback) => post('getCategoryOnlyChildList', data, callback, '',
  477. 'api/content/category/getCategoryOnlyChildList');
  478. // 志愿者审核
  479. export const examineVolunteer = (data, callback) => post('examineVolunteer', data, callback, '',
  480. 'api/volunteer/volunteer/examineVolunteer');
  481. // 用户区域管理文物权限
  482. export const userManageRegionCrAuth = (data, callback) => post('userManageRegionCrAuth', data, callback, '',
  483. 'api/auth/user_manage_cr/userManageRegionCrAuth');
  484. // 修改驳回志愿者信息
  485. export const editApplyVolunteer = (data, callback) => post('editApplyVolunteer', data, callback, '',
  486. 'api/volunteer/volunteer/editApplyVolunteer');
  487. // 老志愿者手机号绑定志愿者
  488. export const getPhoneNumber = (data, callback) => post('getPhoneNumber', data, callback, '',
  489. 'api/volunteer/volunteer/getPhoneNumber');
  490. // 手动绑定志愿者手机号
  491. export const mobileBindVolunteer = (data, callback) => post('mobileBindVolunteer', data, callback, '',
  492. 'api/volunteer/volunteer/mobileBindVolunteer');
  493. // 提交任务审核
  494. export const examineTask = (data, callback) => post('examineTask', data, callback, '',
  495. 'api/volunteer/patrol_task/examineTask');
  496. // 获取用户积分列表
  497. export const getScoreLog = (data, callback) => post('getScoreLog', data, callback, '',
  498. 'api/content/main_body_user/getScoreLog');
  499. // 志愿者排行
  500. export const rankingList = (data, callback) => post('rankingList', data, callback, '',
  501. 'api/volunteer/volunteer/rankingList');
  502. //活动相关
  503. //活动主题详情
  504. export const activityThemeDetails = (data, callback) => get('api/activity/theme/details' + queryParams(data, true), callback);
  505. // 活动列表
  506. export const activityLists = (data, callback) => get('api/activity/activity/lists' + queryParams(data, true),
  507. callback);
  508. // 活动详情
  509. export const activityDetails = (data, callback) => get('api/activity/activity/details' + queryParams(data, true),
  510. callback);
  511. // 活动日程列表
  512. export const activityScheduleList = (data, callback) => get('api/activity/schedule/lists' + queryParams(data, true),
  513. callback);
  514. // 活动报名参数
  515. export const activitySignupParams = (data, callback) => get('api/activity/signup_params/lists' + queryParams(data, true),
  516. callback);
  517. // 志愿者排行详情
  518. export const rankingDetails = (data, callback) => get('api/volunteer/volunteer/rankingDetails' + queryParams(data,
  519. true),
  520. callback);
  521. // 区域数据统计
  522. export const regionData = (data, callback) => post('regionData', data, callback, '',
  523. 'api/volunteer/statistics/regionData');
  524. // 市级数据统计
  525. export const cityData = (data, callback) => post('cityData', data, callback, '',
  526. 'api/volunteer/statistics/cityData');
  527. // 新闻公告
  528. export const getNewsNotice = (data, callback) => post('getNewsNotice', data, callback, '',
  529. 'api/system/notice/getNewsNotice');
  530. // 打卡
  531. export const checkIn = (data, callback) => post('checkIn', data, callback, '',
  532. 'api/content/main_body_user/checkIn');
  533. // 活动报名
  534. export const activitySignup = (data, callback) => post('activitySignup', data, callback, '',
  535. 'api/activity/activity/activitySignup');
  536. // 我的投稿
  537. export const getUserContribute = (data, callback) => post('getUserContribute', data, callback, '',
  538. 'api/content/main_body_user/getUserContribute');
  539. // 我的荣誉
  540. export const getUserHonor = (data, callback) => post('getUserHonor', data, callback, '',
  541. 'api/content/main_body_user/getUserHonor');
  542. // 轮播
  543. export const getIndexBanner = (data, callback) => post('getIndexBanner', data, callback, '',
  544. 'api/content/banner_function/getIndexBanner');
  545. // 导出
  546. export const exportPatrolRecord = (data, callback) => post('exportPatrolRecord', data, callback, '',
  547. 'api/volunteer/patrol_task/exportPatrolRecord');