videoPlayer.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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
  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.subId
  24. // url = 'http://192.168.1.10:8080/?type=5&floorId='+obj.floorId+'&subId='+obj.subId
  25. }
  26. this.$set(this,'webViewUrl',url);
  27. this.$set(this,'pageType',true);
  28. },
  29. onShow(){
  30. },
  31. methods: {
  32. }
  33. }
  34. </script>
  35. <style lang="stylus" scoped>
  36. #videoPlayer{
  37. height: 100%;
  38. display flex;
  39. flex-direction column;
  40. }
  41. </style>