index.vue 752 Bytes
Newer Older
程智春 committed
1
<!--
程默 committed
2
 第三方url
程智春 committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
-->
<template>
  <div>
    <web-view
      :src="link"
      @message="getMessage"
      @error="handleError"
      @load="handleLoad"
    ></web-view>
  </div>
</template>

<script>
export default {
    data(){
        return{
            link : ''
        }
    },
    onLoad(options){
        console.log(decodeURIComponent(options.link),'地址')
        this.link = decodeURIComponent(options.link)
    },
    methods: {
        //加载成功
        handleLoad() {
            console.log("网页加载成功");
        },
        handleError(data) {
            wx.showLoading({
                title: "网页加载失败 请右上角刷新",
            });
        },
    }
};
</script>

<style lang="scss" scoped></style>