Select Case e.path
Case "logon.htm" '登录页面
wb.AddPageTitle("", "pageheader", "售后管理系统", "")
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", "售后管理系统", "")
With wb.AddGrid("", "g1")
.Add("c1", "售后报修", "./images/button.png", "")
.Add("c2", "任务派单", "./images/cell.png", "")
.Add("c3", "维修任务", "./images/toast.png", "list.htm")
.Add("c3", "维修工单", "./images/toast.png", "")
.Add("c3", "人员查询", "./images/toast.png", "")
.Add("c12", "退出", "./images/exit.png", "exit.htm") '退出登录
End With
Case "list.htm"'维修任务清单
Functions.Execute("List", e) '分页显示
Case "edit.htm"'维修工单明细
If e.PostValues.Count > 0 Then
Functions.Execute("Save", e) '保存表单数据
End If
Functions.Execute("Edit", e) '生成订单编辑页面
Case "getSelect1"
Dim filter As String = ""
If e.PostValues.ContainsKey("项目地址_query") Then
filter = "项目地址 like '%" & e.PostValues("项目地址_query") & "%'"
End If
e.WriteString(DataTables("项目明细表").GetComboListString("项目地址", filter))
Case "getSelect2"
Dim filter As String = ""
If e.PostValues.ContainsKey("售后管家_query") Then
filter = "Config like '%" & e.PostValues("售后管家_query") & "%'"
End If
e.WriteString(DataTables("Users").GetComboListString("Name", filter))
Case "wefox"
MessageBox.Show("OK")
If e.Request.HttpMethod = "GET" Then
Dim token = "foxtable" '必须和设置的Token相同
Dim signature As String = e.GetValues("signature")
Dim timestamp As String = e.GetValues("timestamp")
Dim nonce As String = e.GetValues("nonce")
Dim echostr As String = e.GetValues("echostr")
Dim aryTmp() As String = {token, timestamp, nonce}
Array.Sort(aryTmp)
Dim strTmp As String = String.Join("", aryTmp)
strTmp = Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(strTmp, "SHA1")
If signature = strTmp.ToLower() Then
e.WriteString(echostr)
End If
End If
End Select
调试
Case "wefox"
MessageBox.Show(e.Request.HttpMethod)
If e.Request.HttpMethod = "GET" Then
Dim token = "foxtable" '必须和设置的Token相同
Dim signature As String = e.GetValues("signature")
MessageBox.Show("signature =" & signature )
Dim timestamp As String = e.GetValues("timestamp")
Dim nonce As String = e.GetValues("nonce")
Dim echostr As String = e.GetValues("echostr")
MessageBox.Show("echostr =" & echostr )
Dim aryTmp() As String = {token, timestamp, nonce}
Array.Sort(aryTmp)
Dim strTmp As String = String.Join("", aryTmp)
strTmp = Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(strTmp, "SHA1")
MessageBox.Show("strTmp =" & strTmp )
If signature = strTmp.ToLower() Then
e.WriteString(echostr)
End If
End If
Case "wefox"
MessageBox.Show(e.Request.HttpMethod)
MessageBox.Show(e.path)
If e.Request.HttpMethod = "GET" Then
Dim token = "foxtable" '必须和设置的Token相同
Dim signature As String = e.GetValues("signature")
MessageBox.Show("signature =" & signature)
Dim timestamp As String = e.GetValues("timestamp")
Dim nonce As String = e.GetValues("nonce")
Dim echostr As String = e.GetValues("echostr")
MessageBox.Show("echostr =" & echostr)
Dim aryTmp() As String = {token, timestamp, nonce}
Array.Sort(aryTmp)
Dim strTmp As String = String.Join("", aryTmp)
strTmp = Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(strTmp, "SHA1")
MessageBox.Show("strTmp =" & strTmp)
If signature = strTmp.ToLower() Then
e.WriteString(echostr)
End If
End If
还是没反应