<template>
  <div class="ww-login_container">
    <div class="ww-login_wrap flex flex-col items-center">
      <img
        src="https://wwcdn.weixin.qq.com/node/wwopen/wwopenmng/style/images/independent/logo/WeworkLogoBule$57136f6f.png"
        alt=""
      />
      <div id="wx_qrcode"></div>
    </div>
  </div>
</template>
<script setup lang="ts">
import { onMounted } from 'vue';

onMounted(() => {
  const redirectUrl = encodeURIComponent(window.location.href);
  window.WwLogin({
    id: 'wx_qrcode', // 登录页面显示二维码的容器id
    appid: 'ww00ea9bd48f98ec24', // 企业微信的CorpID，在企业微信管理端查看
    agentid: '1000002', // 授权方的网页应用id，在具体的网页应用中查看
    redirect_uri: encodeURIComponent(redirectUrl), // 重定向的地址，需要进行encode
    state: '',
    href: 'https://sit-ylgh02-1310319760.cos.ap-beijing.myqcloud.com/assets/css/wwchat-qrcode.css' // 自定义样式链接，只支持https协议的资源地址
  });
});
</script>
<style scoped lang="scss">
.ww-login_wrap {
  position: relative;
  top: -20px;
}
</style>
