优化推广员充值优化代码

master
chenzhi 5 years ago
parent 5e246dde2b
commit fd23b640ea

@ -56,7 +56,6 @@ class PlatformController extends ThinkController
->group('fgame_id') ->group('fgame_id')
->order('count desc,register_time') ->order('count desc,register_time')
->select(); ->select();
// dd($data);
$map2 = array(); $map2 = array();
$map2['fgame_id'] = array('egt', 0); $map2['fgame_id'] = array('egt', 0);
$map2['puid'] = 0; $map2['puid'] = 0;
@ -69,7 +68,6 @@ class PlatformController extends ThinkController
->group('fgame_id') ->group('fgame_id')
->select(); ->select();
$data2 = array_column($data2, null, 'fgame_id'); $data2 = array_column($data2, null, 'fgame_id');
// dd($data2);
$count = count($data); $count = count($data);
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
static $i = 0; static $i = 0;
@ -612,19 +610,6 @@ class PlatformController extends ThinkController
$week = total(2); $week = total(2);
$mounth = total(3); $mounth = total(3);
unset( $map['create_time']); unset( $map['create_time']);
//获取所有会长
$promote_map = "`chain` = '/'";
if (isset($_REQUEST['promote_id'])) {
$promote_map = "`chain` = '%/{$_REQUEST['promote_id']}/%' OR id = {$_REQUEST['promote_id']}";
}
//为数据权限添加
setPowerPromoteIds($map);
$promote_map2 = array();
setPowerPromoteIds($promote_map2, 'id');
$promote = M("promote","tab_")->field("id,account")->page($page,$row)->where($promote_map)->where($promote_map2)->select();
$pcount = M("promote","tab_")->field("count(*) acount")->where($promote_map)->where($promote_map2)->find()['acount'];
// var_dump( $promote); // var_dump( $promote);
$tweek = total(2,false); $tweek = total(2,false);
$tmonth = total(3,false); $tmonth = total(3,false);
@ -635,50 +620,68 @@ class PlatformController extends ThinkController
}else{ }else{
$tmin = $tmonth[1][0]; $tmin = $tmonth[1][0];
} }
//为数据权限添加
setPowerPromoteIds($map, 'tp1.id');
if (isset($_REQUEST['promote_id'])) {
$map['tp1.id'] = $_REQUEST['promote_id'];
} else {
$map['tp1.chain'] = '/';
}
$data =array();
for ($i=0; $i < count($promote); $i++) { if (isset($_REQUEST['game_name'])) {
# code... $map['s.game_name'] = $_REQUEST['game_name'];
$proid = M("promote","tab_")->field("id")->where("`chain` like '%/{$promote[$i]['id']}/%'")->select(); if (isset($_REQUEST['server_id'])) {
$str = ''; $map['s.server_name'] = $_REQUEST['server_id'];
for($k=0; $k<count($proid); $k++){ unset($_REQUEST['server_id']);
# code...
$str .= ($proid[$k]['id'].",");
}
$str .= "{$promote[$i]['id']}";
$map['promote_id'] = array("in",$str);
if (isset($_REQUEST['game_name'])) {
$map['game_name'] = $_REQUEST['game_name'];
if (isset($_REQUEST['server_id'])) {
$map['server_name'] = $_REQUEST['server_id'];
unset($_REQUEST['server_id']);
}
}
$dbdata = $spend
->field('floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count')
->where($map)
->find();
$tmap = $map;
if(isset($map['pay_time'])){
$tmap['pay_time'] = ['between', array($tmin,$tmonth[1][1])];
} }
$tdbdata = $spend }
->field(' $data = M('promote', 'tab_')->alias('tp1')
floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today, ->field('tp1.account as promote_account,tp1.id,
floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week, floor(sum(pay_amount)*100) as count')
floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') ->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left')
->where($tmap) ->join("tab_spend as s on tp2.id = s.promote_id", 'left')
->find(); ->where($map)
$dbdata['today']= $tdbdata['today']; ->group('tp1.id')
$dbdata['week']= $tdbdata['week']; ->order('count desc')
$dbdata['mounth']= $tdbdata['mounth']; ->select();
//今日/本周/本月不变
$dbdata['promote_account'] = $promote[$i]['account']; $tmap = $map;
$dbdata['promote_id'] = $promote[$i]['id']; if(isset($map['pay_time'])){
$tmap['pay_time'] = ['between', array($tmin,$tmonth[1][1])];
}
$tdata = M('promote', 'tab_')->alias('tp1')
->field('tp1.account as promote_account,tp1.id,
floor(sum(IF(s.pay_time ' . $today . ',pay_amount,0))*100) as today,
floor(sum(IF(s.pay_time ' . $week . ',pay_amount,0))*100) as week,
floor(sum(IF(s.pay_time ' . $mounth . ',pay_amount,0))*100) as mounth')
->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left')
->join("tab_spend as s on tp2.id = s.promote_id", 'left')
->where($tmap)
->group('tp1.id')
->select();
$tmdata = [];
foreach($data as $k=>$v){
$v['today'] = 0;
$v['week'] = 0;
$v['mounth'] = 0;
$tmdata[$v['id']] = $v;
}
foreach ($tdata as $k => $v) {
$tmdata[$v['id']]['today'] = $v['today'];
$tmdata[$v['id']]['week'] = $v['week'];
$tmdata[$v['id']]['mounth'] = $v['mounth'];
$data[] = $dbdata;
} }
$data = [];
foreach($tmdata as $k => $v){
$data[] = $v;
}
// dd($data);
$count = count($data); $count = count($data);
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
$value['count'] ?: 0; $value['count'] ?: 0;
@ -703,7 +706,7 @@ class PlatformController extends ThinkController
$this->assign('userarpu_order_type', $data_order_type); $this->assign('userarpu_order_type', $data_order_type);
} }
$page = set_pagination($pcount, $row); $page = set_pagination($count, $row);
if ($page) { if ($page) {
$this->assign('_page', $page); $this->assign('_page', $page);
} }
@ -712,13 +715,14 @@ class PlatformController extends ThinkController
$size = $row;//每页显示的记录数 $size = $row;//每页显示的记录数
$pnum = ceil(count($data) / $size); //总页数ceil()函数用于求大于数字的最小整数 $pnum = ceil(count($data) / $size); //总页数ceil()函数用于求大于数字的最小整数
$data = array_slice($data, ($arraypage - 1) * $size, $size);
$this->meta_title = '渠道充值统计列表'; $this->meta_title = '渠道充值统计列表';
$this->assign('list_data', $data); $this->assign('list_data', $data);
$this->assign("is_admin",is_administrator()); $this->assign("is_admin",is_administrator());
$this->display(); $this->display();
} }
function promotepay_statistics_1($p = 0) public function promotepay_statistics1($p = 0)
{ {
$page = intval($p); $page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据 $page = $page ? $page : 1; //默认显示第一页数据
@ -731,84 +735,97 @@ class PlatformController extends ThinkController
$map1['promote_id'] = $map['promote_id'] = array('egt', 0); $map1['promote_id'] = $map['promote_id'] = array('egt', 0);
$spend = M('Spend', 'tab_'); $spend = M('Spend', 'tab_');
if (!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) { if (!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) {
$map['create_time'] = ['between', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399)]; $map['pay_time'] = ['between', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399)];
$pay_time = " between " . strtotime($_REQUEST['timestart']) . " and " . (strtotime($_REQUEST['timeend']) + 86399) . " ";
unset($_REQUEST['timestart']); unset($_REQUEST['timestart']);
unset($_REQUEST['timeend']); unset($_REQUEST['timeend']);
} elseif (!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) { } elseif (!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) {
$map['create_time'] = ['between', array(strtotime($_REQUEST['timestart']), time())]; $map['pay_time'] = ['between', array(strtotime($_REQUEST['timestart']), time())];
$pay_time = " between " . strtotime($_REQUEST['timestart']) . " and " . time() . " ";
unset($_REQUEST['timestart']); unset($_REQUEST['timestart']);
} elseif (empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) { } elseif (empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) {
$map['create_time'] = ['elt', strtotime($_REQUEST['timeend']) + 86399]; $map['pay_time'] = ['elt', strtotime($_REQUEST['timeend']) + 86399];
$pay_time = " between 0 and " . (strtotime($_REQUEST['timeend']) + 86399) . " ";
unset($_REQUEST['timeend']); unset($_REQUEST['timeend']);
} else { } else {
$pay_time = " between 0 and " . time(); $map['pay_time'] = ['between', array(0, time())];
// $pay_time = " between 0 and " . time();
} }
$map1['pay_status'] = $map['pay_status'] = 1; $map1['pay_status'] = $map['pay_status'] = 1;
$today = total(1); $today = total(1);
$week = total(2); $week = total(2);
$mounth = total(3); $mounth = total(3);
// $map1['pay_way'] = $map['pay_way'] = array('gt', 0); unset( $map['create_time']);
$bindrecharge_data = M('bind_recharge', 'tab_') //获取所有会长
->field('max(id) as id,promote_account,promote_id,create_time as ordertime,date_format(FROM_UNIXTIME(create_time),"%Y-%m-%d") AS time, $promote_map = "`chain` = '/'";
floor(sum(IF(create_time ' . $pay_time . ',real_amount,0))*100) as scount, if (isset($_REQUEST['promote_id'])) {
floor(sum(IF(create_time ' . $today . ',real_amount,0))*100) as today, $promote_map = "`chain` = '%/{$_REQUEST['promote_id']}/%' OR id = {$_REQUEST['promote_id']}";
floor(sum(IF(create_time ' . $week . ',real_amount,0))*100) as week, }
floor(sum(IF(create_time ' . $mounth . ',real_amount,0))*100) as mounth') //为数据权限添加
->where($map1) setPowerPromoteIds($map);
->group('promote_id') $promote_map2 = array();
->select(false); setPowerPromoteIds($promote_map2, 'id');
$promote = M("promote","tab_")->field("id,account")->page($page,$row)->where($promote_map)->where($promote_map2)->select();
$deposit_data = M('deposit', 'tab_') $pcount = M("promote","tab_")->field("count(*) acount")->where($promote_map)->where($promote_map2)->find()['acount'];
->field('max(id) as id,promote_account,promote_id,create_time as ordertime,date_format(FROM_UNIXTIME(create_time),"%Y-%m-%d") AS time,
floor(sum(IF(create_time ' . $pay_time . ',pay_amount,0))*100) as scount, // var_dump( $promote);
floor(sum(IF(create_time ' . $today . ',pay_amount,0))*100) as today, $tweek = total(2,false);
floor(sum(IF(create_time ' . $week . ',pay_amount,0))*100) as week, $tmonth = total(3,false);
floor(sum(IF(create_time ' . $mounth . ',pay_amount,0))*100) as mounth') //获取最小
->where($map1) $tmin = 0;
->group('promote_id') if($tweek[1][0] < $tmonth[1][0]){
->select(false); $tmin = $tweek[1][0];
if (isset($_REQUEST['game_name'])) { }else{
$map['game_name'] = $_REQUEST['game_name']; $tmin = $tmonth[1][0];
if (isset($_REQUEST['server_id'])) { }
$map['server_name'] = $_REQUEST['server_id'];
unset($_REQUEST['server_id']);
$data =array();
for ($i=0; $i < count($promote); $i++) {
# code...
$proid = M("promote","tab_")->field("id")->where("`chain` like '%/{$promote[$i]['id']}/%'")->select();
$str = '';
for($k=0; $k<count($proid); $k++){
# code...
$str .= ($proid[$k]['id'].",");
} }
$data = $spend $str .= "{$promote[$i]['id']}";
->field('max(id) as id,promote_account,promote_id,pay_time as ordertime,date_format(FROM_UNIXTIME(pay_time),"%Y-%m-%d") AS time, $map['promote_id'] = array("in",$str);
floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as scount, if (isset($_REQUEST['game_name'])) {
floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today, $map['game_name'] = $_REQUEST['game_name'];
floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week, if (isset($_REQUEST['server_id'])) {
floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') $map['server_name'] = $_REQUEST['server_id'];
->where($map) unset($_REQUEST['server_id']);
->group('promote_id') }
->select(false); }
} else { $dbdata = $spend
$data = $spend ->field('floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count')
->field('max(id) as id,promote_account,promote_id,pay_time as ordertime,date_format(FROM_UNIXTIME(pay_time),"%Y-%m-%d") AS time,
floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as scount,
floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today,
floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week,
floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth')
->where($map) ->where($map)
// ->union(' (' . $bindrecharge_data . ') ') ->find();
// ->union(' (' . $deposit_data . ') ') $tmap = $map;
->group('promote_id') if(isset($map['pay_time'])){
->select(false); $tmap['pay_time'] = ['between', array($tmin,$tmonth[1][1])];
} }
$promote_map = "tp1.`chain` = '/'"; $tdbdata = $spend
if (isset($_REQUEST['promote_id'])) { ->field('
$promote_map = "tp1.`id` = {$_REQUEST['promote_id']}"; floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today,
unset($_REQUEST['promote_id']); floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week,
floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth')
->where($tmap)
->find();
$dbdata['today']= $tdbdata['today'];
$dbdata['week']= $tdbdata['week'];
$dbdata['mounth']= $tdbdata['mounth'];
$dbdata['promote_account'] = $promote[$i]['account'];
$dbdata['promote_id'] = $promote[$i]['id'];
$data[] = $dbdata;
} }
$data = $spend->field('t.pid as promote_id,t.promote_account,sum(a.scount) AS count,sum(a.today) AS today,sum(a. WEEK) AS WEEK,sum(a.mounth) AS mounth')
->join("inner JOIN (SELECT tp2.*, tp1.id AS pid, tp1.account as promote_account FROM tab_promote tp1 LEFT JOIN tab_promote tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') where $promote_map ) AS t ON promote_id = t.id or promote_id = t.pid")
->where($condition)->table('(' . $data . ') as a')->group('t.pid')->order('count desc,a.ordertime')->select();
$count = count($data); $count = count($data);
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
$value['count'] ?: 0;
$value['today'] ?: 0;
$value['week'] ?: 0;
$value['mounth'] ?: 0;
static $i = 0; static $i = 0;
$i++; $i++;
$data[$key]['rand'] = $i; $data[$key]['rand'] = $i;
@ -816,14 +833,8 @@ class PlatformController extends ThinkController
$data[$key]['today'] = $value['today'] / 100; $data[$key]['today'] = $value['today'] / 100;
$data[$key]['week'] = $value['week'] / 100; $data[$key]['week'] = $value['week'] / 100;
$data[$key]['mounth'] = $value['mounth'] / 100; $data[$key]['mounth'] = $value['mounth'] / 100;
/* $adata=$this->day_data('Spend',array('promote_id'=>$value['promote_id'])); }
$data[$key]['today']=$adata['today']==''?0:$adata['today'];
$data[$key]['week']=$adata['week']==''?0:$adata['week'];
$data[$key]['mounth']=$adata['mounth']==''?0:$adata['mounth']; */
// if ($data[$key]['promote_id'] == '0') {
// unset($data[$key]);
// }
}
$total = $this->data_total($data); $total = $this->data_total($data);
$this->assign('total', $total); $this->assign('total', $total);
if ($_REQUEST['data_order'] != '') { if ($_REQUEST['data_order'] != '') {
@ -833,19 +844,20 @@ class PlatformController extends ThinkController
$this->assign('userarpu_order_type', $data_order_type); $this->assign('userarpu_order_type', $data_order_type);
} }
$page = set_pagination($count, $row); $page = set_pagination($pcount, $row);
if ($page) { if ($page) {
$this->assign('_page', $page); $this->assign('_page', $page);
} }
$data = my_sort($data, $data_order_type, (int)$data_order); $data = my_sort($data, $data_order_type, (int)$data_order);
$size = $row;//每页显示的记录数 $size = $row;//每页显示的记录数
$pnum = ceil(count($data) / $size); //总页数ceil()函数用于求大于数字的最小整数 $pnum = ceil(count($data) / $size); //总页数ceil()函数用于求大于数字的最小整数
//用array_slice(array,offset,length) 函数在数组中根据条件取出一段值;array(数组),offset(元素的开始位置),length(组的长度)
$data = array_slice($data, ($arraypage - 1) * $size, $size);
$this->meta_title = '渠道充值统计列表'; $this->meta_title = '渠道充值统计列表';
$this->assign('list_data', $data); $this->assign('list_data', $data);
$this->assign("is_admin",is_administrator());
$this->display(); $this->display();
} }
public function data_total($data) public function data_total($data)

@ -88,21 +88,51 @@
<table> <table>
<!-- 表头 --> <!-- 表头 -->
<thead> <thead>
<tr> <!-- <tr>
<!-- <th class="row-selected row-selected">
<input class="check-all" type="checkbox">
</th> -->
<th >推广员账号</th> <th >推广员账号</th>
<th ><a class="paixu" date-url='lzhuce'>累计充值</a></th> <th ><a class="paixu" date-url='lzhuce'>累计充值</a></th>
<!-- <th ><a class="paixu" date-url='phb'>排行榜</a></th> --> <th ><a class="paixu" date-url='phb'>排行榜</a></th>
<th ><a class="paixu" date-url='dzhuce'>今日充值</a></th> <th ><a class="paixu" date-url='dzhuce'>今日充值</a></th>
<th ><a class="paixu" date-url='wzhuce'>本周充值</a></th> <th ><a class="paixu" date-url='wzhuce'>本周充值</a></th>
<th ><a class="paixu" date-url='mzhuce'>本月充值</a></th> <th ><a class="paixu" date-url='mzhuce'>本月充值</a></th>
</tr> -->
<tr>
<th >推广员账号</th>
<th ><a class="paixu" data-order='count'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'count'">累计充值▲
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'count'"/>累计充值▼
<else />累计充值<img src="__IMG__/up-down.png" width="13px">
</if></a></th>
<th ><a class="paixu" data-order='rand'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'rand'">排行榜▲
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'rand'"/>排行榜▼
<else />排行榜<img src="__IMG__/up-down.png" width="13px">
</if></a></th>
<th ><a class="paixu" data-order='today'>
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'today'">今日充值▲
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'today'"/>今日充值▼
<else />今日充值<img src="__IMG__/up-down.png" width="13px"></if>
</a></th>
<th ><a class="paixu" data-order='week'>
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'week'">本周充值▲
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'week'"/>本周充值▼
<else />本周充值<img src="__IMG__/up-down.png" width="13px">
</if>
</a></th>
<th ><a class="paixu" data-order='mounth'>
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'mounth'">本月充值▲
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'mounth'"/>本月充值▼
<else />本月充值<img src="__IMG__/up-down.png" width="13px"></if>
</a></th>
</tr> </tr>
</thead> </thead>
<!-- 列表 --> <!-- 列表 -->
@ -121,7 +151,7 @@
<tr> <tr>
<td >{$data['promote_account']}</td> <td >{$data['promote_account']}</td>
<td ><span class='ljcz' data-value="{$data['promote_id']}"><a>{$data.count}</a></span></td> <td ><span class='ljcz' data-value="{$data['promote_id']}"><a>{$data.count}</a></span></td>
<!-- <td ><strong><if condition="$data.rand eq 1"><span>{$data.rand}</span><elseif condition="$data.rand eq 2"/><span>{$data.rand}</span><elseif condition="$data.rand eq 3"/><span>{$data.rand}</span><else/>{$data.rand}</if></strong></td> --> <td ><strong><if condition="$data.rand eq 1"><span>{$data.rand}</span><elseif condition="$data.rand eq 2"/><span>{$data.rand}</span><elseif condition="$data.rand eq 3"/><span>{$data.rand}</span><else/>{$data.rand}</if></strong></td>
<td >{$data.today}</td> <td >{$data.today}</td>
<td >{$data.week}</td> <td >{$data.week}</td>
<td >{$data.mounth}</td> <td >{$data.mounth}</td>
@ -131,7 +161,7 @@
<tr class="data_summary"> <tr class="data_summary">
<td><span>汇总</span></td> <td><span>汇总</span></td>
<td ><span>{$total.sum_count}</span></td> <td ><span>{$total.sum_count}</span></td>
<!-- <td>---</td> --> <td>---</td>
<td>{$total.sum_today}</td> <td>{$total.sum_today}</td>
<td>{$total.sum_week}</td> <td>{$total.sum_week}</td>
<td>{$total.sum_mounth}</td> <td>{$total.sum_mounth}</td>
@ -209,69 +239,85 @@
// }); // });
// }); // });
$(".paixu").click(function(){ $(".paixu").click(function(){
$ddd=$(this).attr('date-url'); var that=$(this);
$lzhuce="{:I('lzhuce')}"; $data_order=that.attr('data-order');
$phb = "{:I('phb')}"; $order_type='{$userarpu_order}';
$dzhuce = "{:I('dzhuce')}"; if($order_type==''||$order_type=='4'){
$wzhuce = "{:I('wzhuce')}"; $(".sortBy").attr('name','data_order');
$mzhuce = "{:I('mzhuce')}"; val='3,'+$data_order;
// $sss="{:I('group')}"; $(".sortBy").attr('value',val);
if($ddd=='lzhuce'){ $("#search").click();
if($lzhuce==1){ }else if($order_type=='3'){
$(".sortBy").attr('name','lzhuce'); $(".sortBy").attr('name','data_order');
$(".sortBy").attr('value',2); val='4,'+$data_order;
$("#search").click(); $(".sortBy").attr('value',val);
}else{ $("#search").click();
$(".sortBy").attr('name','lzhuce');
$(".sortBy").attr('value',1);
$("#search").click();
}
}
if($ddd=='phb'){
if($phb==1){
$(".sortBy").attr('name','phb');
$(".sortBy").attr('value',2);
$("#search").click();
}else{
$(".sortBy").attr('name','phb');
$(".sortBy").attr('value',1);
$("#search").click();
}
}
if($ddd=='dzhuce'){
if($dzhuce==1){
$(".sortBy").attr('name','dzhuce');
$(".sortBy").attr('value',2);
$("#search").click();
}else{
$(".sortBy").attr('name','dzhuce');
$(".sortBy").attr('value',1);
$("#search").click();
}
}
if($ddd=='wzhuce'){
if($wzhuce==1){
$(".sortBy").attr('name','wzhuce');
$(".sortBy").attr('value',2);
$("#search").click();
}else{
$(".sortBy").attr('name','wzhuce');
$(".sortBy").attr('value',1);
$("#search").click();
}
}
if($ddd=='mzhuce'){
if($mzhuce==1){
$(".sortBy").attr('name','mzhuce');
$(".sortBy").attr('value',2);
$("#search").click();
}else{
$(".sortBy").attr('name','mzhuce');
$(".sortBy").attr('value',1);
$("#search").click();
}
} }
}) });
// $(".paixu").click(function(){
// $ddd=$(this).attr('date-url');
// $lzhuce="{:I('lzhuce')}";
// $phb = "{:I('phb')}";
// $dzhuce = "{:I('dzhuce')}";
// $wzhuce = "{:I('wzhuce')}";
// $mzhuce = "{:I('mzhuce')}";
// // $sss="{:I('group')}";
// if($ddd=='lzhuce'){
// if($lzhuce==1){
// $(".sortBy").attr('name','lzhuce');
// $(".sortBy").attr('value',2);
// $("#search").click();
// }else{
// $(".sortBy").attr('name','lzhuce');
// $(".sortBy").attr('value',1);
// $("#search").click();
// }
// }
// if($ddd=='phb'){
// if($phb==1){
// $(".sortBy").attr('name','phb');
// $(".sortBy").attr('value',2);
// $("#search").click();
// }else{
// $(".sortBy").attr('name','phb');
// $(".sortBy").attr('value',1);
// $("#search").click();
// }
// }
// if($ddd=='dzhuce'){
// if($dzhuce==1){
// $(".sortBy").attr('name','dzhuce');
// $(".sortBy").attr('value',2);
// $("#search").click();
// }else{
// $(".sortBy").attr('name','dzhuce');
// $(".sortBy").attr('value',1);
// $("#search").click();
// }
// }
// if($ddd=='wzhuce'){
// if($wzhuce==1){
// $(".sortBy").attr('name','wzhuce');
// $(".sortBy").attr('value',2);
// $("#search").click();
// }else{
// $(".sortBy").attr('name','wzhuce');
// $(".sortBy").attr('value',1);
// $("#search").click();
// }
// }
// if($ddd=='mzhuce'){
// if($mzhuce==1){
// $(".sortBy").attr('name','mzhuce');
// $(".sortBy").attr('value',2);
// $("#search").click();
// }else{
// $(".sortBy").attr('name','mzhuce');
// $(".sortBy").attr('value',1);
// $("#search").click();
// }
// }
// })
//点击排序 //点击排序
$('.list_sort').click(function(){ $('.list_sort').click(function(){
var url = $(this).attr('url'); var url = $(this).attr('url');

Loading…
Cancel
Save