Webqq/Model/Remote/_qiandao.pm

filter: Statementstmt 9.0% 1 / 11 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 5.0% 1 / 20 CC 5 SCAR 34.0
CC
5
Cov
5%
_qiandao
30.0
CRAP 30.0
« Webqq/Message/Remote/_get_sess_sig.pm ↑ Summary Webqq/Model/Ext.pm »
1 0 ▶sub Mojo::Webqq::Model::_qiandao {
Subroutine _qiandao: not called CC=5 SCAR=34.0
2 0 my($self,$uid) = @_;
3 0 ▶ if(not defined $uid){
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $uid) 0 0 0
4 0 $self->warn("无效的群组号码");
5 0 return;
6 }
7 0 my $api = 'http://qiandao.qun.qq.com/cgi-bin/sign';
8 0 my $json = $self->http_post(
9 $api,
10 {json=>1,Referer=>"http://qiandao.qun.qq.com/index.html?groupUin=$uid&appID=100729587"},
11 form=>{
12 gc=>$uid,
13 is_sign=>0,
14 bkn=>$self->get_csrf_token,
15 }
16 );
17 0 ▶ return if not defined $json;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $json 0 0 0
18 #{"conti_count":1,"ec":0,"is_new":0,"is_sign":1,"now":1464858442,"rank":2,"sign_time":1464858442,"today_count":2,"total_count":1}
19 0 ▶ return if $json->{ec} != 0;
Branch: 1 branch
BranchTrueFalseTotal
if $json->{"ec"} != 0 0 0 0
20 0 ▶ return if $json->{is_sign} != 1;
Branch: 1 branch
BranchTrueFalseTotal
if $json->{"is_sign"} != 1 0 0 0
21 0 return 1;
22 }
23 1 1;
« Webqq/Message/Remote/_get_sess_sig.pm ↑ Summary Webqq/Model/Ext.pm »