SOURCE

const app = tcb.init({
    env: 'vue-douyin-test-16f173'
})
const auth = app.auth();

async function login(){
  // 1. 建议登录前先判断当前是否已经登录
  const loginState = await auth.getLoginState();
  if(!loginState){
    // 2. 调用微信登录API
    await auth.weixinAuthProvider({
      appid: "wx868feb2289cc347b",
      scope: "snsapi_userinfo"
    }).signIn();
  }
}

login();
console 命令行工具 X clear

                    
>
console