<script setup lang="ts">
    import Header from './modules/header.vue'
    import Warning from './modules/warning.vue'

    // const title = ref('Hello World')

    onMounted(() => {
        // test API
        // API.example.hello.request().then((body) => {
        //     title.value = body
        //     console.log('[API]', body, $app.name, $app.version)
        //     Message.toast(body)
        // })
    })

    // const surprise = () => {
    //     // #ifdef APP-PLUS
    //     const orientation = plus.navigator.getOrientation()
    //     if (orientation === 0) {
    //         plus.screen.lockOrientation('landscape-primary')
    //     } else if (orientation === 90) {
    //         plus.screen.lockOrientation('portrait-primary')
    //     }
    //     Message.toast('🥳 surprise~')
    //     // #endif

    //     // #ifndef APP-PLUS
    //     Message.toast(`使用 APP 运行点击有惊喜~ ╰(*°▽°*)╯`)
    //     // #endif
    // }
</script>

<template>
    <view class="content">
        <Header />
        <view class="p-3 pt-4 pb-5">
            <Warning />
        </view>
        <!-- <Weather /> -->
        <!-- <MeteService /> -->
        <!-- <fui-avatar src="/static/logo.png" radius="14" @click="surprise" /> -->
        <!-- <view class="info">
            <text class="title">{{ title }}</text>
            <text class="title">{{ $t('app.hello') }}</text>
            <uni-icons type="hand-up" size="30" />
        </view> -->
    </view>
</template>

<style lang="less">
    .content {
        height: calc(100vh - 100rpx);
        overflow: auto;
        background-color: #f2f2f2;
    }
</style>
