Skip to content

Commit b9bf533

Browse files
committed
更新[中国联通]签到脚本: 解决部分场景能取cookie不能签到问题
1 parent 90ac0ef commit b9bf533

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎10010/10010.js‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ function sign() {
2222
function gettel() {
2323
const reqheaders = JSON.parse(signheaderVal)
2424
const reqreferer = reqheaders.Referer
25-
return reqreferer.match(/desmobile=(.*?)(&|$)/)[1]
25+
const reqCookie = reqheaders.Cookie
26+
if (reqreferer.indexOf(`desmobile=`) >= 0) return reqreferer.match(/desmobile=(.*?)(&|$)/)[1]
27+
else if (reqCookie.indexOf(`u_account=`) >= 0) return reqCookie.match(/u_account=(.*?);/)[1]
28+
else {
29+
chavy.log(`${cookieName}, gettel - reqheaders: ${reqheaders}`)
30+
return ''
31+
}
2632
}
2733

2834
function loginapp(cb) {

0 commit comments

Comments
 (0)