/*
软件作者:https://xuhss.com/oxox/pro
*/
"ui";
ui.layout(
<frame background="#515155">
<vertical align="top" margin="30">
<text textSize="26sp" textStyle="bold">身份证号码:</text>
<linear>
<input id="num" layout_weight="1" bg="#ffffff" h="45" paddingLeft="10sp" maxLines="1" inputType="number" emsMax="11" hint="输入身份证号码" alpha="0.5"/>
<button h="55" w="70" id="ok" text="查询" />
</linear>
<linear>
<text id="xkh" h="30" w="auto" textSize="18sp"/>
</linear>
<linear>
<horizontal>
<text id="xb" h="30" w="auto" textSize="18sp" />
</horizontal>
</linear>
<linear>
<horizontal>
<text id="csrq" h="30" w="auto" textSize="18sp" />
</horizontal>
</linear>
<linear>
<horizontal>
<text id="fzd" h="40" w="auto" textSize="18sp" />
</horizontal>
</linear>
</vertical>
</frame>
);
ui.ok.click(function() {
threads.start(function() {
let sd = ui.num.text();
if (sd) {
var sum = sfz(sd);
if (sum) {
ui.run(() => {
ui.xb.setText(sum[1]);
ui.csrq.setText(sum[2]);
ui.fzd.setText(sum[3]);
});
}
}
});
});
ui.ok.on("long_click", () => {
ui.num.setText("");
});
ui.xb.click(function() {
let xbj = ui.xb.text();
if (xbj) {
setClip(xbj);
toast("复制成功");
}
});
ui.csrq.click(function() {
let csrqd = ui.csrq.text();
if (csrqd) {
setClip(csrqd);
toast("复制成功");
}
});
ui.fzd.click(function() {
let qhh = ui.fzd.text();
if (qhh) {
setClip(qhh);
toast("复制成功");
}
});
function sfz(ble) {
ui.run(() => {
ui.xb.setText("");
ui.csrq.setText("");
ui.fzd.setText("");
});
let url = "http://qq.ip138.com/shenfenzheng/search.asp";
let html = http.post(url, {
"userid": ble,
"action": "idcard"
}).body.string();
html = cutstr(html, "<li", "</li>", 12, 16);
html = html.split(">");
if (html.length>2) {
return html;
} else {
toast("身份证号码错误或不存在!");
return false;
}
}
function cutstr(a, b, c, f, e) {
a = a.split(b);
var d = ""
if (e < a.length && e != null) {} else {
e = a.length;
}
if (f == null) {
f = 1;
}
for (i = f; i < e; i++) {
tmp = a[i].split(c);
if (tmp.length > 1) {
d += tmp[0];
}
}
return d;
}
AutoJs源码-身份证查询UI
需积分: 4 86 浏览量
2022-11-16
19:51:10
上传
评论
收藏 1KB 7Z 举报
[虚幻私塾】
- 粉丝: 335
- 资源: 1559
最新资源
- ZPM vscode 插件
- 员工注册登录原型集(xmind书写)
- SM2302NSAC-TRG-VB一款SOT23封装N-Channel场效应MOS管
- 用于订阅 google reader 的 rss 的 Chrome 扩展程序
- 电脑端浏览器插件-车牌号自编助手
- 北京邮电大学计网实验-模拟数据链路层的滑动窗口协议源码+文档说明.zip
- Java经典面试 100问,可以给面试党们去背,里面答案都是经过反复查询和推敲的 希望能帮到你们
- [练习题+答案]Harmony OS应用开发者高级认证
- WPS2019专业增强版-v11.8.2.10972-中石油定制版
- SI9959DY-T1-E3-VB一款SOP8封装2个N-Channel场效应MOS管
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈