Dim fl As String = "d:\web\" & e.path
If filesys.FileExists(fl)
Dim idx As Integer = fl.LastIndexOf(".")
Dim ext As String = fl.SubString(idx)
Select Case ext
Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar",".txt"
e.WriteFile(fl)
Return '这里必须返回
End Select
End If
Dim wb As New WeUI
Select Case e.Path
Case "test.htm"
wb.AppendHTML("<script src='http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js'></script>",True)
wb.AppendHTML("<script src='http://echarts.baidu.com/gallery/vendors/echarts-stat/ecStat.min.js'></script>",True)
wb.AppendHTML("<script src='http://echarts.baidu.com/gallery/vendors/echarts/echarts-all-3.js'></script>",True)
wb.AppendHTML("<script src='http://echarts.baidu.com/gallery/vendors/echarts/map/js/china.js'></script>",True)
With wb.AddArticle("","ar1")
.AddTitle("h1","ECharts测试")
.AddTitle("h2","1. 条形图")
.AddContent("<div id=""main1"" style=""width: 600px;height:400px;""></div>")
.AddTitle("h2","2. 地图")
.AddContent("<div id=""main2"" style=""width: 600px;height:400px;""></div>")
End With
wb.AppendHTML("<script src='./lib/map.js'></script>")
e.WriteString(wb.Build)
Case "getdata.htm" '获取数据,这里通过文件返回json数据,实际应用可以结合数据库查询和JObject返回json数据