|
|
@@ -9,6 +9,7 @@ onMounted(() => {
|
|
|
webviewSrc.value = router.query().src
|
|
|
progress.value = router.query().progress
|
|
|
})
|
|
|
+
|
|
|
function handleMessage(e) {
|
|
|
var pages = getCurrentPages();
|
|
|
const prevPage = pages[pages.length - 2];
|
|
|
@@ -16,7 +17,12 @@ function handleMessage(e) {
|
|
|
}
|
|
|
function handleLoad() {
|
|
|
isLoading.value = false
|
|
|
- console.log('handleLoad')
|
|
|
+
|
|
|
+}
|
|
|
+function onWebError() {
|
|
|
+ const t = Date.now()
|
|
|
+ webviewSrc.value = router.query().src + '?t=' + t
|
|
|
+ console.log('onWebError')
|
|
|
}
|
|
|
onShow(() => {
|
|
|
var pages = getCurrentPages();
|
|
|
@@ -26,6 +32,7 @@ onShow(() => {
|
|
|
</script>
|
|
|
<template>
|
|
|
<Loading v-show="isLoading" />
|
|
|
- <web-view :src="webviewSrc" class="w-full h-full" @message="handleMessage" @load="handleLoad"></web-view>
|
|
|
+ <web-view :src="webviewSrc" id="web-view" class="w-full h-full" @message="handleMessage" @load="handleLoad"
|
|
|
+ @error="onWebError"></web-view>
|
|
|
</template>
|
|
|
<style lang="less" scoped></style>
|