<!--
 * @Author: zy1125 1515706227@qq.com
 * @Date: 2023-10-18 14:19:17
 * @LastEditors: zy1125 1515706227@qq.com
 * @LastEditTime: 2023-12-20 18:49:48
 * @FilePath: \v3_yyz\src\components\Login.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <div class="bg">
        <div
            style="width: 100%;height: 50px;position: relative;top: 85vh ;z-index: 999;display: flex;align-items: center;justify-content: center;">
            <div class="loginbutton" @click="login">
                <img :src="loginimg" alt="" style="">
                <span> 登录</span>
            </div>
        </div>

    </div>
</template>

<script >
import { ref } from "vue";
import { useRouter } from 'vue-router'

// import login from '/''
export default ({
    setup() {
        //首先在setup中定义
        const router = useRouter()

        const loginimg = ref("./img/login.png")
        const login = function () {
            // 跳转到指定的 URL 地址
            location.href = "https://cas.huanghuai.edu.cn/cas/?service=https://weizhi.huanghuai.edu.cn/xyyzioc/#/"
           
    

        }
        return {
            loginimg,
            login
        }
    }
})

</script>

<style scoped lang="scss">
.bg {

    position: absolute;
    box-sizing: border-box;
    // height: 200vw;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    // overflow: hidden;
    // border: 1px solid red;

    // background-color: darkcyan;
    background: url('/public/img/bg.png');

    background-size: 100% 100%;
    z-index: 888;

    // background-color: #040728;


}

.loginbutton {

    display: flex;
    background: #6171FF;
    align-items: center;
    justify-content: center;

    width: 160px;
    border-radius: 20px;
    padding: 10px;
    cursor: pointer;

    img {
        width: 24px;
        height: 24px;
    }

    span {
        color: #FFF;
        font-family: PingFang SC;
        font-size: 20px;
        font-style: normal;
        font-weight: 400;
        line-height: 24px;
        margin-left: 3px;
    }
}
</style>