Dim wb As New weui
If DataTables.Contains("网页_导航") = False Then \'如果表C没有加载
DataTables.Load("网页_导航") \'加载表C
End If
Dim b1 As String
wb.AddPageTitle("","pageheader","湖南城市之窗","全案产品选型库")
\'For Each s As String In DataTables("网页_导航").getvalues("分类","[分类] = \'按品牌查看\'", "排序")
For Each s As String In DataTables("网页_导航").SQLgetvalues("分类","", "排序")
wb.InsertHTML("<h3 align=\'center\' style=\'margin-top:10px\'>" & s & "</h3>")
With wb.AddGrid("","g" & s)
For Each r As DataRow In DataTables("网页_导航").sqlSelect("分类=\'" & s & "\'","", "数量 Desc")
With ExWeUI.WebUI.AddBadge("",r("数量"))
\'.Square=True \'显示为方型
.Attribute="style=\'background-color: rgb(169,169,169);color:rgb(248,248,255);\'" \'自定义背景色和文字颜色
b1 = .BuildHtml
End With
.Add("c2",r("标题")& b1, r("ico"), r("path"))
Next
End With
Next
e.WriteString(wb.Build)
Case Else
\'If DataTables.Contains("产品库_活动家具") = False Then \'如果表C没有加载
\'DataTables.Load("产品库_活动家具") \'加载表C
\'End If
Dim dr As DataRow = DataTables("网页_导航").SQLFind("path=\'" & e.Path & "\' ")
If dr IsNot Nothing Then
wb.AddPageTitle("","ph1","城市之窗","" & dr("品牌")& " &产品选型库")
wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True)
wb.AppendHTML("<script src=\'./weui/exweui.js\' ></script>",True)
With ExWeUI.WebUI.AddListGroup("","lst01",2)
For Each r As DataRow In DataTables("产品库_活动家具").sqlSelect("产品系列 = \'"& dr("标题") & "\'")
\'For Each r As DataRow In DataTables("产品库_活动家具").sqlSelect("产品系列 = \'"& dr("品牌") & "\'" OrElse "产品名称 = \'"& dr("品牌") & "\' ")
\'For Each r As DataRow In DataTables("产品库_活动家具").DataRows
With .AddList(r("产品系列"),r("商品图片"))
With .LeftFooter
.AddFoot("订货ID:"& r("产品_定货ID")).Attribute = "style=\'color:red;font-size:9px\'"
.AddFoot("¥ "&r("单价")).Attribute = "style=\'color:red;font-size:10px\'"
.AddFoot("¥ 9999999.00").Attribute = "style=\'font-size:8px;text-decoration: line-through;\'"
End With
.RightFooter.AddFoot("购买").Attribute = " style=\'color:blue;\'"
.RightFooter.AddFoot("详情").Attribute = " style=\'color:blue;\'"
\'.RightFooter.AddFoot("标签:11.22.33.44.55.66.77.88.99").Attribute = "style=\'color:MediumBlue;font-size:10px\'viewport\' c>")
sb.AppendLine("接收到的数据有:<br/><br/>")
For Each key As String In e.PostValues.Keys
sb.AppendLine(key & ":" & e.PostValues(key) & "<br/>")
Next
e.WriteString(sb.ToString)
上面的代码独立放在网络监视器是可以实现功能的
如何转接到这句代码上
Dim dr As DataRow = DataTables("网页_导航").SQLFind("path=\'" & e.Path & "\' ")
现在用的如下代码,不知道如何跳转链接了
Select Case e.Path
Case "testres.htm"
Dim sb As New StringBuilder
sb.AppendLine("<meta name=\'viewport\' c>")
sb.AppendLine("接收到的数据有:<br/><br/>")
For Each key As String In e.PostValues.Keys
sb.AppendLine(key & ":" & e.PostValues(key) & "<br/>")
Next
e.WriteString(sb.ToString)
Case Else
Dim p As String = e.Path
If p = "" Then p = "*"
Dim dr As DataRow = DataTables("网页_顶层导航").SQLFind("path=\'" & p & "\' or \'" & p & "\' like path ")
If dr IsNot Nothing Then
Functions.Execute(dr("标题"),e)
Else
Dim wb As New weui
wb.InsertHTML("<p>杯具!页面丢失了!! 联系渡哥吧!15116235557 </p>")
wb.AppendHTML("<script>console.warn(\'" & e.Path & "不在httprequest表,请检查是否没有设置.\')</script>")
e.WriteString(wb.Build)
End If
End Select