40 lines
934 B
Vue
40 lines
934 B
Vue
|
|
<template>
|
|||
|
|
<view class="videoPage">
|
|||
|
|
<web-view :webview-styles="webviewStyles" :src="url" @message="getMessage"></web-view>
|
|||
|
|
</view>
|
|||
|
|
</template>
|
|||
|
|
|
|||
|
|
<script>
|
|||
|
|
export default {
|
|||
|
|
data() {
|
|||
|
|
return {
|
|||
|
|
url:'http://192.168.0.126:8080/equipmentCenter.html/#/map_app?data=',
|
|||
|
|
webviewStyles: {
|
|||
|
|
progress: {
|
|||
|
|
color: '#FF3333'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
// onLoad(data) {
|
|||
|
|
// //这里对要传
|
|||
|
|
|
|||
|
|
// 入到webview中的参数进行encodeURIComponent编码否则中文乱码
|
|||
|
|
// this.url+=encodeURIComponent(data.data)
|
|||
|
|
// },
|
|||
|
|
mounted() {
|
|||
|
|
this.url+=uni.getStorageSync('userInfo')
|
|||
|
|
},
|
|||
|
|
methods:{
|
|||
|
|
getMessage(event){
|
|||
|
|
console.log('getMessage')
|
|||
|
|
console.log(event)
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
</script>
|
|||
|
|
<style lang="scss" scoped>
|
|||
|
|
.videoPage{
|
|||
|
|
height: calc(100% - 54rpx);
|
|||
|
|
}
|
|||
|
|
</style>
|