简单几句话调用淘口令解析
By
笑口常
at 2020-10-04 • 0人收藏 • 1106人看过
感谢: jacen 分享
import fonts.fontAwesome; import win.ui; /*DSG{{*/ var winform = win.form(text="淘口令解析工具";right=752;bottom=455) winform.add( button={cls="button";text="解析";left=343;top=164;right=483;bottom=203;dl=1;dr=1;dt=1;font=LOGFONT(h=-15;name='FontAwesome');z=3}; edit={cls="edit";left=29;top=38;right=499;bottom=150;autohscroll=false;dl=1;dr=1;dt=1;edge=1;multiline=1;z=1}; editResult={cls="richedit";left=32;top=224;right=500;bottom=427;autohscroll=false;db=1;dl=1;dr=1;dt=1;edge=1;link=1;multiline=1;z=4}; plus={cls="plus";left=511;top=41;right=738;bottom=427;db=1;dr=1;dt=1;repeat="scale";z=5}; static={cls="static";text="请输入淘口令";left=30;top=14;right=371;bottom=31;dl=1;dt=1;transparent=1;z=2} ) /*}}*/ import inet.http; import win.dlg.message; win.dlg.message.install(); winform.button.oncommand = function(id,event){ winform.button.disabledText = {'\uF254';'\uF251';'\uF252';'\uF253';'\uF250'} thread.invoke( function(winform){ import process; import web.rest.jsonLiteClient; var http = web.rest.jsonLiteClient(); http.beforeStringifyRequestParameters = function(params,codepage){ if(params && params.tkl){ params.tkl = string.match(params.tkl,"\w{3,}") } return params; } var taofake = http.api("http://www.taofake.com/index/tools/gettkljm.html") var result = taofake.get( tkl = winform.edit.text ) if(result[["msg"]]!="ok"){ winform.button.disabledText = null; return winform.msgErr("解析错误"); } winform.plus.background = result.data.picUrl; winform.editResult.text = "淘口令有效时间:" + result.data.validDate + '\r\n'; winform.editResult.print( result.data.content ); winform.editResult.print( result.data.url ); process.openUrl( result.data.url ); winform.button.disabledText = null; },winform ) } winform.show(); win.loopMessage();
登录后方可回帖