Commit 01027324 authored by hujun's avatar hujun

经纪人修改

parent 4a982702
......@@ -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';
$where['phone'] = $this->params['phone'];
$where['id'] = ['<>',1];
$agents_data = $this->a_agents->getAgentInfo($field, '', $where);
if (empty($agents_data)) {
......
......@@ -361,6 +361,7 @@ class Client extends Basic
foreach ($data['data'] as $k=>$v) {
$data['data'][$k]['user_pic'] = HEADERIMGURL.$v['user_pic'];
$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;
......
......@@ -123,7 +123,6 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin
});
},
Edit_add:function(){
$.ajax({
url: '/index/getAuth2',
......@@ -151,14 +150,20 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin
$("#admin_off").val(data.data.admin_off);
$("#remarks").val(data.data.remarks);
$("#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'){
$("#sex0").attr('checked',true);
}else if(data.data.sex=='1'){
$("#sex1").attr('checked',true);
}else{
$("#sex2").attr('checked',true);
}
}
});
......@@ -185,9 +190,9 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin
data:par,
dataType: "json",
success: function(data){
if(data.code==200){
}else{
if(data.code==200) {
agent.getList(1);
} else {
alert(data.msg);
}
}
......@@ -223,7 +228,6 @@ define (['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css','pagin
}
})
}
}
};
return agent;
});
\ No newline at end of file
<script id="get_auth_list" type="text/template">
[% if(it) { %]
[% for(var item in it){ %]
<option value="[%= it[item]['id'] %]">[%= it[item]["title"] %]</option>
[% } %]
[% } %]
</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