Foxtable(狐表)用户栏目专家坐堂 → [求助]苹果手机没问题,安卓手机获取不到Cookies


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

主题:[求助]苹果手机没问题,安卓手机获取不到Cookies

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


加好友 发短信
等级:六尾狐 帖子:1325 积分:9586 威望:0 精华:1 注册:2010/7/21 14:20:00
[求助]苹果手机没问题,安卓手机获取不到Cookies  发帖心情 Post By:2019/1/3 9:53:00 [显示全部帖子]

苹果手机没问题,安卓手机获取不到e.Cookies("paperid"),真奇怪

Dim e As RequestEventArgs = Args(0)

'身份验证,公众号
Dim Openid As String '微信用户Openid
'Dim sb As New StringBuilder
Dim wb As New weui
Dim dt As DataTable
Dim entid As String
Dim pdcode As String
Dim entname As String
Dim paperid As String=e.Cookies("paperid")
'Dim sb As New StringBuilder

If  e.GetValues.ContainsKey("paperid") Then
    paperid=e.GetValues("paperid")
    wb.Appendcookie("paperid",paperid)
End If

If e.host="127.0.0.1" Then
    Openid ="otmQFs6MaQBpfCrkihqi_XMw4V4s"
Else
    
    If e.Cookies.ContainsKey("pxopenid") Then '从cookie中获取微信用户id
        Openid = e.Cookies("pxopenid")
    Else
        
        Dim ul2 As String
        If redirectUl="true" Then
            ul2 ="http://eso.deqsafety.gov.cn/get-weixin-code.html?appid={0}&scope=snsapi_base&state="+ e.path +"&redirect_uri="+ UrlEncode("http://" & e.host & "/MpRedirect.htm/" )
        Else
            ul2 ="https://open.weixin.qq.com/connect/oauth2/authorize?appid={0}&redirect_uri="+ UrlEncode("http://" & e.host & "/MpRedirect.htm/" )+ "&response_type=code&scope=snsapi_base&state="+ e.path +"#wechat_redirect"
        End If
        ul2=CExp(ul2,mpCorpID)
        wb.InsertHTML("<meta http-equiv='Refresh' c>") '跳转到授权链接
        e.WriteString(wb.Build)
        e.Handled = True
        Return ""
    End If
End If

If openid ="" Then
    With wb.AddMsgPage("","msgpage","错误","无效登录")
        .icon = "Warn" '改变图标
    End With
    e.WriteString(wb.Build)
    e.Handled = True
    Return ""
Else
    wb.Appendcookie("pxopenid",openid )
    'paperid =e.Cookies("paperid")
End If


If paperid=""  Then
    
    With wb.AddMsgPage("","msgpage","错误","参数错误")
        .icon = "Warn" '改变图标
    End With
    e.WriteString(wb.Build)
    e.Handled = True
    Return ""
End If

 回到顶部