one($id);
$status = Dever::db('agent/user_bind')->config['status'];
$audit_date='';
if (isset($info['aduit_date']) && $info['aduit_date']) {
$audit_date = date('Y-m-d H:i', $info['audit_date']);
} else {
$audit_date = date('Y-m-d H:i',$info['cdate']);
}
if ($info['admin'] && $info['admin'] > 0) {
$admin_name = Dever::load("manage/admin-find#username", $info['admin']);
} else {
$admin_name = '';
}
/*
$idcard_pic = '';
if ($info['idcard_back']) {
$idcard_pic .= ' ';
}
$result['小程序账号'] = array
(
'type' => 'info',
'content' => array
(
array
(
array('手机号', $info['mobile']),
array('姓名', $info['name']),
array('身份证号', $info['idcard']),
),
array
(
array('身份证照片', $idcard_pic),
),
),
);
*/
$user = Dever::db('passport/user')->find($info['uid']);
$result['审核信息'] = array
(
'type' => 'user',
'content' => array
(
array('状态', $status[$info['status']]),
array('时间', $audit_date),
array('审核人',$admin_name),
array('审核备注', $info['audit_desc']),
),
);
$result['小程序账号'] = array
(
'type' => 'user',
'content' => array
(
//array('手机号', $user['mobile']),
array('昵称', $user['username']),
array('身份证号', $info['idcard']),
),
);
$member = Dever::db('agent/member')->find($info['mid']);
if ($member) {
$where['id'] = $member['id'];
$where['idcard'] = $member['idcard'];
$where['status'] = '1,2';
//$other = Dever::db('agent/member')->getData($where);
$other = false;
$idcard_pic = '';
if ($member['idcard_back']) {
$idcard_pic .= ' ';
}
$role = Dever::db('setting/role')->find($member['role']);
$result['代理商账号:' . $member['name']] = array
(
'type' => 'user',
'content' => array
(
array('姓名', $member['name']),
array('手机号', $member['mobile']),
array('角色', $role['name']),
array('身份证号', $member['idcard']),
array('身份证照片', $idcard_pic),
),
);
if ($other) {
foreach ($other as $k => $v) {
$role = Dever::db('setting/role')->find($v['role']);
$idcard_pic = '';
if ($v['idcard_back']) {
$idcard_pic .= ' ';
}
$result['代理商账号:' . $v['name']] = array
(
'type' => 'user',
'content' => array
(
array('姓名', $v['name']),
array('手机号', $v['mobile']),
array('角色', $role['name']),
array('身份证号', $v['idcard']),
array('身份证照片', $idcard_pic),
),
);
}
}
}
$head_btn = array();
//Dever::url('lib/user.setStatus?id=' . $info['id'] . '&value=2', 'agent'),
//Dever::url('lib/user.setStatus?id=' . $info['id'] . '&value=3', 'agent'),
/*
$head_btn[] = array
(
'type' => 'link',
'link' => Dever::url('project/database/list?project=agent&table=user_bind&page_type=2', 'manage'),
'name' => '返回上一页',
);*/
if ($info['status'] == 1) {
$head_btn[] = array
(
'type' => 'edit',
'link' => Dever::url('project/database/update?project=agent&table=user_bind&where_id='.$id.'&col=audit,audit_desc', 'manage'),
'name' => '审核',
);
}
$head = array
(
'name' => '账号绑定',
'btn' => $head_btn,
);
$html = Dever::show($head, $result, false, false, 'dls-user-box');
return $html;
}
public function setStatus_api()
{
$where['where_id'] = Dever::input('id');
$where['status'] = Dever::input('value');
Dever::db('agent/user_bind')->update($where);
return 'reload';
}
}