代码拉取完成,页面将自动刷新
import fonts.fontAwesome;
import fsys;
import win.ui;
import string;
import inet.http;
import web.json;
/*DSG{{*/
mainForm = win.form(text="Bilibili32";right=1047;bottom=647;bgcolor=2105376;border="none")
mainForm.add(
TopSearchBx={cls="edit";left=329;top=6;right=697;bottom=35;bgcolor=2960685;border=1;color=15793151;dl=0.31;dr=0.33;dt=1;font=LOGFONT(h=-16);z=9};
caption={cls="bkplus";text="Bili32";left=39;top=11;right=104;bottom=29;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);z=4};
custom={cls="custom";left=112;top=40;right=1048;bottom=648;bgcolor=1841176;db=1;dl=1;dr=1;dt=1;z=1};
logo={cls="bkplus";left=8;top=8;right=32;bottom=32;background="\res\icon_small.png";color=16777215;dl=1;dt=1;font=LOGFONT(h=-18;name='FontAwesome');repeat="scale";z=3};
navAccount={cls="plus";text="账户";left=8;top=160;right=104;bottom=200;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome');padding={left=12;top=4}};iconText='\uF007';notify=1;paddingLeft=1;paddingRight=1;paddingTop=3;textPadding={left=39;bottom=1};x=0.5;y=0.2;z=5};
navDynamic={cls="plus";text="动态";left=8;top=80;right=104;bottom=120;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome');padding={left=12;top=4}};iconText='\uF1AA';notify=1;paddingLeft=1;paddingRight=1;paddingTop=3;textPadding={left=39;bottom=1};x=0.5;y=0.2;z=7};
navFirst={cls="plus";text="推荐";left=8;top=40;right=104;bottom=80;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome');padding={left=12;top=4}};iconText='\uF00A';notify=1;paddingLeft=1;paddingRight=1;paddingTop=3;textPadding={left=39;bottom=1};x=0.5;y=0.2;z=2};
navHelp={cls="plus";text="关于";left=8;top=200;right=104;bottom=240;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome');padding={left=12;top=4}};iconText='\uF06A';notify=1;paddingLeft=1;paddingRight=1;paddingTop=3;textPadding={left=39;bottom=1};x=0.5;y=0.2;z=6};
navSearch={cls="plus";text="搜索";left=8;top=120;right=104;bottom=160;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome');padding={left=12;top=4}};iconText='\uF00E';notify=1;paddingLeft=1;paddingRight=1;paddingTop=3;textPadding={left=39;bottom=1};x=0.5;y=0.2;z=8}
)
/*}}*/
import win.ui.simpleWindow;
win.ui.simpleWindow( mainForm );
/* 圆角 */
import win.util.round;
win.region.round(mainForm.custom);
import win.ui.tabs;
var tbs = win.ui.tabs(
mainForm.navFirst,
mainForm.navDynamic,
mainForm.navSearch,
mainForm.navAccount,
mainForm.navHelp
);
tbs.skin({
foreground={
active=0xFFFFFFFF;
default=0x00FFFFFF;
hover=0xFF2D2D2D
};
color={
default=0xFFFFFFFF;
};
checked={
foreground={default=0xFF454545;};
color={default=0xFF76B9ED;};
}
})
tbs.loadForm(1,"\dlg\first.aardio" );
tbs.loadForm(2,"\dlg\dynamic.aardio" );
tbs.loadForm(3,"\dlg\search.aardio" );
tbs.loadForm(4,"\dlg\account.aardio" );
tbs.loadForm(5,"\dlg\help.aardio" );
tbs.selIndex = 1;
/* 处理顶部搜索框按下Enter的处理事件 */
mainForm.TopSearchBx.translateAccelerator = function( msg ){
if( msg.wParam == 0xD/*_VK_ENTER*/ ){
if( msg.message == 0x101/*_WM_KEYUP*/ ){
tbs.selIndex = 3;
/* 调用search.aardio中的GoSearch(keyword)函数 */
GoSearch(mainForm.TopSearchBx.text);
}
return true;
}
}
/* 处理URL协议调用 */
if( #_ARGV ){
var urlpath = _ARGV[1]; //"bilibili://video/828304392?page=0&h5awaken=114514";
urlpath = string.split(urlpath, "/");
//win.msgbox(urlpath)
if (urlpath[3] == "video") {
a = urlpath[4] + "?";
a = string.split(a, "?")[1];
http = inet.http();
VideoInfo = web.json.parse(http.get("https://api.bilibili.com/x/web-interface/view?aid=" + a));
VideoBvid = VideoInfo.data.bvid;
playerf = win.loadForm("\dlg\player.aardio");
publish("bvid", VideoBvid);
}
}
/* ===== END ===== */
mainForm.show();
return win.loopMessage();
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。