| 123456789101112131415161718192021222324252627 |
- <script setup lang='ts'>
- import { ref, onMounted, watchEffect } from 'vue'
- import Loading from '@/components/loading.uvue'
- import { router, user } from '@/.cool'
- import Back from '@/components/back.uvue'
- const baseUrl = ref('https://oss.xiaoxiongcode.com/gui/index.html')
- const webviewSrc = ref('')
- var isLoading = ref(true)
- function handleLoad() {
- isLoading.value = false
- }
- function handleMessage(e) {
- console.log(e)
- }
- onMounted(() => {
- webviewSrc.value = baseUrl.value + '?token=' + user.token + '&userId=' + user.info.value?.userInfo.userId
- })
- </script>
- <template>
- <Loading v-show="isLoading" />
- <web-view id="webView1" :src="webviewSrc" class="w-full h-full" @load="handleLoad"
- @message="handleMessage"></web-view>
- </template>
- <style lang="less" scoped></style>
|