初始化(包含登录模块)
This commit is contained in:
32
pages/component/web-view/web-view.vue
Normal file
32
pages/component/web-view/web-view.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<view>
|
||||
<web-view :src="url" @message="getMessage"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
url: 'https://uniapp.dcloud.io/static/web-view.html'
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options && options.url) {
|
||||
this.url = options.url;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getMessage(event) {
|
||||
uni.showModal({
|
||||
content: JSON.stringify(event.detail),
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user