通过图2的方式配置后,还是一样没有任何效果

1***@qq.com
- 发布:2023-04-06 15:37
- 更新:2023-04-06 16:08
- 阅读:908



以下是一些可能有用的步骤:
安装并启动Charles;
在手机上打开Charles代理设置页面(一般是在手机的Wi-Fi设置中),设置代理服务器为你电脑的IP地址和Charles代理端口号;
在Charles中打开SSL Proxying设置(菜单栏:Proxy -> SSL Proxying Settings),并添加需要抓包的域名;
在手机上打开浏览器,访问 http://chls.pro/ssl 下载并安装Charles的根证书;
在手机上打开uniApp应用,并进行操作,此时可以在Charles中看到相应的数据包。

我们可以通过以下步骤来进行配置:
在manifest.json中添加配置:
"networkTimeout": {
"request": 5000,
"downloadFile": 10000
},
"debug": {
"networkInspect": true
}
在App.vue中添加配置
onLaunch: function () {
if (process.env.NODE_ENV === 'development') {
uni.getSystemInfo({
success: (res) => {
if (res.platform === 'devtools') {
uni.setEnableDebug({
enableDebug: true
})
}
}
})
}
}
在charles中进行https抓包
以上是对于在uni-app中进行https抓包的一些配置方法,具体的操作还需要根据实际情况进行调整哦~希望能够对你有所帮助!