<template>
    <div class="app-login-third">
        <div class="app-login-third__title">{{ $t("components.login.other") }}</div>
        <div class="app-login-third__content">
            <div class="sign-btn" @click="handleThirdLogin('DINGDING')">
                <img class="third-svg-container" src="@/assets/img/dingding.svg" />
            </div>
            <div class="sign-btn" @click="handleThirdLogin('WXWORK')">
                <img class="third-svg-container" src="@/assets/img/qiyeweixin.svg" />
            </div>
        </div>
    </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
@Component({})
export default class AppThirdLogin extends Vue {
    /**
     * 处理第三方登录
     *
     * @param type 登录类型
     * @memberof AppThirdLogin
     */
    handleThirdLogin(type: string) {
        switch (type) {
            case "DINGDING":
                this.dingTalkHandleClick();
                break;
            case "WXWORK":
                this.wxWorkHandleClick();
                break;
            default:
                console.warn(`暂不支持${type}登录`);
                break;
        }
    }

    /**
     * 钉钉登录
     *
     * @memberof AppThirdLogin
     */
    async dingTalkHandleClick() {
        
    }

    /**
     * 微信登录
     *
     * @memberof AppThirdLogin
     */
    async wxWorkHandleClick() {
        
    }
}
</script>

<style lang="less">
@import "./app-login-third.less";
</style>
