Commit e4ed8fd134390a44bf84eda9115433194e25bbee

Authored by teemitop
1 parent 4749a78d

运营消息推送增加用户群体筛选

... ... @@ -10,8 +10,10 @@ class Operational extends Common
$data = Request::except('file');
$key= input('post.key') ? input('post.key') : "";
$channel = @$key['channel'] ? @$key['channel'] : 1;
$user_groups = @$key['user_groups'] ? @$key['user_groups'] : 2;
$role = @$key['role'] ? @$key['role'] : '';
$limit = '&offset='.$data["page"].'&size='.$data["limit"].'&keywords='.@$key['id'].'&channel='.$channel.'&role='.$role;
$limit = '&offset='.$data["page"].'&size='.$data["limit"].'&keywords='.@$key['id'].'&channel='.$channel.'&role='.$role.'&user_groups='.$user_groups;
$list= file_get_contents(ON_LINE.'App.Message.GetFormidList'.$limit);
$array = json_decode($list,TRUE);
$total = $array['data']['total'];
... ...
... ... @@ -27,6 +27,16 @@
</select>
</div>
</div>
用户群体:
<div class="layui-input-inline layui-form">
<div class="layui-input-8">
<select name="class" id="user_groups" lay-filter="myselect">
<option value="1">全部用户</option>
<option value="2" selected = "selected">可发送</option>
<option value="3">不可发送</option>
</select>
</div>
</div>
<button class="layui-btn" id="search" data-type="reload">搜索</button>
</div>
... ... @@ -54,7 +64,7 @@
{field: 'formid', title: 'FORMID'},
{field: 'seat_openid', title: 'OPENID'},
{field: 'expire_in', title: '失效时间'},
{field: 'count', align: 'center',title: '可发送总数'},
{field: 'count', align: 'center',title: '可发送总数', sort: true},
{field: 'sellerinfo', align: 'center',title: 'ID-商家名称'},
{field: 'role_name', align: 'center',title: '角色'},
{field: 'nick_name', align: 'center', title: '昵称'},
... ... @@ -121,13 +131,15 @@
arr[i] = $(this).val();
});
role = arr.join(",");//将数组合并成字符串
tableIn.reload({ page: {page: 1},where: {key: key,channel: $('#channel').val(),role: role}});
var user_groups = $('#user_groups').val();
tableIn.reload({ page: {page: 1},where: {key: key,channel: $('#channel').val(),user_groups: user_groups,role: role}});
});
var $ = layui.$, active = {
reload: function(){
var key = $('#key');
var channel = $('#channel');
var user_groups = $('#user_groups');
var arr = new Array();
$.each($('input:checkbox:checked'),function(i){
arr[i] = $(this).val();
... ... @@ -143,6 +155,7 @@
id: key.val(),
channel: channel.val(),
role:role,
user_groups: user_groups.val(),
}
}
});
... ...