1.0.38 • Published 11 months ago
ssv-vue3-sdk v1.0.38
Installation
npm install ssv-vue3-sdk --save
Getting started
Step1 引入&初始化 main
import { createApp } from 'vue'
import App from './App.vue'
import 'ssv-vue3-sdk/dist/style.css';
import ssvPlugin from 'ssv-vue3-sdk';
// env对应接口说明:
// 'master' => 线上域名 https://api.em.xx.com
// 'test' => 测试域名 https://apitest.em.xx.com
createApp(App).use(ssvPlugin, { env: 'master', }).mount('#app')
Step2 业务代码引入组件
<script setup>
const onLoginSuccess = data => {
// sdk登录后返回的数据 示例:
// let data = {
// tenantInfo: {
// tenant_id: 'bcxxx',
// tenant_name: '测试部门',
// roles: [1],
// platform: 2,
// },
// tokenInfo: {
// expires_in: 1676040486,
// access_token: '',
// refresh_token: '',
// uid: '1xxx'
// },
// }
// 说明:
// 登陆态 access_token
// 平台标识 platform
// 用户标识 uid
console.log('onLoginSuccess:', data);
console.log(data.tenantInfo);
console.log(data.tokenInfo);
};
// id(string) 账号 必填
// pwd(string) 密码 必填
// login_type(int) 账号参数:账号密码 1 ,手机号 2 必填
// platform(int) 平台参数:试点 1,机构 2 必填
const loginParams = {
// 账号
id: 'test_op***',
// 密码
pwd: '7Z****',
// 账号密码1,手机号2(不支持)
login_type: 1,
// 平台参数:试点 1,机构 2
platform: 1,
}
</script>
<template>
<div>
<Ssv @login="onLoginScuess" :init="loginParams" />
</div>
</template>
Changelog
All notable changes to this project will be documented in this file.
Unreleased
Added
Fixed
1.0.13 - 2023-02-21
Added
- 支持API密码登录
- 若干问题修复
1.0.13 - 2023-02-14
Added
- 内置登录参数
- 若干问题修复
1.0.1 - 2023-02-03
Changed
- 修改返回message错误的问题.
- 修复code获取异常的bug.
1.0.0 - 2023-02-01
Added
- 应急SAAS登录SDK,封装登录逻辑.
1.0.38
11 months ago
1.0.37
11 months ago
1.0.36
1 year ago
1.0.35
1 year ago
1.0.34
1 year ago
1.0.33
1 year ago
1.0.32
1 year ago
1.0.31
1 year ago
1.0.30
1 year ago
1.0.29
1 year ago
1.0.28
1 year ago
1.0.27
1 year ago
1.0.26
1 year ago
1.0.25
1 year ago
1.0.24
1 year ago
1.0.23
1 year ago
1.0.22
1 year ago
1.0.21
1 year ago
1.0.20
1 year ago
1.0.19
1 year ago
1.0.18
1 year ago
1.0.17
1 year ago
1.0.16
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.11
1 year ago
1.0.10
1 year ago
1.0.9
1 year ago
1.0.8
1 year ago