以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- e.postvalues有什么具体含义 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=117317) |
-- 作者:一叶知秋 -- 发布时间:2018/4/10 16:48:00 -- e.postvalues有什么具体含义 老师,e.postvalues有什么具体含义呢, |
-- 作者:有点甜 -- 发布时间:2018/4/10 16:50:00 -- http://www.foxtable.com/mobilehelp/scr/0113.htm
|
-- 作者:一叶知秋 -- 发布时间:2018/4/11 9:59:00 -- 去看了 |
-- 作者:有点甜 -- 发布时间:2018/4/11 10:44:00 -- 以下是引用一叶知秋在2018/4/11 9:59:00的发言:
去看了
那你想问什么?什么不理解? |
-- 作者:一叶知秋 -- 发布时间:2018/4/11 11:33:00 -- 比如这个,以后用的会不会多呢,感觉这个访问地址挺长的 |
-- 作者:有点甜 -- 发布时间:2018/4/11 12:21:00 --
看懂weui框架这个即可
http://www.foxtable.com/mobilehelp/scr/0007.htm
|
-- 作者:一叶知秋 -- 发布时间:2018/4/11 15:16:00 -- 这一句不懂,为什么判断已经包含有登录信息了,还是要显示错误信息的呢 ![]() ![]() |
-- 作者:有点甜 -- 发布时间:2018/4/11 16:31:00 -- 进入logon.htm有两种情况。
1、在浏览器那里输入一个地址,如果没有登录的时候,就跳转到logon,这个时候,直接显示logon.htm的内容;
2、在logon点击登录的时候,同样会进入logon页面。当账号密码不正确的时候,就会执行到你红色的代码;如果账号密码正确,就在前面代码那里跳转到别的页面了。 |
-- 作者:一叶知秋 -- 发布时间:2018/4/17 10:34:00 -- 老师,我想让他这样:即使账号或密码不正确,但是我想点击登录之后,依然能够保留用户名,而不清除它,要怎么弄 \'通用事件头
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" e.WriteFile(fl) Return \'这里必须返回 End Select End If Dim wb As New weui \'身份验证 Dim Verified As Boolean \'用于标记用户是否通过了身份验证 Dim UserName As String = e.Cookies("username") \'从cookie中获取用户名 Dim Password As String = e.Cookies("password") \'从cookie中获取用户密码 If e.Path = "logon.htm" \'如果是通过登录页面访问,从PostValues即可中提取用户名和密码 If e.PostValues.ContainsKey("username") AndAlso e.PostValues.ContainsKey("password") Then UserName = e.PostValues("username") Password = e.PostValues("password") End If End If If UserName = "张三" AndAlso Password = "888" Then \'实际使用的时候,请改为从数据库读取用户名和密码进行比较 Verified = True ElseIf Username = "李四" AndAlso Password="999" Then Verified = True End If If Verified AndAlso e.Path = "logon.htm" Then \'如果用户访问的是登录页,且身份验证成功 wb.AppendCookie("username",UserName) \'将用户名和密码写入cookie wb.AppendCookie("password",Password) wb.InsertHTML("<meta http-equiv=\'Refresh\' c>") \'直接跳转到首页 e.WriteString(wb.Build) \'生成网页 Return \'必须的 ElseIf Verified = False AndAlso e.Path <> "logon.htm" Then \'如果用户身份验证失败,且访问的不是登录页面 wb.InsertHTML("<meta http-equiv=\'Refresh\' c>") \'那么直接跳转到登录页面 e.WriteString(wb.Build) \'生成网页 Return \'必须的 End If \'开始生成网页 Select Case e.path Case "logon.htm" \'登录页面 wb.AddPageTitle("","pageheader","销售系统","由湛江辉迅基于Foxtable开发") If e.PostValues.ContainsKey("username") AndAlso e.PostValues.ContainsKey("password") Then \'判断是否是验证失败后的重新登录 wb.AddTopTips("","toptip1","用户名或密码错误!").msec = 2000 \'如果用户通过登录按钮访问,则给用户一个2秒的提示. End If wb.AddForm("","form1","logon.htm") With wb.AddInputGroup("form1","ipg1") .AddInput("username","户名","text") .AddInput("password","密码","password") End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "登录", "submit") End With Case "exit.htm" \'退出登录 wb.DeleteCookie("username") \'清除cookie中原来的用户名和密码 wb.DeleteCookie("password") wb.InsertHTML("<meta http-equiv=\'Refresh\' c>") \'那么直接跳转到登录页面 Case "", "default.htm" \'首页 wb.AddPageTitle("","pageheader","销售系统","由湛江辉迅基于Foxtable开发") With wb.AddGrid("","g1") .Add("c1","增加订单", "./images/button.png").Attribute = "" .Add("c2","客户管理", "./images/cell.png", "http://www.foxtable.com") .Add("c3","销售统计", "./images/toast.png", "http://www.foxtable.com") .Add("c4","Dialog", "./images/dialog.png", "http://www.foxtable.com") .Add("c5","Progress", "./images/progress.png", "http://www.foxtable.com") .Add("c6","Msg", "./images/msg.png", "http://www.foxtable.com") .Add("c7","Article", "./images/article.png", "http://www.foxtable.com") .Add("c8","ActionSheet", "./images/actionSheet.png", "http://www.foxtable.com") .Add("c9","Icons", "./images/icons.png", "http://www.foxtable.com") .Add("c10","Panel", "./images/panel.png", "http://www.foxtable.com") .Add("c11","Tab", "./images/tab.png", "http://www.foxtable.com") .Add("c12","退出", "./images/exit.png", "exit.htm") \'退出登录 End With End Select e.WriteString(wb.Build) \'生成网页 |
-- 作者:一叶知秋 -- 发布时间:2018/4/17 10:37:00 -- 这一句我也不明白,这个andalso条件明显是不可能同时实现的呀,改成orelse的话会怎样呢, |