Initial commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { getSm2PublicKey } from './crypto'
|
||||
|
||||
export const $api = {
|
||||
|
||||
// 加密模块
|
||||
crypto: {
|
||||
// 获取sm2公钥
|
||||
getSm2PublicKey: () => getSm2PublicKey(),
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { Sm2PublicKeyResponse } from '@/types/crypto/Sm2PublicKeyResponse'
|
||||
import type { Response } from '@/types/Response'
|
||||
import httpInstance from '@/utils/request/http'
|
||||
|
||||
/**
|
||||
* 获取sm2加密公钥
|
||||
* @returns
|
||||
*/
|
||||
export const getSm2PublicKey = (): Promise<Response<Sm2PublicKeyResponse>> => {
|
||||
return httpInstance.get('/crypto/sm2/public-key')
|
||||
}
|
||||
Reference in New Issue
Block a user