作者 郭鑫

修改上传

... ... @@ -56,7 +56,7 @@ class CommonController extends HomeBaseController
}
}
}else{
$this->apiResponse('0','暂未注册');
$this->apiResponse('-1','暂未注册');
}
}
... ... @@ -142,4 +142,22 @@ class CommonController extends HomeBaseController
return $return;
}
// 费用单位处理
public function getStr($numb){
$split = str_split($numb);
$count = count($split);
$middle_str = '';
if($count > 5){
foreach ($split as $spk=>$spv){
if($spk < ($count-4)){
$middle_str .= $spv;
}
}
$resStr = $middle_str.'-万元';
}else{
$resStr = $numb.'-元';
}
return $resStr;
}
}
... ...
... ... @@ -178,6 +178,7 @@ class IntermediaryController extends CommonController
->limit(10)->page($page)
->select()->toArray();
if($need_list){
$else_arr = [];
foreach ($need_list as $neek=>$neev){
$where_agency['need_id'] = $neev['id'];
$where_agency['agency_id'] = $member['id'];
... ... @@ -522,15 +523,19 @@ class IntermediaryController extends CommonController
* @method POST
* @method POST
* @param name:token type:int require:1 default: other: desc:token
* @return data:'type.1增加,2减少,3提现'
*/
public function orderDetail(Request $request){
$data = $request->param();
$user = $this->left($data['token']);
$where_umoney['user_id'] = $user['id'];
$where_umoney['status'] = 1;
$order_list = Db::name('AmoenyDetail')->where($where_umoney)->select()->toArray();
$where_umoney['status'] = array('neq',9);
$order_list = Db::name('MoneyDetail')->where($where_umoney)->select()->toArray();
$final['user'] = $user;
if($order_list){
foreach ($order_list as $ordk=>$ordv){
$order_list[$ordk]['update_time'] = date('Y-m-d H:i:s',$ordv['update_time']);
}
$final['detail'] = $order_list;
}else{
$final['detail'] = array();
... ...
... ... @@ -176,10 +176,10 @@ class OrderController extends CommonController
if($data['_type'] == 2) {
$return = $this->wxpay(['order_sn'=>$data['order_sn']],$sort);
$qrcode_url = url('portal/Index/qrcode',['data'=>urlencode($return['code_url'])],true,true);
$this->apiResponse(1,'微信支付','<img src="'.$qrcode_url.'" alt=""/>');
$this->apiResponse(1,'微信支付',['type'=>1,'url'=>$qrcode_url]);
} elseif($data['_type'] == 3) {
$alipay_url = url('portal/Alipay/alipay',array('order_sn'=>$data['order_sn'],'name'=>$sort,'price'=>0.01),true,true);
$this->apiResponse(1,'支付宝支付',$alipay_url);
$this->apiResponse(1,'支付宝支付',['type'=>3,'url'=>$alipay_url]);
}
} else {
$this->apiResponse(0,'该订单已失效');
... ...
... ... @@ -974,14 +974,22 @@ class UserController extends CommonController
}
$where_need['id'] = $data['need_id'];
$where_need['user_id'] = $member['id'];
$where_need['status'] = 5;
$userNeed = Db::name('UserNeed')->where($where_need)->field("id as need_id,city,quarters,room,pay_money,create_time,choose_time,status")->find();
$where_need['status'] = array('in','5,7');
$userNeed = Db::name('UserNeed')->where($where_need)->field("id as need_id,city,quarters,room,pay_money,pay_time,choose_time,status")->find();
$final['need'] = $userNeed;
$final['user'] = $member;
if($userNeed){
// 已选择中介
if($userNeed['status'] == 7){
$where_agency['a.need_id'] = $data['need_id'];
$where_agency['a.status'] = 5;
}else{
// 待选择中介
$where_agency['a.need_id'] = $data['need_id'];
$where_agency['a.status'] = 4;
}
// 查询报价
$where_agency['a.need_id'] = $data['need_id'];
$where_agency['a.status'] = 4;
$agency = Db::name('Agency')->alias('a')
->where($where_agency)
->join("hp_Member m", 'm.id = a.agency_id')
... ... @@ -989,6 +997,15 @@ class UserController extends CommonController
m.id as user_id,m.name,m.company,m.store,m.tel,m.reputation,m.start')
->select()->toArray();
if($agency){
foreach ($agency as $agek=>$agev){
$agency[$agek]['service_charge'] = $this->getStr($agev['service_charge']);
$agency[$agek]['assessment_tax'] = $this->getStr($agev['assessment_tax']);
$agency[$agek]['security_tax'] = $this->getStr($agev['security_tax']);
$agency[$agek]['value_added_tax'] = $this->getStr($agev['value_added_tax']);
$agency[$agek]['deed_tax'] = $this->getStr($agev['deed_tax']);
$agency[$agek]['personal_income_tax'] = $this->getStr($agev['personal_income_tax']);
$agency[$agek]['else_tax'] = $this->getStr($agev['else_tax']);
}
$final['agency'] = $agency;
$this->apiResponse('1','成功',$final);
}else{
... ... @@ -1043,13 +1060,25 @@ class UserController extends CommonController
* @param name:token type:int require:1 default: other: desc:token
* @param name:need_id type:int require:1 default: other: desc:需求id
* @param name:intermediary_id type:int require:1 default: other: desc:中介报价id
* @return data:''@
* @return data:''
*/
public function sureAgency(Request $request){
$data = $request->param();
if(!$data['need_id'] || !$data['intermediary_id'] ){
$this->apiResponse('0','参数错误');
}
$where_need['id'] = $data['need_id'];
$where_need['status'] = 5;
$user_need = Db::name('UserNeed')->where($where_need)->find();
if(!$user_need){
$this->apiResponse('0','状态错误');
}
$need_update['status'] = 7;
$need_update['choose_time'] = time();
$need_res = Db::name('UserNeed')->where($where_need)->update($need_update);
if(!$need_res){
$this->apiResponse('0','成交失败');
}
$where_bid['need_id'] = $data['need_id'];
$where_bid['id'] = $data['intermediary_id'];
$where_bid['status'] = 4;
... ... @@ -1146,7 +1175,7 @@ class UserController extends CommonController
$change_status['status'] = 11;
$change_com = Db::name('UserNeed')->where($where_need)->update($change_status);
if($change_com){
$this->apiResponse('1','评价成功');
$this->apiResponse('1','评价成功',$add_result);
}else{
$this->apiResponse('0','评价失败');
}
... ... @@ -1168,75 +1197,40 @@ class UserController extends CommonController
* @url /api/portal/User/changeUserComment
* @method POST
* @param name:token type:int require:1 default: other: desc:token
* @param name:comment_id type:int require:1 default: other: desc:评论id
* @param name:need_id type:int require:1 default: other: desc:需求id
* @param name:content type:int require:1 default: other: desc:评论内容
*/
public function changeUserComment(Request $request){
$data = $request->param();
if(empty($data['comment_id'])){
$this->apiResponse('0','评论id不能为空');
if(empty($data['need_id'])){
$this->apiResponse('0','需求id不能为空');
}
$where_member['token'] = $data['token'];
$member_id = Db::name('Member')->where($where_member)->field('id')->find();
if(empty($data['content'])){
$where_change['id'] = $data['comment_id'];
$where_change['need_id'] = $data['need_id'];
$where_change['user_id'] = $member_id['id'];
$where_change['status'] = 1;
$where_change['is_comment'] = 0;
$find_comment = Db::name('Comment')->where($where_change)->find();
if($find_comment){
$this->apiResponse('1','成功',$find_comment);
$this->apiResponse('1','成功',$find_comment['id']);
}else{
$this->apiResponse('0','该评价不可修改');
}
}else{
$where_update['id'] = $data['comment_id'];
$where_update['need_id'] = $data['need_id'];
$where_update['user_id'] = $member_id['id'];
$where_update['is_comment'] = 0;
$where_update['status'] = 1;
$update['content'] = $data['content'];
$update['is_comment'] = 1;
$update_result = Db::name('Comment')->where($where_update)->update($update);
if($update_result){
$this->apiResponse('1','修改成功');
$this->apiResponse('1','修改成功',$data['need_id']);
}else{
$this->apiResponse('0','修改失败');
}
}
if(empty($data['content'])){
$this->apiResponse('0','评论内容不能为空');
}
$where_need['status'] = 10;
$where_need['id'] = $data['need_id'];
$need = Db::name('UserNeed')->where($where_need)->find();
if($need){
$where_agency['status'] = 11;
$where_agency['need_id'] = $need['id'];
$agency = Db::name('Agency')->where($where_agency)->find();
if($agency){
$add['need_id'] = $need['id'];
$add['agency_id'] = $agency['id'];
$add['intermediary_id'] = $agency['agency_id'];
$add['user_id'] = $need['user_id'];
$add['content'] = $data['content'];
$add['create_time'] = time();
$add['update_time'] = time();
$add_result = Db::name('Comment')->insertGetId($add);
if($add_result){
$change_status['status'] = 11;
$change_com = Db::name('UserNeed')->where($where_need)->update($change_status);
if($change_com){
$this->apiResponse('1','评价成功');
}else{
$this->apiResponse('0','评价失败');
}
}else{
$this->apiResponse('0','评价失败');
}
}else{
$this->apiResponse('0','评价失败');
}
}else{
$this->apiResponse('0','评价失败');
}
}
... ... @@ -1322,7 +1316,10 @@ class UserController extends CommonController
Db::startTrans();
$data = $request->param();
$where_member['token'] = $data['token'];
$member = Db::name('Member')->where($where_member)->field('id,money')->find();
$member = Db::name('Member')->where($where_member)->field('id,money,type')->find();
if($member['money'] <= 0){
$this->apiResponse('0','用户余额不足');
}
if($member){
$final['user'] = $member;
}else{
... ... @@ -1338,13 +1335,21 @@ class UserController extends CommonController
$final['card'] = $card;
}
$where_umoney['user_id'] = $member['id'];
$where_umoney['card_id'] = $card['id'];
$where_umoney['title'] = '用户提现';
$where_umoney['user_type'] = $member['type'];
// if($member['type'] == 1){
// $where_umoney['title'] = '用户提现';
// }else{
// $where_umoney['title'] = '中介提现';
// }
$where_umoney['title'] = '余额提现';
$where_umoney['money'] = $member['money'];
$where_umoney['order_type'] = 6;
$where_umoney['type'] = 3;
$where_umoney['pay_type'] = 3;
$where_umoney['status'] = 5;
$where_umoney['create_time'] = time();
$where_umoney['update_time'] = time();
$add = Db::name('UmoenyDetail')->insertGetId($where_umoney);
$add = Db::name('MoneyDetail')->insertGetId($where_umoney);
if($add){
$del = Db::name('Member')->where($where_member)->setDec('money',$member['money']);
$inc = Db::name('Member')->where($where_member)->setInc('get_money',$member['money']);
... ... @@ -1368,15 +1373,19 @@ class UserController extends CommonController
* @url /api/portal/User/orderDetail
* @method POST
* @param name:token type:int require:1 default: other: desc:token
* @return data:'type.1增加,2减少,3提现'
*/
public function orderDetail(Request $request){
$data = $request->param();
$user = $this->myleft($data['token']);
$where_umoney['user_id'] = $user['id'];
$where_umoney['status'] = 1;
$order_list = Db::name('UmoenyDetail')->where($where_umoney)->select()->toArray();
$where_umoney['status'] = array('neq',9);
$order_list = Db::name('MoneyDetail')->where($where_umoney)->field('id,title,money,update_time,type')->select()->toArray();
$final['user'] = $user;
if($order_list){
foreach ($order_list as $ordk=>$ordv){
$order_list[$ordk]['update_time'] = date('Y-m-d H:i:s',$ordv['update_time']);
}
$final['detail'] = $order_list;
}else{
$final['detail'] = array();
... ...
... ... @@ -252,6 +252,9 @@ class UserneedController extends CommonController
unset($data['connect']);
unset($data['token']);
$data['id'] = $data['need_id'];
if($need['status'] == 2){
unset($data['pay_money']);
}
$save = $model->isUpdate(true)->allowField(true)->save($data);
}
if($save){
... ...
... ... @@ -77,7 +77,7 @@ class AdminOauthController extends AdminBaseController
$this->assign('tel', $data['tel']);
}
}
$lists = Db::name('Member')->where($where_member)->select()->toArray();
$lists = Db::name('Member')->where($where_member)->order('status')->select()->toArray();
foreach ($lists as $lk=>$lv){
$where_referee['id'] = $lv['referee_id'];
$referee = Db::name('Member')->where($where_referee)->field('id,name')->find();
... ... @@ -236,6 +236,99 @@ class AdminOauthController extends AdminBaseController
}
}
// 查询订单
public function findOrder(){
$data = $this->request->param();
$where_order['id'] = $data['order_id'];
$order = Db::name('Order')->where($where_order)->find();
if(!$order) {
$this->error('订单错误');
}
$this->assign('list',$order);
return $this->fetch('order');
}
// 邀请人
public function referee(){
$data = $this->request->param();
if($data){
$startTime = empty($data['start_time']) ? 0 : strtotime($data['start_time']);
$endTime = empty($data['end_time']) ? 0 : strtotime($data['end_time']);
if ($startTime && $endTime) {
$where_referee['create_time'] = array('between',"$startTime,$endTime");
$this->assign('start_time', $data['start_time']);
$this->assign('end_time', $data['end_time']);
}else{
if($startTime){
$where_referee['create_time'] = array('egt',$startTime);
$this->assign('start_time', $data['start_time']);
}
if($endTime){
$where_referee['create_time'] = array('elt',$endTime);
$this->assign('end_time', $data['end_time']);
}
}
if(!empty($data['name'])){
$where_referee['name'] = array('like','%'.$data['name'].'%');
$this->assign('name', $data['name']);
}
if(!empty($data['tel'])){
$where_referee['tel'] = array('like','%'.$data['tel'].'%');
$this->assign('tel', $data['tel']);
}
}
$where_member['id'] = $data['id'];
$member = Db::name('Member')->where($where_member)->field('id,name,tel')->find();
$this->assign('user',$member);
$this->assign('uid',$member['id']);
$where_referee['referee_id'] = $data['id'];
$member = Db::name('Member')->where($where_referee)->select()->toArray();
$this->assign('lists',$member);
return $this->fetch();
}
// 提现申请
public function getMoneyDetail(){
$data = $this->request->param();
if($data){
$startTime = empty($data['start_time']) ? 0 : strtotime($data['start_time']);
$endTime = empty($data['end_time']) ? 0 : strtotime($data['end_time']);
if ($startTime && $endTime) {
$where_money['create_time'] = array('between',"$startTime,$endTime");
$this->assign('start_time', $data['start_time']);
$this->assign('end_time', $data['end_time']);
}else{
if($startTime){
$where_money['create_time'] = array('egt',$startTime);
$this->assign('start_time', $data['start_time']);
}
if($endTime){
$where_money['create_time'] = array('elt',$endTime);
$this->assign('end_time', $data['end_time']);
}
}
}
$where_money['user_id'] = $data['id'];
$where_money['order_type'] = 6;
$where_money['type'] = 3;
$where_money['status'] = array('neq',9);
$money_list = Db::name('MoneyDetail')->where($where_money)->select();
$this->assign('uid',$data['id']);
$this->assign('lists',$money_list);
return $this->fetch('getdetail');
}
// 同意提现
public function agree(){
}
// 提现
public function getmoney(){
$data = $this->request->param();
... ... @@ -256,7 +349,7 @@ class AdminOauthController extends AdminBaseController
// 中介
public function intermediary()
{
// 中介
... ... @@ -328,7 +421,7 @@ class AdminOauthController extends AdminBaseController
Db::name("third_party_user")->where("id", $id)->delete();
$this->success("删除成功!", "admin_oauth/index");
}
// 黑名单
// 加入黑名单
public function del(Request $request)
{
$where_member['id'] = $request->param('id');
... ... @@ -347,7 +440,7 @@ class AdminOauthController extends AdminBaseController
}
// 黑名单
// 黑名单列表
public function black(Request $request)
{
$where_member['status'] = 8;
... ...
<include file="public@header"/>
<link rel="stylesheet" href="__STATIC__/install/css/mdialog.css">
<style>
.popup{
width: 250px;
height: 100px;
background-color: rgba(0,0,0,0.5);
position: fixed;
top: 50%;
transform: translateY(-50px);
left: 0;
right: 0;
margin: 0 auto;
border-radius: 5px;
color: #ffffff;
}
.popup p{
text-align: center;
margin-top: 20px;
}
.popup span{
text-align: center;
line-height: 30px;
cursor: pointer;
}
.popup .queding{
display: inline-block;
width: 80px;
height: 30px;
background-color: #1E9FFF;
border-radius: 3px;
}
.popup span:hover{
opacity: 0.8;
}
.popup .quxiao{
display: inline-block;
width: 80px;
height: 30px;
ckground-color: #9cb945 ;
color: #333333;
border-radius: 3px;
background-color:#fff;
margin-left: 35px;
}
.btn_list{
margin: 0 auto;
width: 200px;
}
</style>
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a>提现管理</a></li>
</ul>
<form class="well form-inline margin-top-20" method="post" action="{:url('AdminOauth/getMoneyDetail',array('id'=>$uid))}">
时间:
<input type="text" class="form-control js-bootstrap-datetime" name="start_time"
value="{$start_time|default=''}"
style="width: 140px;" autocomplete="off"> -
<input type="text" class="form-control js-bootstrap-datetime" name="end_time"
value="{$end_time|default=''}"
style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
<input type="submit" class="btn btn-primary" value="搜索"/>
<a class="btn btn-danger" href="{:url('AdminOauth/getMoneyDetail',array('id'=>$uid))}">清空</a>
<span class="btn btn-default" onclick="window.history.back(-1)" >返回</span>
</form>
<form method="post" class="js-ajax-form margin-top-20">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>ID</th>
<th>提现金额</th>
<th>状态</th>
<th>提现时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<foreach name="lists" item="vo">
<tr>
<td>{$vo.id}</td>
<td>{$vo.money}</td>
<td>
<eq name="vo.status" value="5">待审核</eq>
<eq name="vo.status" value="3">提现通过</eq>
<eq name="vo.status" value="4">提现拒绝</eq>
</td>
<td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
<td>
<span class="agree" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">同意</span>
<span class="refuse" style="color: #ff0000; text-decoration:underline; cursor: pointer; " index="{$vo.id}">拒绝</span>
</td>
</tr>
</foreach>
</tbody>
</table>
</form>
<div class="popup" style="display: none;">
<p>确认拉黑该用户</p>
<div class="btn_list">
<span class="queding">确认</span>
<span class="quxiao">取消</span>
</div>
</div>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script src="__STATIC__/js/layer/layer.js"></script>
<script type="text/javascript" src="__STATIC__/js/zepto.min.js"></script>
<script type="text/javascript" src="__STATIC__/js/mdialog.js"></script>
<script type="">
$('.agree').click(function () {
var id = $(this).attr('index');
$('.popup').css('display','block');
// 删除
$('.queding').click(function () {
$.ajax({
type:"POST",
url:"{:url('AdminOauth/agree')}",
data:{
"id":id,
},
success:function (data) {
new TipBox({type:'success',str:'操作成功',hasBtn:true});
$('.popup').css('display','none');
},
error:function () {
new TipBox({type:'error',str:'对不起,出错了!',hasBtn:true});
$('.popup').css('display','none');
}
})
})
})
$('.quxiao').click(function () {
$('.popup').css('display','none');
})
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -79,6 +79,7 @@
<span>用户id:{$user.id}</span>&nbsp;&nbsp;&nbsp;&nbsp;
<span>用户名:{$user.name}</span>&nbsp;&nbsp;&nbsp;&nbsp;
<span>手机号:{$user.tel}</span>&nbsp;&nbsp;&nbsp;&nbsp;
<span class="btn btn-default" onclick="window.history.back(-1)" >返回</span>
</div>
</div>
... ...
... ... @@ -78,8 +78,10 @@
<div>
<span>用户id:{$user.id}</span>&nbsp;&nbsp;&nbsp;&nbsp;
<span>用户名:{$user.name}</span>&nbsp;&nbsp;&nbsp;&nbsp;
<span>手机号:{$user.tel}</span>&nbsp;&nbsp;&nbsp;&nbsp;
<span>手机号:{$user.tel}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span class="btn btn-default" onclick="window.history.back(-1)" >返回</span>
</div>
</div>
<form method="post" class="js-ajax-form margin-top-20">
... ... @@ -108,8 +110,10 @@
</td>
<td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
<td>
<span class="look" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">查看订单</span>
<span class="black" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">删除</span>
<neq name="vo.order_id" value="0">
<span class="order" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.order_id}">查看订单</span>
</neq>
<span class="del" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">删除</span>
</td>
</tr>
</foreach>
... ... @@ -131,7 +135,7 @@
<script type="text/javascript" src="__STATIC__/js/zepto.min.js"></script>
<script type="text/javascript" src="__STATIC__/js/mdialog.js"></script>
<script type="">
$('.black').click(function () {
$('.del').click(function () {
var id = $(this).attr('index');
$('.popup').css('display','block');
// 删除
... ... @@ -165,7 +169,14 @@
var url = url3[0]+'/id/'+url2+'.html';
window.location.href = url
})
// 查看收支明细
// 查看订单
$('.order').click(function () {
var url1 = "{:url('user/AdminOauth/findOrder')}";
var url2 = $(this).attr('index');
var url3 = url1.split('.');
var url = url3[0]+'/order_id/'+url2+'.html';
window.location.href = url
})
// 查看提现申请
// 查看邀请人
</script>
... ...
<include file="public@header"/>
<style type="text/css">
.pic-list li {
margin-bottom: 5px;
}
</style>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<!--<li><a href="{:url('Bank/index')}">银行列表</a></li>-->
<!--<li class="active"><a href="{:url('Bank/add')}">添加银行</a></li>-->
</ul>
<form action="{:url('AdminOauth/findOrder')}" method="post" class="form-horizontal js-ajax-form margin-top-20" enctype="multipart/form-data" >
<div class="row">
<div class="col-md-9">
<table class="table table-bordered">
<input class="form-control" type="hidden" name="id"
value="{$list['id']}"/>
<tr>
<th width="15%">订单号</th>
<td><input class="form-control" type="text" name="order_sn" readonly="readonly"
value="{$list['order_sn']}" />
</td>
</tr>
<tr>
<th width="15%">明细内容</th>
<td><input class="form-control" type="text" name="name" readonly="readonly" value="{$list['name']}" />
</td>
</tr>
<tr>
<th width="15%">需求id</th>
<td><input class="form-control" type="text" name="type" readonly="readonly" value="{$list['type']}" />
</td>
</tr>
<tr>
<th width="15%">支付金额</th>
<td><input class="form-control" type="text" name="money" value="{$list['money']}" readonly="readonly"/>
</td>
</tr>
<tr>
<th width="15%">支付状态</th>
<td><input class="form-control" type="text" name="status" value="{$list['status']}" readonly="readonly"/>
</td>
</tr>
<tr>
<th width="15%">支付方式</th>
<td><input class="form-control" type="text" name="pay_type" value="{$list['pay_type']}" readonly="readonly"/>
</td>
</tr>
<tr>
<th width="15%">支付时间</th>
<td><input class="form-control" type="text" name="pay_time" value="{$list['pay_time']|date='Y-m-d H:i:s',###}" readonly="readonly"/>
</td>
</tr>
<tr>
<th width="15%">订单生成时间</th>
<td><input class="form-control" type="text" name="create_time" value="{$list['create_time']|date='Y-m-d H:i:s',###}" readonly="readonly"/>
</td>
</tr>
</table>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<!--<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>-->
<span class="btn btn-default" onclick="window.history.back(-1)">{:lang('BACK')}</span>
</div>
</div>
</div>
</div>
</form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
//编辑器路径定义
var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
$(function () {
editorcontent = new baidu.editor.ui.Editor();
editorcontent.render('content');
try {
editorcontent.sync();
} catch (err) {
}
$('.btn-cancel-thumbnail').click(function () {
$('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
$('#thumbnail').val('');
});
});
</script>
</body>
</html>
... ...
<include file="public@header"/>
<link rel="stylesheet" href="__STATIC__/install/css/mdialog.css">
<style>
.popup{
width: 250px;
height: 100px;
background-color: rgba(0,0,0,0.5);
position: fixed;
top: 50%;
transform: translateY(-50px);
left: 0;
right: 0;
margin: 0 auto;
border-radius: 5px;
color: #ffffff;
}
.popup p{
text-align: center;
margin-top: 20px;
}
.popup span{
text-align: center;
line-height: 30px;
cursor: pointer;
}
.popup .queding{
display: inline-block;
width: 80px;
height: 30px;
background-color: #1E9FFF;
border-radius: 3px;
}
.popup span:hover{
opacity: 0.8;
}
.popup .quxiao{
display: inline-block;
width: 80px;
height: 30px;
ckground-color: #9cb945 ;
color: #333333;
border-radius: 3px;
background-color:#fff;
margin-left: 35px;
}
.btn_list{
margin: 0 auto;
width: 200px;
}
</style>
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a>邀请人管理</a></li>
</ul>
<form class="well form-inline margin-top-20" method="post" action="{:url('AdminOauth/referee',array('id'=>$uid))}">
时间:
<input type="text" class="form-control js-bootstrap-datetime" name="start_time"
value="{$start_time|default=''}"
style="width: 140px;" autocomplete="off"> -
<input type="text" class="form-control js-bootstrap-datetime" name="end_time"
value="{$end_time|default=''}"
style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
姓名:
<input type="text" class="form-control" name="name" style="width: 200px;"
value="{$name|default=''}" placeholder="请输入姓名">
手机号:
<input type="text" class="form-control" name="tel" style="width: 200px;"
value="{$tel|default=''}" placeholder="请输入手机号">
<input type="submit" class="btn btn-primary" value="搜索"/>
<a class="btn btn-danger" href="{:url('AdminOauth/referee',array('id'=>$uid))}">清空</a>
<span class="btn btn-default" onclick="window.history.back(-1)" >返回</span>
</form>
<form method="post" class="js-ajax-form margin-top-20">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>ID</th>
<th>姓名</th>
<th>手机号</th>
<th>注册时间</th>
</tr>
</thead>
<tbody>
<foreach name="lists" item="vo">
<tr>
<td>{$vo.id}</td>
<td>{$vo.name}</td>
<td>{$vo.tel}</td>
<td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
</tr>
</foreach>
</tbody>
</table>
</form>
<div class="popup" style="display: none;">
<p>确认拉黑该用户</p>
<div class="btn_list">
<span class="queding">确认</span>
<span class="quxiao">取消</span>
</div>
</div>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script src="__STATIC__/js/layer/layer.js"></script>
<script type="text/javascript" src="__STATIC__/js/zepto.min.js"></script>
<script type="text/javascript" src="__STATIC__/js/mdialog.js"></script>
<script type="">
$('.black').click(function () {
var id = $(this).attr('index');
$('.popup').css('display','block');
// 删除
$('.queding').click(function () {
$.ajax({
type:"POST",
url:"{:url('AdminOauth/del')}",
data:{
"id":id,
},
success:function (data) {
new TipBox({type:'success',str:'操作成功',hasBtn:true});
$('.popup').css('display','none');
},
error:function () {
new TipBox({type:'error',str:'对不起,出错了!',hasBtn:true});
$('.popup').css('display','none');
}
})
})
})
$('.quxiao').click(function () {
$('.popup').css('display','none');
})
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -80,6 +80,7 @@
<th>ID</th>
<th>姓名</th>
<th>手机号</th>
<th>余额</th>
<th>推荐人</th>
<th>推荐人id</th>
<th>注册时间</th>
... ... @@ -94,6 +95,7 @@
<td>{$vo.id}</td>
<td>{$vo.name}</td>
<td>{$vo.tel}</td>
<th>{$vo.money}</th>
<td>
<empty name="vo.referee_name">
暂无
... ... @@ -122,7 +124,7 @@
<td>
<span class="detail" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}" >详细信息</span>
<span class="money" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">收支明细</span>
<span class="getMoney" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">提现申请</span>
<span class="getMoneyDetail" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">提现申请</span>
<span class="referee" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">邀请人</span>
</td>
<td>
... ... @@ -157,7 +159,7 @@
<script type="text/javascript" src="__STATIC__/js/mdialog.js"></script>
<script type="">
$('.black').click(function () {
var id = $('.black').attr('index');
var id = $(this).attr('index');
$('.popup').css('display','block');
// 删除
$('.queding').click(function () {
... ... @@ -199,7 +201,22 @@
window.location.href = url
})
// 查看提现申请
$('.getMoneyDetail').click(function () {
var url1 = "{:url('user/AdminOauth/getMoneyDetail')}";
var url2 = $(this).attr('index');
var url3 = url1.split('.');
var url = url3[0]+'/id/'+url2+'.html';
window.location.href = url
})
// 查看邀请人
$('.referee').click(function () {
var url1 = "{:url('user/AdminOauth/referee')}";
var url2 = $(this).attr('index');
var url3 = url1.split('.');
var url = url3[0]+'/id/'+url2+'.html';
window.location.href = url
})
</script>
</body>
</html>
\ No newline at end of file
... ...