哦恭
哦恭
  • 发布:2021-04-06 12:47
  • 更新:2021-04-06 12:47
  • 阅读:957

webview打开第三方网页后登录,控制台返回了header数据,这些数据怎么拿能到

分类:uni-app
<template>  
    <web-view src="http://authserver.ybu.edu.cn/authserver/login?service=http%3A%2F%2Fportal.ybu.edu.cn%2Flogin%3Fservice%3Dhttp%3A%2F%2Fportal.ybu.edu.cn%2Fnew%2Findex.html  
" @message="handleMessage"></web-view>  
    </web-view>  
</template>  

上面这段代码用webview打开第三方网站,在那个网站登录之后在控制台就自动反回了一些header数据,如下

{"header":{"busiObj":"t_ampa_useraction_today"},"body":{"commonAttrs":{"sessionId":"b520daae-e294-2e22-b0e4-31eba5985be6","schoolId":"10184","appId":"amp","version":"1.1","userId":"1111111111","userClientId":"3c541aa7-837f-f339-e1ec-ee6fbf8c22b1","userVistInsId":"b520daae-e294-2e22-b0e4-31eba5985be6","identityId":"2184021640","screenWidth":600,"screenHeight":1000,"colorDepth":24,"cookieEnabled":true,"javaEnabled":false,"platform":"Linux armv8l","language":"zh-CN","browserName":"Chrome WebView","browserVersion":"78.0.3904.108","deviceType":"mobile","devceModel":"KRJ-W09","deviceVendor":"Huawei","osName":"Android","osVersion":"10","refPageUrl":"http%3A%2F%2Fauthserver.ybu.edu.cn%2Fauthserver%2Flogin%3Fservice%3Dhttp%253A%252F%252Fportal.ybu.edu.cn%252Flogin%253Fservice%253Dhttp%253A%252F%252Fportal.ybu.edu.cn%252Fnew%252Findex.html","curPageUrl":"http%3A%2F%2Fportal.ybu.edu.cn%2Fnew%2Findex.html","ip":"219.150.13.13","ip2":"","province":"吉林","city":"**","adcode":"222400","infocode":"电信","desc":"应用管理平台"},"list":[{"time":1617677118747,"type":"track_session_event","name":"track_user_identify","desc":{"schoolId":"10184","userId":"2184021640","userName":"*","userType":"","userDepartment":"工学院","userSex":"男","siteType":"0","identifyId":"2184021640"},"year":2021,"month":4,"date":6,"hour":10,"minute":45,"second":18,"actionTime":0}]}} at http://data.campusphere.cn/pipe-data/useraction/track.min.js:1
最后有一个 at http:// 应该是说这数据是从这来的吧,我也不懂,我就想问问这个header数据怎么能拿到,虽然能在控制台看见但是不知道在代码里怎么能获取这个数据

2021-04-06 12:47 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复