<template>
    <Cn-page :loading='loading'>
        <view slot='body'>
            <view class='index'>
                <uni-card title="网关信息" sub-title="副标题" v-for="item in 3" :key="item" @click="jump"
                    thumbnail="/static/gateway.png">
                    <view class="footer">
                        <text>设备基础信息 </text>
                        <view class="footer-btn" @click="newDevice">注册设备</view>
                    </view>
                </uni-card>
                <uni-load-more status="nomore"></uni-load-more>
            </view>
        </view>
    </Cn-page>
</template>
<script>
export default {
    data () {
        return {
            loading: false
        }
    },
    methods: {
        newDevice () {
            // uni.scanCode({
            //     success: function (res) {
            //         console.log('条码类型：' + res.scanType);
            //         console.log('条码内容：' + res.result);

            //     }
            // });
            uni.navigateTo({
                url: '/pages/gateway/newDevice'
            })
        },
    }
}
</script>
<style lang='scss'>
.index {
    .footer {
        display: flex;
        justify-content: space-between;
        align-items: center;

        .footer-btn {
            padding: 0 20rpx;
            height: 50rpx;
            background-color: #007aff;
            font-size: 24rpx;
            color: #fff;
            text-align: center;
            line-height: 50rpx;
            border-radius: 10rpx;
        }
    }
}
</style>