Ver código fonte

去除loading

guarantee-lsq 7 horas atrás
pai
commit
15eb1e86d4
1 arquivos alterados com 7 adições e 4 exclusões
  1. 7 4
      pages/catalog/web-view.uvue

+ 7 - 4
pages/catalog/web-view.uvue

@@ -12,10 +12,13 @@ const menu2Items = [
 ]
 const progress = ref(1)
 const webviewSrc = ref('')
-const isLoading = ref(true)
+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();
@@ -24,7 +27,6 @@ function handleMessage(e) {
 }
 function handleLoad() {
   console.log('handleLoad')
-  isLoading.value = false
 }
 onShow(() => {
   var pages = getCurrentPages();
@@ -33,8 +35,9 @@ 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>