|
|
@@ -2,23 +2,10 @@
|
|
|
import { ref, onMounted, watchEffect } from 'vue'
|
|
|
import Loading from '@/components/loading.uvue'
|
|
|
import { router } from '@/.cool'
|
|
|
-const menu2Items = [
|
|
|
- { id: '1', name: '观察', icon: 'https://oss.xiaoxiongcode.com/static/home/kanke.png' },
|
|
|
- { id: '2', name: '提问', icon: 'https://oss.xiaoxiongcode.com/static/home/lianxi.png' },
|
|
|
- { id: '3', name: '假设', icon: 'https://oss.xiaoxiongcode.com/static/home/shiyan.png' },
|
|
|
- { id: '4', name: '实验', icon: 'https://oss.xiaoxiongcode.com/static/home/riji.png' },
|
|
|
- { id: '5', name: '总结', icon: 'https://oss.xiaoxiongcode.com/static/home/riji.png' },
|
|
|
- { id: '6', name: '拓展', icon: 'https://oss.xiaoxiongcode.com/static/home/riji.png' },
|
|
|
-]
|
|
|
-const progress = ref(1)
|
|
|
const webviewSrc = ref('')
|
|
|
var isLoading = ref(true)
|
|
|
onMounted(() => {
|
|
|
webviewSrc.value = router.query().src
|
|
|
- progress.value = router.query().progress
|
|
|
- setTimeout(() => {
|
|
|
- isLoading.value = false
|
|
|
- }, 20000) // 6000毫秒 = 6秒
|
|
|
})
|
|
|
function handleMessage(e) {
|
|
|
var pages = getCurrentPages();
|
|
|
@@ -26,6 +13,7 @@ function handleMessage(e) {
|
|
|
(prevPage as any).status = "success"
|
|
|
}
|
|
|
function handleLoad() {
|
|
|
+ isLoading.value = false
|
|
|
console.log('handleLoad')
|
|
|
}
|
|
|
onShow(() => {
|
|
|
@@ -35,9 +23,8 @@ onShow(() => {
|
|
|
})
|
|
|
</script>
|
|
|
<template>
|
|
|
- <!-- <Loading v-show="isLoading"/> -->
|
|
|
+ <Loading v-show="isLoading" />
|
|
|
<web-view :src="webviewSrc + '?' + Math.random()" class="w-full h-full" @message="handleMessage"
|
|
|
@load="handleLoad"></web-view>
|
|
|
</template>
|
|
|
-<style lang="less" scoped>
|
|
|
-</style>
|
|
|
+<style lang="less" scoped></style>
|