<template>
    <div class="page">
        <div class="title">账户与安全</div>
        <van-cell-group>
            <van-cell title="修改登录密码" :to="{ path: '/forget' }" is-link />
            <van-cell title="修改支付密码" :to="{ path: '/tradingPassword' }" is-link />
            <van-cell title="修改手机号" :to="{ path: '/changePhone' }" is-link />
        </van-cell-group>
        <div class="logout">
            <van-button type="primary" @click="logout" plain block round>退出登录</van-button>
        </div>
    </div>
</template>

<script>
export default {
    methods: {
        logout() {
            this.$dialog
                .confirm({
                    title: '提示',
                    message: '确认要退出登录吗?'
                })
                .then(() => {
                    localStorage.removeItem('nineToken');
                    this.$router.go(-1);
                });
        }
    }
};
</script>

<style lang="less" scoped>
.title {
    background-color: #181818;
    padding: 10px 16px;
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    line-height: 30px;
}
.page {
    background-color: #0f0f0f;
}

.van-cell-group {
    background-color: #181818;
}
.van-cell {
    padding: 23px 16px;
}
.logout {
    padding: 50px 30px 50px;
}
</style>
