封装 HttpClient,统一管理 Token、Loading 和异常处理

This commit is contained in:
2026-06-07 11:25:59 +08:00
parent c87a3b9f9f
commit caf9038dfa
2 changed files with 171 additions and 3 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import { createRsaPair, base64Decode, base64Encode, } from "@/uni_modules/laoqianjunzi-crypto";
// 在插件中,h5不会导出CryptoRsaPair,需要自定义,等待后续作者处理
// #ifdef H5
type CryptoRsaPair = {
publicKey : string;
@@ -7,9 +7,9 @@ type CryptoRsaPair = {
}
// #endif
// #ifdef APP-ANDROID
import { CryptoRsaPair } from "@/uni_modules/laoqianjunzi-crypto";
import { CryptoRsaPair } from "@/uni_modules/laoqianjunzi-crypto";
// #endif
export class Crypto {
/**
* 随机生成32位的字符串