1.对某个请求右键,选择map Local
2.
3.选择choose----本地文件(此处为记事本)
(将Charles中的 response中的值 替换成自己想要的 response-----使用本地文件保存)
例如:本地文件中的内容为:
{
"success": true,
"code": "0",
"msg": "success",
"data": [{
"action": "fdd-ddws://agent-store/esf_common_house_list?houseType=70",
"id": 27,
"name": "全网xxxx",
"text": "",
"type": 6,
"url": "https://fs.fangdd.com/duoduoxueyuan/yunying-shipin/FhsLOfJrGdb4hOGDlAS0VigGyCuX.png"
}, {
"action": "fdd-ddws://agent-store/enturs_house_list",
"id": 24,
"name": "专属xxxx",
"text": "",
"type": 6,
"url": "https://fs.esf.fangdd.com/efab/Fk3vyYztOfE80yrv1ar2YXMiGxq4.png"
}, {
"action": "fdd-ddws://agent-store/esf_common_house_list?houseType=10",
"id": 25,
"name": "公司xxxx",
"text": "",
"type": 6,
"url": "https://fs.fangdd.com/duoduoxueyuan/yunying-shipin/FnotnywkWPVVuPE0jsMC8mo9C1bt.png"
}, {
"action": "fdd-ddws://agent-store/tools_owner_house_list",
"id": 26,
"name": "业主xxxx",
"text": "",
"type": 6,
"url": "https://fs.fangdd.com/duoduoxueyuan/yunying-shipin/FoAeoyExnPapwVauhbpw04gNgLXU.png"
}]
}
即---app中的该请求的返回值会使用该本地文件中的返回值----达到替换返回值的效果---无需前端为了造数据再多给出返回值或者入口;
关闭该功能:
方法一:去掉map local前面的小勾
方法二:点击上图 map local,去掉下图中的文件前的小勾