Initial commit

This commit is contained in:
wzy-warehouse
2026-04-07 20:01:06 +08:00
committed by GitHub
commit b87a0e71db
34 changed files with 6035 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
import { getSm2PublicKey } from './crypto'
export const $api = {
// 加密模块
crypto: {
// 获取sm2公钥
getSm2PublicKey: () => getSm2PublicKey(),
},
}
+11
View File
@@ -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')
}