以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 移动开发TabBar怎么固定在页面时,不占用页面空间呢?操作中,会产生新的空白页面空间,求解 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=141689) |
-- 作者:李孝春 -- 发布时间:2019/10/8 17:31:00 -- 移动开发TabBar怎么固定在页面时,不占用页面空间呢?操作中,会产生新的空白页面空间,求解 移动开发TabBar怎么固定在页面时,不占用页面空间呢?操作中,会产生新的空白页面空间,求解 代码如下: Dim wb As New weui Select Case e.Path Case "xjrjzjf.htm" With wb.AddTabBar("", "tb1", 0) .AddPage("page1","微信","./images/button.png") .AddPage("page2","通讯录","./images/msg.png") .AddPage("page3","发现","./images/article.png") .AddButton("bt1","我","./images/cell.png","http://www.foxtable.com") End With If e.PostValues.Count = 0 Then wb.AddPageTitle("","ph1","博融现金日记账") wb.AddForm("","form1","xjrjzjf.htm") With wb.AddInputGroup("form1","ipg1","现金日记账【收入记账】") .AddInput("日期","日期","date") .AddSelect("凭证种类","凭证种类","|发票|收据|收条|小票|物流单|快递单|其它单据") .AddInput("凭证号数","凭证号数","Text") .AddSelect("对方科目","科目类别","|日常办公|销售回款|日常开支|货物订货|其它项目") .AddInput("摘要","内容摘要","Text") With .AddInput("借方金额","收入金额","number") .Step = "0.01" .Attribute = "" End With .AddSelect("借方","收入人员","|肖妍|费泓纶|田景兰") With wb.AddInputGroup("form1","ipg22","文件上传") With .AddUploader("up1","图片",True) .AllowDelete = True \'允许删除 .Incremental = True \'允许 重复选择文件或连续拍照 End With End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "button").Attribute= "" \'调用js函数上传 End With [此贴子已经被作者于2019/10/12 8:50:10编辑过]
|
-- 作者:有点蓝 -- 发布时间:2019/10/8 17:45:00 -- 单单这段代码无法判断问题。完整代码,或者实例发上来看看 |
-- 作者:李孝春 -- 发布时间:2019/10/8 17:51:00 -- 回复:(有点蓝)单单这段代码无法判断问题。完整代码... Dim e As RequestEventArgs = args(0) Dim wb As New weui Select Case e.Path Case "xjrjzjf.htm" With wb.AddTabBar("", "tb1", 0) .AddPage("page1","微信","./images/button.png") .AddPage("page2","通讯录","./images/msg.png") .AddPage("page3","发现","./images/article.png") .AddButton("bt1","我","./images/cell.png","http://www.foxtable.com") End With If e.PostValues.Count = 0 Then wb.AddPageTitle("","ph1","博融现金日记账") wb.AddForm("","form1","xjrjzjf.htm") With wb.AddInputGroup("form1","ipg1","现金日记账【收入记账】") .AddInput("日期","日期","date") .AddSelect("凭证种类","凭证种类","|发票|收据|收条|小票|物流单|快递单|其它单据") .AddInput("凭证号数","凭证号数","Text") .AddSelect("对方科目","科目类别","|日常办公|销售回款|日常开支|货物订货|其它项目") .AddInput("摘要","内容摘要","Text") With .AddInput("借方金额","收入金额","number") .Step = "0.01" .Attribute = "" End With .AddSelect("借方","收入人员","|肖妍|费泓纶|田景兰") With wb.AddInputGroup("form1","ipg22","文件上传") With .AddUploader("up1","图片",True) .AllowDelete = True \'允许删除 .Incremental = True \'允许 重复选择文件或连续拍照 End With End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "button").Attribute= "" \'调用js函数上传 End With End With wb.AddToast("","tst1", "正在上传",1) wb.AddToast("","tst2", "上传成功",0) wb.AddToast("","tst3", "上传失败",0).Icon= "warn" wb.AppendHTML("<script src=\'./lib/ajaxform.js\'></script>",True) \'引入脚本文件 wb.AppendHTML("<script src=\'./lib/yue.js\'></script>") \'引入脚本文件 e.WriteString(wb.Build) Else Dim nms() As String = {"日期","摘要","对方科目"} \'不能为空的列名数组 For Each nm As String In nms If e.PostValues.ContainsKey(nm) = False Then \'生成错误提示页 With wb.AddMsgPage("","msgpage","增加失败", nm & "列不能为空!") .icon = "Warn" \'改变图标 .AddButton("btn1","返回").Attribute = "" End With e.WriteString(wb.Build) Return ""\' \'必须返回 End If Next nms = New String() {"日期","凭证种类","凭证号数","摘要","科目类别","日页","借方金额","借方","照片名","crc值"} \'重新定义了nms数组,增加了两列. Dim dr As DataRow = DataTables("现金日记账").AddNew() For Each nm As String In nms If e.PostValues.ContainsKey(nm) Then dr(nm) = e.PostValues(nm) End If Next For Each key As String In e.Files.Keys If key = "up1" Then For Each fln As String In e.Files(key) e.SaveFile(key, fln, ProjectPath & "Attachments\\" & fln) dr.Lines("照片名") = e.Files(key) Next End If Next \'保存并生成增加成功提示页面 dr.save() Dim val As String = CRCCheckFile(dr("照片名")) dr.SQLSetValue("CRC值",val) e.AsyncExecute = True \'通知系统异步执行,不要关闭信道 Functions.AsyncExecute("jisuan",e) \'异步调用函数处理接收到的数据和文件 With wb.AddMsgPage("","msgpage","增加成功", "好好学习,天天向上") \'生成成功提示页 .AddButton("btn1","继续增加","xjrjzjf.htm") End With e.WriteString(wb.Build) End If End Select
|
-- 作者:有点蓝 -- 发布时间:2019/10/8 20:38:00 -- TabBar添加了3个page,却没有任何控件放在这3个page里,肯定都是空的啊。如果不需要放东西,就使用AddButton,不要使用AddPage |
-- 作者:李孝春 -- 发布时间:2019/10/12 8:49:00 -- 回复:(有点蓝)TabBar添加了3个page,却没有任何控件... 有点蓝老师 换成 With wb.AddTabBar("", "tb1", 0) .AddButton("bt11","微信","./images/button.png") .AddButton("bt12","通讯录","./images/msg.png") .AddButton("bt13","发现","./images/article.png") .AddButton("bt1","我","./images/cell.png","http://www.foxtable.com") End With 问题还是依旧 而且这段代码我放在页面开始之前 和放在页面结束之后 都会出现空白 |
-- 作者:有点蓝 -- 发布时间:2019/10/12 9:23:00 -- 测试了一下,如果要使用AddTabBar至少要有一个page,然后把页面显示内容放到这个page中 …… With wb.AddTabBar("", "tb1", 0) .AddPage("page1","微信","./images/button.png") …… wb.AddPageTitle("page1","ph1","博融现金日记账") wb.AddForm("page1","form1","xjrjzjf.htm") |
-- 作者:李孝春 -- 发布时间:2019/10/12 21:32:00 -- 回复:(有点蓝)测试了一下,如果要使用AddTabBar至少... 有点蓝老师 按照你的指导 我改成了如下: 运行后 只有底部菜单栏了 页面内容为空白 继续求解 代码如下: Dim e As RequestEventArgs = args(0) Dim wb As New weui Select Case e.Path Case "xjrjzjf.htm" With wb.AddTabBar("", "tb1", 0) .AddButton("page1","微信","./images/button.png") .AddButton("bt12","通讯录","./images/msg.png") .AddButton("bt13","发现","./images/article.png") .AddButton("bt1","我","./images/cell.png","http://www.foxtable.com") End With If e.PostValues.Count = 0 Then wb.AddPageTitle("page1","ph1","博融现金日记账") wb.AddForm("page1","form1","xjrjzjf.htm") With wb.AddInputGroup("form1","ipg1","现金日记账【收入记账】") .AddInput("日期","日期","date") .AddSelect("凭证种类","凭证种类","|发票|收据|收条|小票|物流单|快递单|其它单据") .AddInput("凭证号数","凭证号数","Text") .AddSelect("对方科目","科目类别","|日常办公|销售回款|日常开支|货物订货|其它项目") .AddInput("摘要","内容摘要","Text") With .AddInput("借方金额","收入金额","number") .Step = "0.01" .Attribute = "" End With .AddSelect("借方","收入人员","|肖妍|费泓纶|田景兰") With wb.AddInputGroup("form1","ipg22","文件上传") With .AddUploader("up1","图片",True) .AllowDelete = True \'允许删除 .Incremental = True \'允许 重复选择文件或连续拍照 End With End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "button").Attribute= "" \'调用js函数上传 End With End With wb.AddToast("","tst1", "正在上传",1) wb.AddToast("","tst2", "上传成功",0) wb.AddToast("","tst3", "上传失败",0).Icon= "warn" wb.AppendHTML("<script src=\'./lib/ajaxform.js\'></script>",True) \'引入脚本文件 wb.AppendHTML("<script src=\'./lib/yue.js\'></script>") \'引入脚本文件 e.WriteString(wb.Build) Else Dim nms() As String = {"日期","摘要","对方科目"} \'不能为空的列名数组 For Each nm As String In nms If e.PostValues.ContainsKey(nm) = False Then \'生成错误提示页 With wb.AddMsgPage("","msgpage","增加失败", nm & "列不能为空!") .icon = "Warn" \'改变图标 .AddButton("btn1","返回").Attribute = "" End With e.WriteString(wb.Build) Return ""\' \'必须返回 End If Next nms = New String() {"日期","凭证种类","凭证号数","摘要","对方科目","日页","借方金额","借方","照片名","crc值"} \'重新定义了nms数组,增加了两列. Dim dr As DataRow = DataTables("现金日记账").AddNew() For Each nm As String In nms If e.PostValues.ContainsKey(nm) Then dr(nm) = e.PostValues(nm) End If Next For Each key As String In e.Files.Keys If key = "up1" Then For Each fln As String In e.Files(key) e.SaveFile(key, fln, ProjectPath & "Attachments\\" & fln) \'dr.Lines("照片名") = e.Files(key) \'dr.Lines("照片名") =ProjectPath & "Attachments\\" & fln Next End If Next \'保存并生成增加成功提示页面 dr.save() Dim val As String = CRCCheckFile(dr("照片名")) dr.SQLSetValue("CRC值",val) e.AsyncExecute = True \'通知系统异步执行,不要关闭信道 Functions.AsyncExecute("jisuan",e) \'异步调用函数处理接收到的数据和文件 With wb.AddMsgPage("","msgpage","增加成功", "好好学习,天天向上") \'生成成功提示页 .AddButton("btn1","继续增加","xjrjzjf.htm") End With e.WriteString(wb.Build) End If End Select |
-- 作者:有点蓝 -- 发布时间:2019/10/13 21:18:00 -- .AddPage("page1","微信","./images/button.png") |
-- 作者:李孝春 -- 发布时间:2019/10/14 9:40:00 -- 回复:(有点蓝).AddPage("page1","微信","./images/... wb.AddToast("","tst3", "上传失败",0).Icon= "warn" wb.AppendHTML("<script src=\'./lib/ajaxform.js\'></script>",True) \'引入脚本文件 有点蓝老师 页面代码中有如上内容 但是每次上传都会提示上传失败 后台又实际有数据成功显示的 有没有好的办法处理呢
|
-- 作者:有点蓝 -- 发布时间:2019/10/14 9:45:00 -- 上传完整代码 |