27 lines
555 B
Vue
27 lines
555 B
Vue
<template>
|
|
<web-view :src="webviewUrl"></web-view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
webviewUrl: ''
|
|
};
|
|
},
|
|
// 页面加载时接收URL参数并解码
|
|
onLoad(options) {
|
|
let that = this
|
|
let url = ''
|
|
let token = uni.getStorageSync('token')
|
|
if (options.id) {
|
|
url = "https://tc.pcxbc.com/model_content?token=" + token + '&id=' + options.id
|
|
}
|
|
if (options.url) {
|
|
url = options.url
|
|
}
|
|
that.webviewUrl = decodeURIComponent(url);
|
|
console.log("11111", url, this.webviewUrl)
|
|
}
|
|
}
|
|
</script> |