Showing
2 changed files
with
71 additions
and
0 deletions
| @@ -88,6 +88,22 @@ class Area extends Common | @@ -88,6 +88,22 @@ class Area extends Common | ||
| 88 | $this->assign ( 'title','代理商管理'); | 88 | $this->assign ( 'title','代理商管理'); |
| 89 | return $this->fetch(); | 89 | return $this->fetch(); |
| 90 | } | 90 | } |
| 91 | + | ||
| 92 | + /** | ||
| 93 | + * 代理商运营list | ||
| 94 | + */ | ||
| 95 | + public function operate(){ | ||
| 96 | + if(Request::isAjax()){ | ||
| 97 | + $data = Request::except('file'); | ||
| 98 | + | ||
| 99 | + //获取运营人员列表 | ||
| 100 | + $list= file_get_contents(ON_LINE.'App.Agent.getAgentOperate&areaid='.$data['areaid']); | ||
| 101 | + $array = json_decode($list,TRUE); | ||
| 102 | + return $result = ['code'=>0,'msg'=>'获取成功!','data'=>$array['data'],'rel'=>1];#'count'=>$array['data'][0]['total'] | ||
| 103 | + } | ||
| 104 | + $this->assign ( 'title','代理商管理'); | ||
| 105 | + return $this->fetch(); | ||
| 106 | + } | ||
| 91 | 107 | ||
| 92 | /** | 108 | /** |
| 93 | * 停用商家 | 109 | * 停用商家 |
application/admin/view/area/operate.html
0 → 100644
| 1 | +{include file="common/head"/} | ||
| 2 | +<div class="admin-main layui-anim layui-anim-upbit"> | ||
| 3 | + <fieldset class="layui-elem-field layui-field-title"> | ||
| 4 | + <legend>代理商运营人员列表</legend> | ||
| 5 | + </fieldset> | ||
| 6 | + | ||
| 7 | + <table class="layui-table" id="list" lay-filter="list"></table> | ||
| 8 | +</div> | ||
| 9 | + | ||
| 10 | +{include file="common/foot"/} | ||
| 11 | +<script type="text/html" id="barDemo"> | ||
| 12 | + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">{:lang('del')}</a> | ||
| 13 | +</script> | ||
| 14 | + | ||
| 15 | +<script> | ||
| 16 | + layui.use(['table','form'], function() { | ||
| 17 | + var table = layui.table,form = layui.form,$ = layui.jquery; | ||
| 18 | + var tableIn = table.render({ | ||
| 19 | + elem: '#list', | ||
| 20 | + url: '{:url("operateList")}', | ||
| 21 | + method:'post', | ||
| 22 | + cols: [[ | ||
| 23 | + {field:'id', title: '主键ID', width:80,fixed: true} | ||
| 24 | + ,{field:'sub_openid', title: '运营授权ID', width:280,fixed: true} | ||
| 25 | + ,{field:'openid', title: '微信openid', width:270} | ||
| 26 | + ,{field:'account', title: '运营账号', width:120} | ||
| 27 | + ,{field:'level', title: '用户身份',width:120} | ||
| 28 | + ,{field:'cdate', title: '加入时间',width:180} | ||
| 29 | + ,{width:160,title: '操作', align:'center', toolbar: '#barDemo'} | ||
| 30 | + ]] | ||
| 31 | + }); | ||
| 32 | + //删除运营人员 | ||
| 33 | + table.on('tool(list)', function(obj){ | ||
| 34 | + var data = obj.data; | ||
| 35 | + if(obj.event === 'del'){ | ||
| 36 | + layer.confirm('{:lang("Are you sure you want to delete it")}', function(index){ | ||
| 37 | + $.post("{:url('operateDel')}",{id:data.id},function(res){ | ||
| 38 | + if(res.code==1){ | ||
| 39 | + layer.msg(res.msg,{time:1000,icon:1}); | ||
| 40 | + obj.del(); | ||
| 41 | + }else{ | ||
| 42 | + layer.msg(res.msg,{time:1000,icon:2}); | ||
| 43 | + } | ||
| 44 | + }); | ||
| 45 | + layer.close(index); | ||
| 46 | + }); | ||
| 47 | + } | ||
| 48 | + }); | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + | ||
| 52 | + }); | ||
| 53 | +</script> | ||
| 54 | +</body> | ||
| 55 | +</html> |
-
Please register or login to post a comment