<template>
    <view>
        <u-toast ref="uToast" />
        <view class="w75">
            <view
                class="f-weight-bold"
                style="color: #333; font-size: 42rpx; padding-top: 100rpx"
            >授权成功</view
            >
            <view
                class="f-size-32"
                style="color: #bbb; margin-top: 20rpx"
            >请重新登录</view
            >
            <button
                @tap="logout"
                class="main-color-bg text-color-white"
                style="border-radius: 80rpx; line-height: 100rpx;margin-top:100rpx"
            >
                退出登录
            </button>
        </view>
    </view>
</template>

<script>
export default {
    data() {
        return {
            form: {
                oldPassword: '', // 手机号
                password: '', // 验证码
                passwordConfirm: '' // 密码
            },
            openId: null
        };
    },
    onLoad(options) {
        this.openId = options.openId
        uni.setStorageSync('openId', this.openId);
    },
    methods: {
        // 退出登录
        logout() {
            uni.removeStorageSync('userInfo');
            uni.removeStorageSync('accessToken');
            uni.redirectTo({
                url: '/pages/login/login'
            });
        }
    }
};
</script>

<style scoped lang="less">
.input {
    width: 600rpx;
    margin: 0 auto;

    & > view {
        height: 100rpx;
        border-bottom: 1rpx solid #e6e6e6;
    }

    .code {
        height: 56rpx;
        line-height: 56rpx;
        padding: 0rpx 20rpx;
        background: #ffffff;
        border: 1rpx solid #0082ff;
        border-radius: 28rpx;
    }

    input {
        height: 100rpx;
    }
}
</style>
