Commit e4ed8fd134390a44bf84eda9115433194e25bbee

Authored by teemitop
1 parent 4749a78d

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

@@ -10,8 +10,10 @@ class Operational extends Common @@ -10,8 +10,10 @@ class Operational extends Common
10 $data = Request::except('file'); 10 $data = Request::except('file');
11 $key= input('post.key') ? input('post.key') : ""; 11 $key= input('post.key') ? input('post.key') : "";
12 $channel = @$key['channel'] ? @$key['channel'] : 1; 12 $channel = @$key['channel'] ? @$key['channel'] : 1;
  13 + $user_groups = @$key['user_groups'] ? @$key['user_groups'] : 2;
13 $role = @$key['role'] ? @$key['role'] : ''; 14 $role = @$key['role'] ? @$key['role'] : '';
14 - $limit = '&offset='.$data["page"].'&size='.$data["limit"].'&keywords='.@$key['id'].'&channel='.$channel.'&role='.$role; 15 + $limit = '&offset='.$data["page"].'&size='.$data["limit"].'&keywords='.@$key['id'].'&channel='.$channel.'&role='.$role.'&user_groups='.$user_groups;
  16 +
15 $list= file_get_contents(ON_LINE.'App.Message.GetFormidList'.$limit); 17 $list= file_get_contents(ON_LINE.'App.Message.GetFormidList'.$limit);
16 $array = json_decode($list,TRUE); 18 $array = json_decode($list,TRUE);
17 $total = $array['data']['total']; 19 $total = $array['data']['total'];
@@ -27,6 +27,16 @@ @@ -27,6 +27,16 @@
27 </select> 27 </select>
28 </div> 28 </div>
29 </div> 29 </div>
  30 + 用户群体:
  31 + <div class="layui-input-inline layui-form">
  32 + <div class="layui-input-8">
  33 + <select name="class" id="user_groups" lay-filter="myselect">
  34 + <option value="1">全部用户</option>
  35 + <option value="2" selected = "selected">可发送</option>
  36 + <option value="3">不可发送</option>
  37 + </select>
  38 + </div>
  39 + </div>
30 <button class="layui-btn" id="search" data-type="reload">搜索</button> 40 <button class="layui-btn" id="search" data-type="reload">搜索</button>
31 </div> 41 </div>
32 42
@@ -54,7 +64,7 @@ @@ -54,7 +64,7 @@
54 {field: 'formid', title: 'FORMID'}, 64 {field: 'formid', title: 'FORMID'},
55 {field: 'seat_openid', title: 'OPENID'}, 65 {field: 'seat_openid', title: 'OPENID'},
56 {field: 'expire_in', title: '失效时间'}, 66 {field: 'expire_in', title: '失效时间'},
57 - {field: 'count', align: 'center',title: '可发送总数'}, 67 + {field: 'count', align: 'center',title: '可发送总数', sort: true},
58 {field: 'sellerinfo', align: 'center',title: 'ID-商家名称'}, 68 {field: 'sellerinfo', align: 'center',title: 'ID-商家名称'},
59 {field: 'role_name', align: 'center',title: '角色'}, 69 {field: 'role_name', align: 'center',title: '角色'},
60 {field: 'nick_name', align: 'center', title: '昵称'}, 70 {field: 'nick_name', align: 'center', title: '昵称'},
@@ -121,13 +131,15 @@ @@ -121,13 +131,15 @@
121 arr[i] = $(this).val(); 131 arr[i] = $(this).val();
122 }); 132 });
123 role = arr.join(",");//将数组合并成字符串 133 role = arr.join(",");//将数组合并成字符串
124 - tableIn.reload({ page: {page: 1},where: {key: key,channel: $('#channel').val(),role: role}}); 134 + var user_groups = $('#user_groups').val();
  135 + tableIn.reload({ page: {page: 1},where: {key: key,channel: $('#channel').val(),user_groups: user_groups,role: role}});
125 }); 136 });
126 137
127 var $ = layui.$, active = { 138 var $ = layui.$, active = {
128 reload: function(){ 139 reload: function(){
129 var key = $('#key'); 140 var key = $('#key');
130 var channel = $('#channel'); 141 var channel = $('#channel');
  142 + var user_groups = $('#user_groups');
131 var arr = new Array(); 143 var arr = new Array();
132 $.each($('input:checkbox:checked'),function(i){ 144 $.each($('input:checkbox:checked'),function(i){
133 arr[i] = $(this).val(); 145 arr[i] = $(this).val();
@@ -143,6 +155,7 @@ @@ -143,6 +155,7 @@
143 id: key.val(), 155 id: key.val(),
144 channel: channel.val(), 156 channel: channel.val(),
145 role:role, 157 role:role,
  158 + user_groups: user_groups.val(),
146 } 159 }
147 } 160 }
148 }); 161 });