<script>
|
|
export default {
|
|
onLaunch: function() {
|
|
document.addEventListener('UniAppJSBridgeReady', function() {
|
|
uni.webView.getEnv(function(res) {
|
|
console.log('当前环境:' + JSON.stringify(res));
|
|
});
|
|
});
|
|
|
|
/* 动态引入script */
|
|
const script = document.createElement('script')
|
|
script.src = '/static/js/uni.webview.1.5.6.js'
|
|
document.body.appendChild(script)
|
|
},
|
|
onShow: function() {
|
|
this.$store.commit('initConfig')
|
|
},
|
|
onHide: function() {
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
@import url("common.scss");
|
|
/*每个页面公共css */
|
|
body{
|
|
background-color: #f7f7f7;
|
|
font-size: 30rpx;
|
|
}
|
|
.page{
|
|
padding-top: var(--window-top);
|
|
}
|
|
</style>
|