12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <template>
- <view>
- <web-view :src="href"></web-view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- href: ""
- };
- },
- onLoad(option) {
- if (option.url == 'jinjiaqu_pingce') {
- this.href = 'http://anstatic.nxmy.com:8011/assets/html/pingce/?mine_code=jinjiaqu&token=' + uni
- .getStorageSync('Authorization') + '#/'
- }
- if (option.url == 'https://xw.tianqi.qq.com/') {
- this.href = 'https://xw.tianqi.qq.com/'
- } {
- this.href = option.url + "?token=" + uni.getStorageSync('Authorization')
- console.log(this.href)
- }
- //#ifdef H5
- // if(this.href.indexOf('https://mp.weixin.qq.com') != -1){
- // window.location.href = this.href;
- // }
- //#endif
- },
- onReady() {
- // #ifdef APP-PLUS
- var currentWebview = this.$scope.$getAppWebview().children()[0];
- //监听注入的js
- currentWebview.addEventListener("loaded", function() {
- currentWebview.evalJS(
- "mui.init({keyEventBind: {backbutton: false }});"
- );
- });
- // #endif
- }
- }
- </script>
- <style lang="scss">
- </style>
|