s-sc-cb.vue

示例 - 基本用法 - API - Props/Attrs - Events

Usage no npm install needed!

<script type="module">
  import sScCbVue from 'https://cdn.skypack.dev/s-sc-cb.vue';
</script>

README

SScCb 双创登录中转页

双创登录定制中转页

示例

基本用法

<template>
  <s-sc-cb @success="onSuccess" @error="onError"></s-sc-cb>
</template>

<script>
export default {
  methods: {
    onSuccess({
      Authorization,
      UserName,
      UserId,
      TenantName,
    }) {
      console.log({
        Authorization,
        UserName,
        UserId,
        TenantName,
      });
    },
    onError(error) {
      console.error(error && error.message);
    },
  },
};
</script>

API

Props/Attrs

Prop/Attr Type Options Default Description
domainName string 'low-code' 配置登录应用信息
loginType string 'Urs' 目前支持一种:Urs(使用Urs账号登录)
requestPath string '/proxy/nuims/gateway/nuims/nuims' 配置接口请求基础路径

Events

@success

登录成功后触发

Param Type Description
$event.Authorization string 登录成功后为用户颁发的 AccessToken
$event.UserId string 用户 ID
$event.UserName string 用户名
$event.TenantName string 租户信息

@error

登录失败后触发

Param Type Description
$event.message string 登录失败的信息