发现使用框架也可以很灵活。
之前曾经请教过下述代码,实现图片、表单、按钮动态添加,这样可以实现一个对客户展示产品页面,往往这才是首页,现在移动文档里提到的Grid首页,一般是内部管理的首页。
文档大部分讲的是建立后台,
如果基于下述代码修改,当1~5产品浏览完了,上滑,能加载另外5位的功能,如果移动文档加上这段示例,可以增加对客户展示产品页面,就相当完美了。想要实现的功能都能实现,使用框架也很动态。
增加一个文档,即可所有人可以建立前台页面!因为好像建立前台页面的功能介绍,都具备了,就差这一个了!
希望狐爸在移动文档补充这段介绍,谢谢!
Dim e As RequestEventArgs = args(0) '对客户展示产品页面
Select Case e.Path
Case "index.htm"
Dim wb As New weui
With wb.AddTabBar("", "tb1", 1) '使用TabBar,增加4个按钮
.AddButton("bt1","返回","./images/a.jpg","http://www.foxtable.com")
.AddButton("bt2","记录","./images/b.jpg","http://www.foxtable.com")
.AddButton("bt3","设置","./images/c.jpg","http://www.foxtable.com")
.AddButton("bt4","我的","./images/d.jpg","http://www.foxtable.com")
End With
For i As Integer = 1 To 5
With wb.AddArticle("","ar" & i)
.AddImage("./images/00" & i & ".jpg")
End With
wb.AddForm("","form" & i,"test.htm")
With wb.AddInputGroup("form" & i,"ipg" & i)
.AddInput("xm" & i,"名称","text")
.AddInput("pw" & i,"价格","text")
End With
With wb.AddButtonGroup("form" & i,"btg" & i,False)
.Add("btn1" & i, "查看详细资料", "submit")
End With
Next
e.WriteString(wb.Build) '生成网页
End Select
[此贴子已经被作者于2017/3/16 10:49:46编辑过]