@tmatrixfed/encrypt-request
v1.2.4
Published
TM请求加密库
Downloads
3
Readme
提供请求加密库
使用方式
依赖库安装
yarn add @tmatrixfed/encrypt-request
import encryptRequest from '@tmatrixfed/encrypt-request'
const options = {
appid: 'appid',
appkey: 'appkey',
token: 'token',
version: '系统版本默认1.0.0',
param: {} // 提交参数
}
let { headers, data } = encryptRequest.getEncryptParam(options)
CDN使用
<script src="https://cdn.jsdelivr.net/npm/@tmatrixfed/encrypt-request"></script>
<script >
const options = {
appid: 'appid',
appkey: 'appkey',
token: 'token',
version: '系统版本默认1.0.0',
param: {} // 提交参数
}
let { headers, data } = encryptRequest.getEncryptParam(options)
</script>