Skip to content

Commit 3135773

Browse files
author
ziye12
authored
Add files via upload
修改云闪付的定位
1 parent 2497453 commit 3135773

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

ysfdw.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*ziye
2+
3+
如果显示未获取定位,则重启软件多试几次
4+
5+
放到构造请求里方便修改
6+
7+
浏览器打开https://raw.githubusercontent.com/ziye12/JavaScript/master/diqudaima.txt,然后搜索地区,修改下面👇的6位数
8+
9+
10+
[MITM]
11+
hostname=restapi.amap.com
12+
[rewrite_local]
13+
#云闪付改定位
14+
^https:\/\/restapi\.amap\.com\/v3\/geocode\/regeo? url script-response-body ysfdw.js
15+
16+
*/
17+
18+
var body = $response.body; // 声明一个变量body并以响应消息体赋值
19+
var obj = JSON.parse(body); // JSON.parse()将json形式的body转变成对象处理
20+
21+
22+
23+
obj.regeocode.addressComponent.adcode="540102"
24+
25+
26+
27+
body = JSON.stringify(obj); // 重新打包回json字符串
28+
$done(body); // 结束修改

0 commit comments

Comments
 (0)