You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<!-- <template>
|
|
|
|
<view class="webViewClass" style="height: 50vh;">
|
|
|
|
<web-view ref="webViewRef" @onPostMessage="messageData" v-if="webViewShow" :src="url" :fullscreen="false"
|
|
|
|
:webview-styles="webviewStyles" @load="pageLoadSuccess"></web-view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
webViewShow:true,
|
|
|
|
webviewStyles: {
|
|
|
|
width: '400px',
|
|
|
|
height: '600px',
|
|
|
|
left:'100px'
|
|
|
|
},
|
|
|
|
url:`${this.$portAdress.baseURL}/surgicalManagement-operaNurseRecord?operaId=952443406210977792&patientIdNumber=330212200808112523`
|
|
|
|
}
|
|
|
|
},
|
|
|
|
created(option) {
|
|
|
|
console.log(12312312312312);
|
|
|
|
},
|
|
|
|
onHide() {
|
|
|
|
},
|
|
|
|
destroyed() {
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
paramsToH5() {
|
|
|
|
let currentWebview = this.$scope.$getAppWebview();
|
|
|
|
let wv = currentWebview.children()[0];
|
|
|
|
let data = {
|
|
|
|
text: 'uniapp传参给vue'
|
|
|
|
}
|
|
|
|
wv.evalJS(`getVueMessage(${JSON.stringify(data)})`);
|
|
|
|
},
|
|
|
|
// 监听的参数
|
|
|
|
messageData(e) {
|
|
|
|
console.log('接收的H5参数', JSON.stringify(e.detail)) // 接收的参数
|
|
|
|
},
|
|
|
|
pageLoadSuccess() {
|
|
|
|
console.log('加载成功');
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang="less">
|
|
|
|
.webViewClass {
|
|
|
|
position: fixed;
|
|
|
|
// left: -999999px;
|
|
|
|
// z-index: -99999;
|
|
|
|
}
|
|
|
|
</style -->>
|