<template>
<web-view :src="url1"></web-view>
</template>
<script>
import urls from '@/common/config.js'
export default {
data() {
return {
url1:`${urls.web_url}/x_desktop/appMobile.html?app=Calendar&status={%22action%22:%22toMonth%22,%22options%22:{%22date%22:%22Thu%20Mar%2026%202020%2017:10:26%20GMT+0800%20(%E4%B8%AD%E5%9B%BD%E6%A0%87%E5%87%86%E6%97%B6%E9%97%B4)%22}}`
}
},
methods:{
},
onLoad(data) {
let _this = this;
_this.url1 = _this.url1+`&oatokenonly=`+ encodeURIComponent(uni.getStorageSync('token'))
console.log(_this.url1)
},
onShow() {
plus.screen.lockOrientation('landscape-primary');
},
onUnload(){
plus.screen.lockOrientation('portrait-primary');
}
}
</script>
<style>
</style>
<script>
document.addEventListener('UniAppJSBridgeReady', function() {
//向uniapp传值
uni.postMessage({
data: {
action: 'message'
}
});
uni.getEnv(function(res) {
console.log('当前环境:' + JSON.stringify(res));
});
});
</script>
<template>
<view class="advertisement" style="width: 100%;">
<web-view :src="url" @message="message"></web-view>
</view>
</template>