Foxtable(狐表)用户栏目专家坐堂 → 调起扫码框较慢


  共有62人关注过本帖平板打印复制链接

主题:调起扫码框较慢

帅哥哟,离线,有人找我吗?
刘林
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:七尾狐 帖子:1712 积分:12728 威望:0 精华:0 注册:2016/4/28 9:58:00
调起扫码框较慢  发帖心情 Post By: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,而不是返回上一页

谢谢

 回到顶部