以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  调起扫码框较慢  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=151684)

--  作者:刘林
--  发布时间:2020/6/30 23:37:00
--  调起扫码框较慢
Dim e As RequestEventArgs = args(0)
Dim path As String = "foxtableAppTest"
Dim wb As new weui
wb.AppendHTML("<meta charset=\'utf-8\'>",True)
wb.appendHTML("<meta name=\'viewport\' c />",True)
wb.appendHTML("<script src=\'../mui/js/mui.min.js\'></script>",True)
wb.appendHTML("<script Type=\'text/javascript\' charset=\'utf-8\'>mui.init();</script>",True)
wb.AppendHTML("<script type=\'text/javascript\' src=\'/" & path & "/js/common.js\'></script>", True)
wb.AppendHTML("<link rel=\'stylesheet\' href=\'/" & path & "/css/common.css\' Type=\'text/css\' charset=\'utf-8\'/>", True)
wb.appendHTML("<style>.fox_page_title{color:white}</style>",True)
wb.appendHTML("<style>.fox_page_subtitle{color:white;}</style>",True)
wb.appendHTML("<style>.fox_page_header{background-color:dodgerblue;}</style>",True)
wb.appendHTML("<style>.weui_label{color:dodgerblue;}</style>",True)
wb.appendHTML("<style>h5,p{margin:8px 16px;}</style>",True)
wb.AddPageTitle("","ph1","新生报名","请扫描学校给定的报名码")
wb.AddForm("","form1","bmxx.htm")
With wb.AddInputGroup("form1","ipg1","")
    Dim dr As DataRow
    dr = DataTables("用户").sqlfind("身份证号 = \'" & e.Cookies("username") & "\'")
    Dim In1 = .AddInput("身份证号","身份证号:","Text")
    In1.readonly = True
    In1.value = dr("身份证号")
    Dim In2= .AddInput("学生姓名","学生姓名:","Text")
    In2.readonly = True
    In2.value = dr("姓名")
    .AddInput("申读学校","申读学校:","Text").readonly = True
    .AddInput("申读班级","申读班级:","Text").readonly = True
    .AddHiddenValue("类型","a")
    With wb.AddButtonGroup("form1","btg1",False)
        Dim btn1= .Add("btn1", "扫报名码", "button")
        btn1.Attribute = " & path & "/plus/barcode_scan.html\',true,true);"""
        btn1.kind=1
        Dim btn2= .Add("btn2", "确认申读", "submit")
        btn2.kind=1
    End With
End With
wb.InsertHTML("<script>function scaned( t, r, f ) {document.getElementById(\'申读学校\').value=r.split(\',\')[0]; document.getElementById(\'申读班级\').value=r.split(\',\')[1];document.getElementById(\'类型\').value=r.split(\',\')[2]}</script>")
e.WriteString(wb.Build)
e.Handled=True


请问老师,
1、上面代码扫码是可以,但有个严重的问题是调起调码框要等好几秒到十秒,这是什么原因,一般扫码是点就来了啥
2、执行了mui.init();但这个页面点手机返回键会关闭整个APP,而不是返回上一页

谢谢

--  作者:有点蓝
--  发布时间:2020/7/1 8:35:00
--  
这些都是调用的第三方的组件,我们没有办法去寻找和解决问题。

您把页面保存为一个静态网页,单独测试有没有问题?wb.Save("d:\\web\\tst.html"),如果也有问题,把这个静态页面做成例子寻求他们官方的开发支持