Merge remote-tracking branch 'origin/dev' into dev

master
liuweiwen 5 years ago
commit fdacdd3323

@ -1190,15 +1190,15 @@ function age_verify($cardno, $name)
{ {
$date = age($cardno, $name); $date = age($cardno, $name);
if ($date['resp']['code'] == 0 && $date > 0) { if ($date['status'] == "01") {
$age = floor((time() - strtotime($date['data']['birthday'])) / (60 * 60 * 24 * 365)); $age = floor((time() - strtotime($date['data']['birthday'])) / (60 * 60 * 24 * 365));
if ($age > 17) { if ($age > 17) {
return 1; return 1;
} else { } else {
return 2; return 2;
} }
} elseif ($date['resp']['code'] != 0 && $date > 0) { } elseif ($date['status'] > 200) {
return 0; return -2;
} else { } else {
return $date; return $date;
} }
@ -1211,6 +1211,7 @@ function age($cardno, $name)
$path = "/idCardCert"; $path = "/idCardCert";
$method = "GET"; $method = "GET";
$appcode = C('tool_age.appcode'); $appcode = C('tool_age.appcode');
// $appcode = "244181f0846541a19e24df409736d3b9";
$headers = array(); $headers = array();
array_push($headers, "Authorization:APPCODE " . $appcode); array_push($headers, "Authorization:APPCODE " . $appcode);
$querys = "idCard=" . $cardno . "&name=" . $name; $querys = "idCard=" . $cardno . "&name=" . $name;
@ -1231,15 +1232,22 @@ function age($cardno, $name)
if (empty($output)) { if (empty($output)) {
return -1;//用完 return -1;//用完
} }
if (curl_getinfo($curl, CURLINFO_HTTP_CODE) == '200') {
$headersize = curl_getinfo($curl, CURLINFO_HEADER_SIZE); $r = json_decode($output, true);
$header = substr($output, 0, $headersize); if ($r['status'] == "02") return 0;
$body = substr($output, $headersize); return $r;
curl_close($curl); // if (empty($output)) {
return json_decode($body, true); // return -1;//用完
} else { // }
return -2;//失败 // if (curl_getinfo($curl, CURLINFO_HTTP_CODE) == '200') {
} // $headersize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
// $header = substr($output, 0, $headersize);
// $body = substr($output, $headersize);
// curl_close($curl);
// return json_decode($body, true);
// } else {
// return -2;//失败
// }
} }
/*短信发送验证限制条件 */ /*短信发送验证限制条件 */

@ -1240,8 +1240,8 @@ class DownloadController extends BaseController {
$costBegin = I('cost_begin', ''); //充值总额范围 $costBegin = I('cost_begin', ''); //充值总额范围
$costEnd = I('cost_end', ''); $costEnd = I('cost_end', '');
$nowTime = date('Y-m-d'); $nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime))); $initBegTime = date('Y-m-d', strtotime('-7 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime'); $initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
$initEndTime = $nowTime; $initEndTime = $nowTime;
$initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime'); $initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
$begTime = strtotime($initBegTime); $begTime = strtotime($initBegTime);
@ -2908,7 +2908,7 @@ class DownloadController extends BaseController {
$map['_string'] = 'ui.role_id in (' . $subQuery . ')'; $map['_string'] = 'ui.role_id in (' . $subQuery . ')';
} }
$secondDay = 24*3600 + 1; $secondDay = 24*3600 + 1;
$map['uc.create_time'] = ['between', [$map['begintime']-24*3600, $map['endtime'] - $secondDay]]; $map['uc.create_time'] = ['between', [$map['begintime'], $map['endtime'] - $secondDay]];
unset($map['begintime']); unset($map['begintime']);
unset($map['endtime']); unset($map['endtime']);
//$spendMap['_string'] = 'uc.game_id = tab_user_play_info.game_id and uc.server_id = tab_user_play_info.server_id and uc.role_id = tab_user_play_info.role_id'; //$spendMap['_string'] = 'uc.game_id = tab_user_play_info.game_id and uc.server_id = tab_user_play_info.server_id and uc.role_id = tab_user_play_info.role_id';

@ -1844,8 +1844,15 @@ class QueryController extends BaseController
list($records, $pagination, $count) = $this->paginate($query); list($records, $pagination, $count) = $this->paginate($query);
foreach ($records as &$list) { foreach ($records as &$list) {
$list['user_account'] = encryption($list['user_account']); $list['user_account'] = empty($list['user_account']) ? '--' : encryption($list['user_account']);
$list['unlogin_day'] = intval((strtotime(date('Y-m-d 00:00:00')) - strtotime(date('Y-m-d 00:00:00', $list['play_time']))) / (24 * 3600)); $list['game_name'] = empty($list['game_name']) ? '--' : $list['game_name'];
$list['sdk_version'] = empty($list['sdk_version']) ? '--' : getSDKTypeName($list['sdk_version']);
$list['server_name'] = empty($list['server_name']) ? '--' : $list['server_name'];
$list['role_name'] = empty($list['role_name']) ? '--' : $list['role_name'];
$list['role_level'] = empty($list['role_level']) ? '--' : $list['role_level'];
$list['unlogin_day'] = empty($list['unlogin_day']) ? '--' : intval((strtotime(date('Y-m-d 00:00:00')) - strtotime(date('Y-m-d 00:00:00', $list['play_time']))) / (24 * 3600));
$list['play_time'] = empty($list['play_time']) ? '--' : date('Y-m-d H:i:s', $list['play_time']);
$list['promote_account'] = empty($list['promote_account']) ? '--' : $list['promote_account'];
} }
} }

@ -155,7 +155,7 @@
<tr data-id="{$vo.id}" class="<eq name='mod' value='1'>odd</eq>"> <tr data-id="{$vo.id}" class="<eq name='mod' value='1'>odd</eq>">
<td>{$record.user_account}</td> <td>{$record.user_account}</td>
<td>{$record.game_name}</td> <td>{$record.game_name}</td>
<td>{:getSDKTypeName($record['sdk_version'])}</td> <td>{$record.sdk_version}</td>
<td>{$record.server_name}</td> <td>{$record.server_name}</td>
<td>{$record.role_name}</td> <td>{$record.role_name}</td>
<td>{$record.role_level}</td> <td>{$record.role_level}</td>
@ -163,7 +163,7 @@
<td>{$record.recharge_count}</td> <td>{$record.recharge_count}</td>
<td>{$record.recharge_cost_today}</td> <td>{$record.recharge_cost_today}</td>
<td>{$record.unlogin_day}</td> <td>{$record.unlogin_day}</td>
<td>{$record.play_time|date='Y-m-d H:i:s',###}</td> <td>{$record.play_time}</td>
<td>{$record.promote_account}</td> <td>{$record.promote_account}</td>
</tr> </tr>
</volist> </volist>

@ -1033,13 +1033,12 @@ class UserController extends BaseController
} }
if ($re == 1) { if ($re == 1) {
$resdata['age_status'] = 2;//成年 $resdata = 2;//成年
} }
if ($re == 2) { if ($re == 2) {
$resdata['age_status'] = 3;//未成年 $resdata = 3;//未成年
} }
} }
// if ($re > 0) { // if ($re > 0) {
$model = D('User')->where($map)->save(array('real_name' => $_REQUEST['real_name'], 'idcard' => $_REQUEST['idcard'], 'age_status' => $resdata)); $model = D('User')->where($map)->save(array('real_name' => $_REQUEST['real_name'], 'idcard' => $_REQUEST['idcard'], 'age_status' => $resdata));
// } // }

Loading…
Cancel
Save