line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Weixin::Client; |
2
|
|
|
|
|
|
|
sub _get_qrcode_uuid{ |
3
|
0
|
|
|
0
|
|
|
my $self = shift; |
4
|
0
|
|
|
|
|
|
my $api = 'https://login.weixin.qq.com/jslogin'; |
5
|
0
|
|
|
|
|
|
my @query_string = ( |
6
|
|
|
|
|
|
|
appid => 'wx782c26e4c19acffb', |
7
|
|
|
|
|
|
|
redirect_uri => 'https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage', |
8
|
|
|
|
|
|
|
fun => 'new', |
9
|
|
|
|
|
|
|
lang => 'zh_CN', |
10
|
|
|
|
|
|
|
_ => $self->now(), |
11
|
|
|
|
|
|
|
); |
12
|
0
|
|
|
|
|
|
my $r = $self->http_get(Weixin::Util::gen_url2($api,@query_string)); |
13
|
0
|
0
|
|
|
|
|
return undef unless defined $r; |
14
|
0
|
|
|
|
|
|
$r=~s/\s+//g; |
15
|
0
|
|
|
|
|
|
my($code,$uuid) = $r=~/window\.QRLogin\.code=(\d+);window\.QRLogin\.uuid="([^"]+)"/g; |
16
|
0
|
0
|
0
|
|
|
|
return ($code==200 and $uuid)?$uuid:undef; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
1; |