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

    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-2 pt-3">
            <Warning />
            <MeteService />
            <CommonFunction />
        </view>
        <!-- <Weather /> -->
    </view>
</template>

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