bobing_910_4
This commit is contained in:
@@ -9,6 +9,7 @@ class Member extends HD_Controller
|
||||
private $ifkzAry = array(0 => '未开', 1 => '已开');
|
||||
private $levelNameAry = array(13 => "状元插金花", 12 => "六勃红", 11 => "遍地锦", 10 => "六抔黑", 9 => "五红", 8 => "五子带一秀",
|
||||
7 => "五子", 6 => "状元", 5 => "对堂", 4 => "三红", 3 => "四进", 2 => "二举", 1 => "一秀", 0 => "罚黑");
|
||||
private $carGoldAry = array(1 => '博饼500', 2 => '企微500', 3 => '排名1000');
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -81,9 +82,24 @@ class Member extends HD_Controller
|
||||
} else {
|
||||
$params['if_kz'] = -99;
|
||||
}
|
||||
if ($params['car_gold']) {
|
||||
if ($params['car_gold'] == 1) {
|
||||
$where['car_gold>='] = 500;
|
||||
} elseif ($params['car_gold'] == 2) {
|
||||
$where['buy_car_gold>='] = 500;
|
||||
} elseif ($params['car_gold'] == 3) {
|
||||
$where['lotter_gold>='] = 1000;
|
||||
}
|
||||
}
|
||||
$params['credit_sort'] = $params['credit_sort'] ? intval($params['credit_sort']) : -1;
|
||||
if ($params['credit_sort'] > -1) {
|
||||
$order = $params['credit_sort'] == 1 ? "credit desc" : 'credit asc';
|
||||
} else {
|
||||
$order = "id desc";
|
||||
}
|
||||
$count = $this->mdBobingUser->count(array_merge($this->where, $where));
|
||||
if ($count) {
|
||||
$res = $this->mdBobingUser->select(array_merge($this->where, $where), 'id desc', $params['page'], $params['size']);
|
||||
$res = $this->mdBobingUser->select(array_merge($this->where, $where), $order, $params['page'], $params['size']);
|
||||
$uids = array_column($res, 'uid');
|
||||
$res_u = $this->user_service->select(array('id in (' . implode(',', $uids) . ')' => null), 'id DESC', 0, 0, 'id,nickname,mobile');
|
||||
foreach ($res_u as $key => $value) {
|
||||
@@ -110,13 +126,15 @@ class Member extends HD_Controller
|
||||
$this->data['menuAry'] = $menuAry;
|
||||
$this->data['wxqyAry'] = $this->wxqyAry;
|
||||
$this->data['ifkzAry'] = $this->ifkzAry;
|
||||
$this->data['carGoldAry'] = $this->carGoldAry;
|
||||
$this->data['_title'] = '博饼用户';
|
||||
$this->data['pager'] = array('count' => ceil($count / $params['size']), 'curr' => $params['page'], 'totle' => $count);
|
||||
return $this->show_view('/app/bobing/member/lists', true);
|
||||
}
|
||||
|
||||
//博饼记录
|
||||
public function lists_logs()
|
||||
public
|
||||
function lists_logs()
|
||||
{
|
||||
$params = $this->input->get();
|
||||
$params['page'] = $params['page'] ? intval($params['page']) : 1;
|
||||
@@ -156,6 +174,7 @@ class Member extends HD_Controller
|
||||
$type_name = '个人博';
|
||||
}
|
||||
$setValue['type_name'] = $type_name;
|
||||
$setValue['c_time'] = $value["c_time"] ? date('Y-m-d H:i:s', $value["c_time"]) : '';
|
||||
$lists[] = $setValue;
|
||||
}
|
||||
}
|
||||
@@ -166,7 +185,8 @@ class Member extends HD_Controller
|
||||
return $this->show_view('/app/bobing/member/lists_logs', true);
|
||||
}
|
||||
|
||||
public function lists_day()
|
||||
public
|
||||
function lists_day()
|
||||
{
|
||||
$params = $this->input->get();
|
||||
$params['page'] = $params['page'] ? intval($params['page']) : 1;
|
||||
@@ -195,34 +215,40 @@ class Member extends HD_Controller
|
||||
}
|
||||
|
||||
//展示单条数据
|
||||
public function get()
|
||||
public
|
||||
function get()
|
||||
{
|
||||
}
|
||||
|
||||
//添加单条数据
|
||||
public function add()
|
||||
public
|
||||
function add()
|
||||
{
|
||||
}
|
||||
|
||||
//编辑单条数据
|
||||
public function edit()
|
||||
public
|
||||
function edit()
|
||||
{
|
||||
}
|
||||
|
||||
//删除单条数据
|
||||
public function del()
|
||||
public
|
||||
function del()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//批量操作(默认修改状态)
|
||||
public function batch()
|
||||
public
|
||||
function batch()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//导出数据列表
|
||||
public function export()
|
||||
public
|
||||
function export()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<div class="coms-table-wrap mt10">
|
||||
<form id="vue-app" class=" form-search coms-table-hd clearfix no-border" onsubmit="return false"
|
||||
action="/app/bobing/member/index">
|
||||
<input type="hidden" id="credit_sort" name="credit_sort" value="<?= $params['credit_sort'] ?>">
|
||||
<div class="am-form am-form-horizontal">
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">会员名称:</label>
|
||||
@@ -44,6 +45,18 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">购车金:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="car_gold">
|
||||
<option value="">全部</option>
|
||||
<?php foreach ($carGoldAry as $key => $value) { ?>
|
||||
<option value="<?= $key ?>"
|
||||
<?= $key == $params['car_gold'] ? 'selected' : '' ?>><?= $value ?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">企业微信:</label>
|
||||
<div class="am-para-inline w100">
|
||||
@@ -68,7 +81,13 @@
|
||||
<tr>
|
||||
<th width="10%"><span>用户名称</span></th>
|
||||
<th width="10%"><span>手机号码</span></th>
|
||||
<th width="10%"><span>积分</span></th>
|
||||
<th width="10%"><span>积分 <a href="javascript:" id="id_credit_sort"><i class="fa fa-sort"></i>
|
||||
<? if ($params['credit_sort'] == 1) { ?>
|
||||
<i class="fa fa-arrow-down"></i>
|
||||
<? } else if ($params['credit_sort'] == 2) { ?>
|
||||
<i class="fa fa-arrow-up"></i>
|
||||
<? } ?>
|
||||
</a></span></th>
|
||||
<th width="15%"><span>博饼+企微+排名=总购车金</span></th>
|
||||
<th width="10%"><span>开桌</span></th>
|
||||
<th width="10%"><span>企业微信</span></th>
|
||||
@@ -90,7 +109,8 @@
|
||||
<div class="col-md-6 align-l">
|
||||
</div>
|
||||
<div class="col-md-6 align-r">
|
||||
<a href="javascript:void(0);" data-open="/app/bobing/member/lists_day?uid=<?= $v['uid'] ?>"
|
||||
<a href="javascript:void(0);"
|
||||
data-open="/app/bobing/member/lists_day?uid=<?= $v['uid'] ?>"
|
||||
class="am-btn am-btn-primary am-btn-xs">每日博饼</a>
|
||||
<a href="javascript:void(0);"
|
||||
data-open="/app/bobing/member/lists_logs?uid=<?= $v['uid'] ?>"
|
||||
@@ -109,6 +129,21 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#id_credit_sort').on('click', function () {
|
||||
var credit_sort = $('#credit_sort').val();
|
||||
if (credit_sort == -1) {
|
||||
credit_sort = 1;
|
||||
} else if (credit_sort == 1) {
|
||||
credit_sort = 2;
|
||||
} else if (credit_sort == 2) {
|
||||
credit_sort = -1;
|
||||
}
|
||||
$('#credit_sort').val(credit_sort);
|
||||
var $form = $('#vue-app');
|
||||
$form.submit();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.my-panel {
|
||||
padding: 10px;
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<th width="10%"><span>红包</span></th>
|
||||
<th width="15%"><span>类型</span></th>
|
||||
<th width="10%"><span>博饼日期</span></th>
|
||||
<th width="10%"><span>创建时间</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -48,6 +49,7 @@
|
||||
<td><?= $v['hong_bao'] ?></td>
|
||||
<td><?= $v['type_name'] ?></td>
|
||||
<td><?= $v['bo_date'] ?></td>
|
||||
<td><?= $v['c_time'] ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
|
||||
@@ -108,7 +108,7 @@ class Bobing extends HD_Controller
|
||||
return;
|
||||
}
|
||||
$uid = 1;
|
||||
$credits = array(1 => 30, 2 => 50, 3 => 60, 4 => 70, 5 => 80, 6 => 90, 7 => 100, 8 => 120);
|
||||
$credits = array(1 => 30, 2 => 50, 3 => 60, 4 => 70, 5 => 80, 6 => 90, 7 => 70, 8 => 80);
|
||||
$credit = $credits[rand(1, 8)];
|
||||
$where = array('uid' => $uid, 'app_id' => $this->appConfig['app_id'], 'act_key' => $this->appConfig['act_key']);
|
||||
$ret = $this->mdBobingUser->update(array("credit = credit+{$credit}" => null), $where);
|
||||
|
||||
Reference in New Issue
Block a user