Commit 01027324 authored by hujun's avatar hujun

经纪人修改

parent 4a982702
...@@ -49,6 +49,7 @@ class Broker extends Basic ...@@ -49,6 +49,7 @@ class Broker extends Basic
$field = 'id,device_id,store_id,auth_group_id,district_id,level,name,phone,password,sex,img,inviter_id,status'; $field = 'id,device_id,store_id,auth_group_id,district_id,level,name,phone,password,sex,img,inviter_id,status';
$where['phone'] = $this->params['phone']; $where['phone'] = $this->params['phone'];
$where['id'] = ['<>',1];
$agents_data = $this->a_agents->getAgentInfo($field, '', $where); $agents_data = $this->a_agents->getAgentInfo($field, '', $where);
if (empty($agents_data)) { if (empty($agents_data)) {
......
...@@ -361,6 +361,7 @@ class Client extends Basic ...@@ -361,6 +361,7 @@ class Client extends Basic
foreach ($data['data'] as $k=>$v) { foreach ($data['data'] as $k=>$v) {
$data['data'][$k]['user_pic'] = HEADERIMGURL.$v['user_pic']; $data['data'][$k]['user_pic'] = HEADERIMGURL.$v['user_pic'];
$data['data'][$k]['user_phone'] = hide_customer_phone($v['user_phone']); $data['data'][$k]['user_phone'] = hide_customer_phone($v['user_phone']);
$data['data'][$k]['create_time'] = date('Y-m-d', strtotime($v['create_time']));
} }
$data['status'] = 200; $data['status'] = 200;
......
...@@ -123,7 +123,6 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin ...@@ -123,7 +123,6 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin
}); });
}, },
Edit_add:function(){ Edit_add:function(){
$.ajax({ $.ajax({
url: '/index/getAuth2', url: '/index/getAuth2',
...@@ -151,14 +150,20 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin ...@@ -151,14 +150,20 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin
$("#admin_off").val(data.data.admin_off); $("#admin_off").val(data.data.admin_off);
$("#remarks").val(data.data.remarks); $("#remarks").val(data.data.remarks);
$("#status").val(data.data.status); $("#status").val(data.data.status);
$("#auth_group_id").val(data.data.auth_group_id);
//选中所属角色
$("#auth_group_id option").each(function () {
if ($(this).val() == data.data.auth_group_id) {
$(this).attr('selected','selected');
}
});
if(data.data.sex=='0'){ if(data.data.sex=='0'){
$("#sex0").attr('checked',true); $("#sex0").attr('checked',true);
}else if(data.data.sex=='1'){ }else if(data.data.sex=='1'){
$("#sex1").attr('checked',true); $("#sex1").attr('checked',true);
}else{ }else{
$("#sex2").attr('checked',true); $("#sex2").attr('checked',true);
} }
} }
}); });
...@@ -185,9 +190,9 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin ...@@ -185,9 +190,9 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin
data:par, data:par,
dataType: "json", dataType: "json",
success: function(data){ success: function(data){
if(data.code==200){ if(data.code==200) {
agent.getList(1);
}else{ } else {
alert(data.msg); alert(data.msg);
} }
} }
...@@ -223,7 +228,6 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin ...@@ -223,7 +228,6 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin
} }
}) })
} }
};
}
return agent; return agent;
}); });
\ No newline at end of file
<script id="get_auth_list" type="text/template"> <script id="get_auth_list" type="text/template">
[% if(it) { %] [% if(it) { %]
[% for(var item in it){ %] [% for(var item in it){ %]
<option value="[%= it[item]['id'] %]">[%= it[item]["title"] %]</option>
[% } %]
<option value="[%= it[item]['id'] %]">[%= it[item]["title"] %]</option>
[% } %]
[% } %] [% } %]
</script> </script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment