<!--
 * @Author: euzhi
 * @Description: 登录
-->
<template>
<view class="appCotent">
    <div class="binding">
        <div class="login__logo">
            <image src="@/static/binding/logo.png">
        </div>
        <div class="login__btn" @click="login">
            微信一键登录
        </div>
        <div class="login__read">
            <u-checkbox-group placement="row">
                <u-checkbox :checked='checked'  @change="changeBtn"></u-checkbox>
            </u-checkbox-group>
            已阅读并同意 <span>《京东用户注册协议》</span>、<span>《京东隐私政策》</span>。若您的手机号未注册，将为您直接注册京东账号
        </div>
    </div>
</view>
</template>

<script>
export default {
    data() {
        return {
            checked: false,
        };
    },
    methods: {
        changeBtn() {
            this.checked = !this.checked;
        },
        login() {
            if (this.checked) {
                //跳转到绑定页面
                uni.navigateTo({
                    url: '/pages/binding/binding'
                });
            }else{
                uni.showToast({
                    title: "请先阅读并同意《京东用户注册协议》、《京东隐私政策》",
                    icon: 'none',
                    duration: 2000,
                });
            }

        }
    },

}
</script>

<style lang="scss" scoped>
.binding {
    .login__logo {
        padding-top: 80rpx;
        text-align: center;
        padding-bottom: 100rpx;

        image {
            width: 174rpx;
            height: 174rpx;
        }
    }

    .u-checkbox-group {
        display: inline-block !important;
    }

    /deep/.u-checkbox-group--row {
        display: inline-block !important;
    }

    .login__btn {
        width: 600rpx;
        height: 90rpx;
        margin: 0 auto;
        border-radius: 20rpx;
        background: url('@/static/binding/yuan-btn.png') no-repeat;
        background-size: contain;
        display: flex;
        justify-content: center;
        align-items: center;
        font-family: PingFang SC;
        font-weight: bold;
        color: #FFFFFF;
        opacity: 0.96;
        letter-spacing: .5em;
        margin-bottom: 32rpx;
    }

    .login__read {
        margin: 0 auto;
        width: 600rpx;
        font-size: 24rpx;
        font-family: PingFang SC;
        font-weight: 500;
        color: #666666;
        line-height: 36rpx;

        span {
            color: rgb(0, 81, 255);
        }
    }
}
</style>
