siteListAlarming.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <list-test :bindData="siteListData" :bindUrl="linkUrl" :bindIcon="linkIcon" :bindNum="num" :bindType="type"
  3. :bindDetailUrl="detailUrl">
  4. </list-test>
  5. </template>
  6. <script>
  7. import json from '../../data/json.js';
  8. export default {
  9. data() {
  10. return {
  11. type: 1,
  12. linkUrl: '/pages/alarmingList/alarmingList',
  13. linkIcon: '../../static/site-icon-alarm.png',
  14. siteListData: [],
  15. num: ' 共3个未处理告警',
  16. detailUrl: '/pages/siteDetail/siteDetail'
  17. };
  18. },
  19. onPullDownRefresh() {
  20. console.log('refresh');
  21. setTimeout(function() {
  22. uni.stopPullDownRefresh();
  23. }, 1000);
  24. },
  25. computed: {
  26. },
  27. mounted() {
  28. },
  29. onLoad() {
  30. this.getSiteList()
  31. },
  32. methods: {
  33. getSiteList() {
  34. uni.request({
  35. url: 'https://iot.usky.cn/USKYOF/USKYOF.php/Home/IntegratedAlarm/getSiteList',
  36. data: {
  37. "companyCode": "13"
  38. },
  39. header: {
  40. 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
  41. },
  42. method: 'POST',
  43. success: (res) => {
  44. console.log('res.data')
  45. console.log(res.data.data)
  46. this.siteListData=res.data.data
  47. }
  48. });
  49. }
  50. }
  51. }
  52. </script>
  53. <style>
  54. </style>