Foxtable(狐表)用户栏目专家坐堂 → 请教老师在调试时的界面很好看,但通过IIS服务域名访问出来后页会改变是何原因?


  共有2060人关注过本帖树形打印复制链接

主题:请教老师在调试时的界面很好看,但通过IIS服务域名访问出来后页会改变是何原因?

帅哥哟,离线,有人找我吗?
cxzhl
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:婴狐 帖子:34 积分:437 威望:0 精华:0 注册:2020/3/23 23:20:00
请教老师在调试时的界面很好看,但通过IIS服务域名访问出来后页会改变是何原因?  发帖心情 Post By:2020/7/17 11:54:00 [只看该作者]

请教老师在调试时的界面很好看,但通过IIS服务域名访问出来后页会改变是何原因?
图片点击可在新窗口打开查看
这是调试时的界面。127.0.0.1

图片点击可在新窗口打开查看
这是通过域名访问的界面


 回到顶部
帅哥哟,离线,有人找我吗?
cxzhl
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:婴狐 帖子:34 积分:437 威望:0 精华:0 注册:2020/3/23 23:20:00
  发帖心情 Post By:2020/7/17 11:56:00 [只看该作者]

Select Case e.Path
    Case "yhrz.htm"
        Functions.Execute("yhrz",e)
End Select
Select Case e.Path
    Case "clgl.htm"
        Functions.Execute("clgl",e)
End Select

Select Case e.Path
    Case "yhzc.htm"
        Functions.Execute("yhzc",e)
End Select
Select Case e.Path
    Case "yhrz.htm"
        Functions.Execute("yhrz",e)
End Select
Select Case e.Path
Case "list.htm"
    Functions.Execute("List",e)
End Select
Select Case e.Path
Case "addnew.htm"
    Functions.Execute("AddNew",e)
End Select
Select Case e.Path
Case "edit.htm"
    Functions.Execute("Edit",e)
End Select
Select Case e.Path
Case "delete.htm"
    Functions.Execute("Delete",e)
End Select   
    
    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
    Dim mmm As DataRow = DataTables("用户").find("手机号='" & UserName & "'")
    If mmm IsNot Nothing AndAlso mmm("密码") = Password  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","众和出行","每公里1.5元日封顶150元")
            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",False)
                .Add("btn1", "登录", "submit")
                .Add("btn2", "新用户注册", "button","yhzc.htm").kind = 1 '单击这个按钮可以打开注册页
            End With
            With wb.AddPageFooter("","pf1","版权:属迈福铃汽车服务有限公司")
                .AddLink("技术支持楚雄海子科技:","http://www.99cgt.cn")
            End With
        Case "exit.htm" '退出登录
            wb.DeleteCookie("username") '清除cookie中原来的用户名和密码
            wb.DeleteCookie("password")
            wb.InsertHTML("<meta http-equiv='Refresh' c>") '那么直接跳转到登录页面
            
        Case "", "default.htm" '首页
            wb.AddPageTitle("form2","pageheader1","众和出行","每公里1.5元日封顶150元")
            wb.AddForm("","form2","default.htm")
            
            wb.AppendHTML("<script src='./html/txdt.html'></script>",True)
            
            With wb.AddButtonGroup("form2","btngrp1")
                .Add("btn3", "驾照认证", "button","yhrz.htm")
                .Add("btn4", "网点查询", "button","list.htm")
                .Add("btn5", "车辆管理", "button","clgl.htm")
                .Add("btn6", "使用指南", "button","help.htm")
            End With
    End Select
    e.WriteString(wb.Build) '生成网页

以上是登录页的代码


 回到顶部
帅哥,在线噢!
有点蓝
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106672 积分:542549 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/7/17 12:22:00 [只看该作者]

使用foxtable开发的网页和IIS一点关系都没有,完全不需要IIS。

HttpServer.WebPath指定到weui框架所在的目录即可http://www.foxtable.com/mobilehelp/topics/0276.htm
HttpServer.WebPath = "d:\web"

 回到顶部