以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  exweui 快递控件怎样运用  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=158751)

--  作者:a2704a
--  发布时间:2020/12/1 16:25:00
--  exweui 快递控件怎样运用
例子是用json的,如果我数据表 有个 时间,内容列,怎样写?
Dim e As RequestEventArgs = args(0)
Dim wb As New weui
wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True)
Dim fl As String = HttpServer.WebPath & "\\快递.json"
If FileSys.FileExists(fl)
    Dim txt As String = FileSys.ReadAllText(fl)
    Dim jo As JObject = Jobject.Parse(txt)
    If jo("showapi_res_body")("data") IsNot Nothing Then
        With ExWeUI.WebUI.AddStepGroup("","step1","",,2)
            For Each jt As JToken In jo("showapi_res_body")("data")
                With .AddStep("st01","",jt("time").ToString)
                    .Description = jt("context").ToString
                End With
            Next
            wb.InsertHTML(.BuildHtml)
        End With
    End If
    e.WriteString(wb.Build)
Else
    e.WriteString("没有查到快递信息")
End If

--  作者:有点蓝
--  发布时间:2020/12/1 16:31:00
--  
Dim e As RequestEventArgs = args(0)
Dim wb As New weui
wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True)

With ExWeUI.WebUI.AddStepGroup("","step1","",,2)
    For Each dr As DataRow In DataTables("表A").DataRows
        With .AddStep("st01","",dr ("时间"))
            .Description = dr ("内容")
        End With
    Next
    wb.InsertHTML(.BuildHtml)
End With