videoPlayer.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <view id="videoPlayer">
  3. <!-- <web-view src="http://10.111.224.196:8080/?type=4&id=1793100035379396609"></web-view> -->
  4. <web-view :src="webViewUrl" v-if="pageType"></web-view>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. data() {
  10. return {
  11. pageType: false,
  12. webViewUrl: '',
  13. }
  14. },
  15. onLoad(option) {
  16. let obj = JSON.parse(decodeURIComponent(option.item))
  17. console.log('obj', obj)
  18. let url = '';
  19. if (obj.type == 4) {
  20. url = uni.getStorageSync('cameraExtranetAgent') + '?type=4&subId=' + obj.subId+ '&source=2'
  21. // url = 'http://192.168.1.10:8080/?type=4&subId='+obj.subId
  22. } else if (obj.type == 5) {
  23. url = uni.getStorageSync('cameraExtranetAgent') + '?type=5&floorId=' + obj.floorId + '&subId=' + obj
  24. .subId + '&source=5'
  25. // url = 'http://192.168.1.10:8080/?type=5&floorId='+obj.floorId+'&subId='+obj.subId
  26. }
  27. this.$set(this, 'webViewUrl', url);
  28. this.$set(this, 'pageType', true);
  29. },
  30. onShow() {
  31. },
  32. methods: {
  33. }
  34. }
  35. </script>
  36. <style lang="stylus" scoped>
  37. #videoPlayer {
  38. height: 100%;
  39. display flex;
  40. flex-direction column;
  41. }
  42. </style>