<template>
    <main>
        <section class="layout-box box-shadow">
            <div class="center-title clearfix">
                <h3>选择修改手机号码方式</h3>
                <a href="javascript:;" class="back-btn" @click="goBack">返回</a>
            </div>
            <div class="alter-mode clearfix">
                <div class="alter-mode-reset alter-mode-box">
                    <img src="~assets/images/icon-way3.png" alt />
                    <h2>当前绑定的手机号码可以正常使用</h2>
                    <p class="notice">如果您的{{phone}}手机号码还在正常使用，请选择此方式。</p>
                    <router-link to="/center/setting/phone/reset" class="btn-reg">立即修改</router-link>
                </div>
                <div class="alter-mode-manual alter-mode-box">
                    <img src="~assets/images/icon-way2.png" alt />
                    <h2>当前绑定的手机号码无法正常使用</h2>
                    <p class="notice">如果您的{{phone}}手机号码无法正常使用，请选择人工客服找回。</p>
                    <router-link to="/center/setting/phone/manual" class="btn-reg">立即修改</router-link>
                </div>
            </div>
        </section>
    </main>
</template>

<script>
import { mapState } from "vuex";
export default {
    name: "setLoginPass",
    computed: {
        ...mapState(["userInfo"])
    },
    methods: {
        goBack() {
            this.$router.go(-1);
        }
    },
    data() {
        return {
            phone: ""
        };
    },
    created() {
        this.phone =
            this.userInfo.loginInfo.phoneNo.substring(0, 3) +
            "****" +
            this.userInfo.loginInfo.phoneNo.substring(7);
    }
};
</script>

<style lang="less" scoped>
@import "../../assets/styles/common.css";
.layout-box {
    overflow: hidden;
    min-height: calc(100vh - 184px);
    background: #fff;
}
.center-title {
    position: relative;
}
.back-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding-left: 22px;
    font-size: 14px;
    background: url(~assets/images/icon-center-back.png) left center no-repeat;
    color: #3d86e9;
}
.alter-mode-box {
    float: left;
    width: 50%;
    margin: 30px 0;
    padding: 0 100px;
    text-align: center;
    box-sizing: border-box;
    h2 {
        margin-top: 20px;
        font-size: 18px;
        font-weight: normal;
        color: #333;
    }
    .notice {
        margin: 12px 0 50px;
        line-height: 24px;
        font-size: 14px;
        color: #666;
    }
    .btn-reg {
        display: block;
        width: 330px;
        height: 40px;
        line-height: 40px;
        margin: 24px auto 40px;
        border-radius: 4px;
        background: #3d86e9;
        color: #ffffff;
    }
}
.alter-mode-reset {
    border-right: 1px solid #f7f7f7;
}
</style>
