videoPlayer.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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')+'?source=2&type=4&subId='+obj.subId+'&touken='+uni.getStorageSync('token')
  21. }else if(obj.type == 5){
  22. url = uni.getStorageSync('cameraExtranetAgent')+'?source=5&type=5&floorId='+obj.floorId+'&subId='+obj.subId+'&touken='+uni.getStorageSync('token')
  23. }
  24. this.$set(this,'webViewUrl',url);
  25. this.$set(this,'pageType',true);
  26. },
  27. onShow(){
  28. },
  29. methods: {
  30. }
  31. }
  32. </script>
  33. <style lang="stylus" scoped>
  34. #videoPlayer{
  35. height: 100%;
  36. display flex;
  37. flex-direction column;
  38. }
  39. </style>