You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
980 B
55 lines
980 B
<template>
|
|
<web-view :src="url"></web-view>
|
|
</template>
|
|
<script>
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
url: ''
|
|
};
|
|
},
|
|
|
|
onLoad(e) {
|
|
console.log(e.url);
|
|
|
|
if (!e.url) {
|
|
this.setData({
|
|
url: 'https://mp.weixin.qq.com/s/1uorX1FvMBIDjkpxthdCng'
|
|
});
|
|
} else {
|
|
this.setData({
|
|
url: e.url
|
|
});
|
|
}
|
|
},
|
|
|
|
components: {},
|
|
props: {},
|
|
methods: {
|
|
setData: function (obj) {
|
|
let that = this;
|
|
let keys = [];
|
|
let val, data;
|
|
Object.keys(obj).forEach(function (key) {
|
|
keys = key.split('.');
|
|
val = obj[key];
|
|
data = that.$data;
|
|
keys.forEach(function (key2, index) {
|
|
if (index + 1 == keys.length) {
|
|
that.$set(data, key2, val);
|
|
} else {
|
|
if (!data[key2]) {
|
|
that.$set(data, key2, {});
|
|
}
|
|
}
|
|
|
|
data = data[key2];
|
|
});
|
|
});
|
|
}
|
|
},
|
|
computed: {},
|
|
watch: {}
|
|
};
|
|
</script>
|