HarmonyOS 传参加密后调用接口问题

这里调用接口时传参加密,看下这里如何修改,传参加密耗时。

//发送短信
@State aesPhone: string = ""
@State aesImCode: string = ""
getMsgCode():void{
  const session = httpCore.getApiEngine();
  if (this.etImCode != '' && this.etImCode != undefined){
  //加密
  this.aesPhone = aesUtils.aesEncrypt(this.etPhone);
  this.aesImCode = aesUtils.aesEncrypt(this.etImCode);

  session.get(httpCore.getJointUrl() + apiService.getForgotPswCode + this.aesPhone + '/' + this.aesImCode + '/' + this.currentTimestamp)
  .then(async (response) => {
  let apiResult = new ApiResult();
  apiResult = JSON.parse(JSON.stringify(response))
  console.error('=返回值===' + JSON.stringify(response));
  if (apiResult.status == '200') {
  this.getCodeInfo();
} else {
  promptAction.showToast({ message: apiResult.message, bottom: 100, duration: 1000 })
}
})
.catch((err: BusinessError) => {
  console.error("err:" + JSON.stringify(err));
});
}
}
HarmonyOS
2025-01-10 07:17:40
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
zbw_apple
分享
微博
QQ
微信
回复
2025-01-10 10:17:44
相关问题
HarmonyOS AES加密/RSA加密问题
366浏览 • 1回复 待解决
HarmonyOS 调用flutter页面并
310浏览 • 1回复 待解决
如何解决定位接口调用问题
785浏览 • 1回复 待解决
HarmonyOS 如何使用router接口inteface
298浏览 • 1回复 待解决
ArkTS 网络请求 接口动态
940浏览 • 1回复 待解决
HarmonyOS 网络接口签名加密库选型
639浏览 • 1回复 待解决
tp5 如何对post参进行加密
2128浏览 • 1回复 待解决
HarmonyOS 页面问题
829浏览 • 1回复 待解决
实现接口的匿名实现
789浏览 • 1回复 待解决
HarmonyOS hmac加密问题
527浏览 • 1回复 待解决
HarmonyOS 页面对象出错
291浏览 • 1回复 待解决
HarmonyOS 本地html问题
918浏览 • 1回复 待解决
HarmonyOS 构造参数失败问题
274浏览 • 1回复 待解决
HarmonyOS 父子组件问题
335浏览 • 1回复 待解决
HarmonyOS 参数问题
503浏览 • 1回复 待解决
HarmonyOS Navigation问题
431浏览 • 1回复 待解决
HarmonyOS Component问题
327浏览 • 2回复 待解决
HarmonyOS RSA加密失败问题
441浏览 • 1回复 待解决