<template>
    <view>
        <AndroidUnlockAuth v-model="show" v-if="platform === 'android'" />
        <IosUnlockAuth v-model="show" v-else-if="platform === 'ios'" />
    </view>
</template>

<script>
import AndroidUnlockAuth from './components/AndroidUnlockAuth.vue'
import IosUnlockAuth from './components/IosUnlockAuth.vue'

export default {
    components: {
        AndroidUnlockAuth,
        IosUnlockAuth
    },
    data() {
        return {
            platform: 'android',
            show: false
        }
    },
    onLoad() {
        this._initPlatform();
    },
    methods: {
        open() {
            this.show = true;
            console.log(111, this.platform)
        },
        _initPlatform() {
            const systemInfo = uni.getSystemInfoSync();
            this.platform = systemInfo.platform;
        }
    }
}
</script>